Fast way to update mesh Vertices

i have trouble updating mesh vertices - SetVertex is slow, so i tried to use:

myvertexlist = mesh.Vertices.ToPoint3fArray()    

this works fine, but when i change any properties (x,y,z), they wont show on the mesh, and if i
say something like:

myvertexlist[0] = Rhino.Geometry.Point3f(100,100,100)

then the mesh wont show up at all…

So my question is - why does changing the list destroy the mesh, and is there a faster way to update a lot of vertices?


Hi Damjan,

you might need to recreate the mesh and delete the old mesh to see changes made on the mesh vertices. You also can replace the old mesh with the updated one to match the properties of the old mesh. One alternative is to use grips instead. But it is not much faster then above method.


yes - that worked fine:
i create a new empty mesh,
add the vertices (AddVertex)
and then add the faces as a list from the original mesh

newmesh = Rhino.Geometry.Mesh()
for i in xrange(0, myvertexlist.Count):

is fast enough for me

Hi Atair,
The method to add a list of vertices to the mesh vertices list is called AddVertices.
I doubt that mesh.Vertices.Add() above will do what you are after.


Giulio Piacentino
for Robert McNeel & Associates

great :wink:


piac - true, i overlooked that one, now it is even faster