Moving mesh vertices without creating gaps in mesh


#1

I’m moving mesh vertices to create a slightly distorted mesh (I’m trying to simulate an object scanning error distribution). The vertices move just fine, but the problem is that gaps are left in some areas; the mesh seems to split apart.

I’ve noticed that the TopologyEdges and TopologyVertices counts change when I move mesh vertices, perhaps this has something to do with it?

Is there a way to move mesh vertices while still maintaining the same connectivity?

Thanks,
Sam


(Dale Fugier) #2

Hi Sam,

I can move mesh vertices, by point editing in Rhino, without creating gaps.

We’ll need to see a sample that repeats your problem…

– Dale


#3

Hi Dale,

You pointed me in the right direction; I tried doing it manually and realized there are multiple coincident mesh vertices and if I move only 1 or move them by different amounts, then I get holes in the mesh.

I tried using weld to merge coincident vertices, but this does odd things to the texture mapping.

I think the solution is to move any coincident vertices every time I move a vertex. But this is really time computationally expensive as I have to check through every vertex for every vertex… Perhaps there is a better way to ‘bring along all coincident vertices’. Thoughts?

Thanks,
Sam


(Steve Baer) #4

Use the topologyvertices to figure out all of the vertices that need to be moved for a single point


#5

Brilliant! Worked like a charm.

Thanks,
Sam


#6

Is this feature in the C++ SDK? I don’t find it…

Pablo


(Laurent Delrieu) #7

http://developer.rhino3d.com/api/RhinoCommonWin/html/P_Rhino_Geometry_Mesh_TopologyVertices.htm


(Steve Baer) #8

Yes. See ON_MeshTopology in opennurbs_mesh.h