Surface (mesh) reconstruction from 3 curves (bifurcation)

68 views Asked by At

Consider that I am trying to create a surface (mesh) defined given two closed elliptical curves with the same z-coordinate and one closed elliptical curve with different z-coordinate (each represented as an array 3D points with constant z-coordinate). The surface should represent a smooth merging of two tubes into one. The problem is part of a larger problem of reconstructing the whole tube disconnecting into two smaller ones given cuts in different z-coordinates. The curves look like this: The curves There is no problem in reconstructing individual tubes from their cuts in different z-coordinates, since those cuts do not have different topology. Those individual one-tube meshes are constructed by this function in Python:

def create_surface_from_curves(curves):
vertices = [point for curve in curves for point in curve] #each point of each curve represents one vertice
faces = []
for i in range(len(curves) - 1): #creating of faces assuming the curves have the same number of discretization points
    for j in range(len(curves[0]) - 1):
        face = [i * len(curves[0]) + j, i * len(curves[0]) + j + 1, (i + 1) * len(curves[0]) + j + 1, (i + 1) * len(curves[0]) + j]
        faces.append(face)
return vertices, faces

This code is used to create all 3 surfaces (meshes), which look like this: The 3 surfaces I need to smoothly connect into one For obtaining the complete 3D surface (mesh) I need to connect those surfaces into one. The problem is that the connection of those 3 reconstructed meshes is not unique, we have no information about the shape of the surface between the layers of unity and disunity. However, apart from the smoothnes and 'real look' of this connection I have no special requirement. I also tried importing it into blender and using its tools, but that didn't work either. Ideal solution would be a clever creation of faces or writing a Blender script capable of that. Does anybody have an experience with such problems or an idea how to solve it?

0

There are 0 answers