Merge topology vertices in Mesh


I create mesh from PolySurface with function ON_Brep::CreateMesh(). Somewhere in the middle of Mesh I’ve got unexpected naked edges (Mesh not have any holes).
I realize that mesh has two topology vertices on practically same location (for example coordinates of first topology vertex are: x=64.560715 y=-375.04434 z=-13.449869, and coordinates of second topology vertex are x=64.560715 y=-375.04434 z=-13.449864 ). I suppose that’s why I have unexpected naked edges.
Can I merge that two topology vertices to one?.

Any suggestion how to avoid topology vertex duplication. Maybe I can set some Mesh parameters while creating mesh?


I forgot to mention that I am using Rhino SDK C++.

(Dale Fugier) #3

Is it possible to see the polysurface and mesh? What mesh parameters did you use to create the mesh?


Hi Dale

I use DefaultFastMeshParameters to define mesh parameters while creation. Unfortunately I can not send the polysurface.
Currently I am writhing my own function to eliminate that naked edges. I manage to detect the topology vertices that coincident, and next step will be to overwrite mesh faces attached with topology vertices with function ON_Mesh::SetTriangle.

At the end I should call DestroyTopology. Am I right?

(Dale Fugier) #5

If you are modifying the underlying structure “by hand”, it is probably best to call each of these:


See opennurbs_mesh.h for more information.


Thank you Dale