Merge two separated Meshes

Hi everyone,

Is it possible to merge two separated meshes mantaining the edge vertex of both meshes as in the picture?

Separated_Meshes.3dm (2.9 MB)

A manual solution that works is by adding a few faces manually, join everything into one mesh with holes and then FillMeshHole. You need to draw two faces a few times, not just at the ends. I found that faces are required especially where the interior naked edges are.

You’re going to run into a problem with the mesh since there are badly joined naked edges in your original model.

I ran AlignVertices with a Distance to Adjust set to 0.05 which joined most of the problematic vertices

Vertices like this here I would simply collapse. Or split the other edge at this vertice.

joined_Meshes.3dm (11.6 MB)

1 Like

Really nice solution, thank you.

I tried something more automatic, identifying both mesh edges to merge and obtaining the vertex of theses edges.

Then I ran the delaunay mesh with theses vertex but not a simple solution appeared.

Looking for a solution at this forum, I found a way to sort a delaunay mesh by the angle of the each face of the mesh, removing those face with angles smaller than 20ª. Then the solution almost appeared, but there is still some issues to fix manually.

I was looking for something totally automated, although this solution seems almost right.

Anyway, why some triangles of the mesh have a reflection while others look opaque? Is there a difference?

Thank you for your answer! (41.4 KB)
Separated_Meshes.3dm (2.9 MB)

I cannot comment on the reflection / shading. Not sure what causes this.

The delaunay solution works but I’d create a brep in Rhino with the Sweep2 command and check the distance of the face centroids projected onto the brep to filter the faces. The result has overlapping faces at two places which I do not know why it occurs.

The meshes look like remeshed surfaces. If that’s the case, why don’t you work with the surfaces?

1 Like

Because if I work with the surface, when I create a mesh, the vetx of that one do not match with the edges of the other meshes

Do you still have the surfaces you used to create the meshes?

1 Like

I did something like this once to “stitch” the edges of 2 meshes together… Here are some of the solutions that came about through discussion on this forum.

1 Like

If you join your surfaces into a polysurface before meshing, the vertices will match along the edges.
(see this example)

If there’s some other reason you can’t use that approach, here’s a script for fixing mismatched vertices along edges (though better to avoid creating them in the first place)

For larger gaps where you also need smoothing of the connecting part there’s also this


Yes, here you have!

Thank you for your help! (59.9 KB)


I have tried yhe method employed in that dicussion but it does not work in case you have polylines with different number of vertex.

Anyway, thank for your help, I really appreciate it!

No not these curves…

Do you have the surfaces you used to triremesh the rest of the tunnel portal?

Ups, No, I’m sorry, I only have the meshes.

Hi Daniel,

Very useful scripts you wrote, congrats!

I used one of them, (larger gaps) and modifying it a little bit and it perfectly worked! Thank you so much!

Here’s the solution! (65.2 KB)

1 Like