Naked Edges Problem

Hi everyone,

I have a list of meshes. When I combine them with the Combine and Clean, I obtain a very nice mesh but with non desired naked edges. Is this a bug of the component? Is there a way of fixing it? @DanielPiker

Maybe using Align Vertices after the result will solve the problem, although I need a tolerance of 0.001 and it takes almost 22s. If so, is there a C# faster solution for this?

Thanks in advance!

Unwelded (3.9 MB)

1 Like

Hi @Quan_Li

Thank you for your answer. When I recreate your script it took me 22s to align vertices. Why is there a big difference between your calculation time and mine?

The original normals have to be preserved

BTW, just curious, I’ve seen a lot of people using the Mesh WeldedVertices from a plugin. Is there a reason to avoid the native component from GH Weld Mesh?

Thanks in advance

What is your tolerance setting? Mine is 0.001.

Same as you…strange…

What if you change the Units to Milimeters?

Sorry for the late response. If I change the units to milimeters it is the same computational time as well. By any chance are you using R8?

By the way, is there a reason that explains that Combine and Clean component developed by @DanielPiker does not merge these vertex?

Combine&Clean joins the list of meshes, combines identical vertices, culls unused vertices, welds everything and computes the normals.
It does not merge nearby vertices together with a tolerance like Align Vertices does.

Good to know, thanks! Then I will use the align vertex after using the Combine & Clean command :slight_smile:

Is there any chance of implementing the Align vertex command in C# to make it faster?

In fact you have 48K quads (give or take). Appending’m to a new Mesh and then calling the SplitDisjoinedPieces Method yields one Mesh (a miracle). Then extracting the Naked Edges (as Polylines) is more or less easy … but the whole thing is a mess meaning that the output is bananas.

See attached (no elaborated tests are included [Manifold and the likes]). A naked edge is one that is connected to just one Face (assuming that the Mesh is Manifold). (2.1 MB)

That said I hate Meshes like my sins (lot’s)


Thanks for your answer. The output you provided still has these naked edges. Is it possible to apply the Align vertex command in C# to get a merged mesh in the areas I highlighted in the first post (to get the result @Quan_Li provided me but in c#)?

Well … as I said the first step is to Append the quads to a new Mesh. This yields one Mesh that either has DisjoinedPieces (Islands so to speak) or not. In your case yiels one Mesh. Then a Vertices.CombineIdentical Method should (in theory) yield a Mesh where the Vertices Count equals the TopologyVertices Count. That said Vertices are “Points3f” on a per MeshFace basis while TopoVertices are “Points3f” on a per (Disjoined) Mesh basis.

Anyway … if you want some “other separation and/or result” (meaning other naked edges than the ones from the standard GetNakedEdges Rhino Method ) you should provide explicit rules for that action (or mastermind Mesh Split ways via case specific edge rules/planes/splitters/cats/dogs/etc etc). These rules MAY are valid for the Append phase as well (i.e. avoid dating the same girl twice). That said the more rules use Mesh Connectivity (VV/VE/EV) the better (and way faster).

But in general this 48K collection of quads is chaos. Instead of Reverse Engineering (and reinventing the wheel) I would strongly advise to create the OEM Mesh in a far more rational way.

1 Like

Sorry for reopen the post again but I would like to understand what is happening.

The mesh once applied the mesh and combine command looks like that:

As you can see some edges that should be welded there are not.

After applying the align vertex command I get this mesh:

Then, the naked edge problem seems to be solved.

However, when I check the vertices in that area I get that I have duplicates. For example vertex index 31742 and 31738 are the same point and vertex 32228 and 32224 are also the same

I thought that by using the align vertex would solve the problem but the issue it is still there. Should I use the welded edge command? What does it happen?

Regards! (3.9 MB)

I meshes there are 2 things Vertex and TopologyVertex. As the normals are clearly not smooth along the edges it means there are 2 vertex, one for each face and surely just one topology vertex.

47354 vertexes and 47202 topology vertexes

If you use Weld Mesh from ngon => 47202 vertexes now
and no more the angular looking

1 Like

Hi @bbalbastre

The native commands often have some additional logic to the underlying SDK functions.
If you use Rhino Commands to _Join the faces and _Weld it with an angle tolerance of 1 you’ll get a pretty good organized mesh which you can explode into 80 separate meshes:

Hope this helps,

MeshCleanup_jM.3dm (739.6 KB)

1 Like

Thanks for your answer @laurent_delrieu , I really appreciate it.

Maybe I did not make myself clear in the post. The intention here is to maintain the mesh and the normals as they are, with the hard edges etc (I need them as they are since it is made for a FEM analysis). I just need to remove the naked edge I mentioned before, since in that area I have duplicate vertices and the adjacent quads do not share the same vertex ID, creating that discontinuity

I didn’t read all the post I just try to explain you the difference between Mesh Vertex and Mesh Topology Vertex

You need to use
instead of
mesh.Vertices (2.4 KB)

1 Like

Thank you all for the answers and approaches! I finally understood what @laurent_delrieu was saying and I could fix the problem :slight_smile: