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?
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?
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?
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.
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).
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.
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?
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.
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:
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