Combine two surface meshes and stitch edges

Hello,
I have two surfaces which are generated with a 3D scanner and registered using Fiducial Registration. Irrelevant parts of the scan are removed after registration by cutting along a manually placed curve on the surface of the two models.

Now, I would like to combine the two surfaces into a closed surface, by filling the holes which are created inevitably as the cut curves along the two different surfaces will always have some displacement.

I have tried ‘Combine Models’ but it ends with ‘[VTK] Contact ends suddenly.’ without creating a result for which I found this vtkbool issue: Difference of meshes sometimes an empty mesh · Issue #40 · zippy84/vtkbool · GitHub.

I hope that there is a way to achieve this without manual intervention as it is one step in a series of operations which are automated in a custom extension.

In the following screenshot, the blue and yellow surfaces are separated by gaps on the left side while they intersect on the right side:

Thank you

Kambiz

It would be extremely difficult to automatically stitch the two surface patches correctly. I handle similar situations by voxelizing the appended mesh using a grid where the sampling direction is set such that it does not “flow out”, i.e. the sampling lines likely do not meet a hole between the patches. What this means is that I 1) append the meshes, 2) create a segmentation and set a reference geometry according to the desired voxelization directions, 3) import the mesh, 4) convert to binary labelmap representation.

1 Like

You could try making a pointcloud from the vertices of both meshes and then mesh the pointcloud using something like this :

https://examples.vtk.org/site/Cxx/Points/CompareExtractSurface/

1 Like