Copy point3dlist


is there a method to make a copy of a Rhino.Collections.Point3dList()?
As far as i understand with Point3dList.CopyTo(…) i just can copy the list to an array.
Or have i to do it this way?:

rhino_points = rc.Collections.Point3dList()
for point in rhino_points_in:

Thanks in advance.


Never tried it myself, but does it work if you do:

rhino_points = rc.Collections.Point3dList()
rhino_points = rhino_points_in

With Python you might want to import the module Copy and use the method:

import copy

Does that help?

Thank you for you suggestions. I tried them, but both doesn’t work on rhinos Point3dList.
But adding points to a rhino Point3dList seems to be quite fast, so i can use this without serious performance loss.
Have a nice evening!

Ah pity. I am still quite the noob when it comes to python. Does it help if you do this instead of my earlier suggestion?

rhino_points = rhino_points_in[:]

According to a quick search on the internet, this is apparently how lists are copied in python.

You can create an instance of a Point3dList from anything that represents an enumerable list of points.

import Rhino

ptlist = Rhino.Collections.Point3dList()
for x in range(10):
    for y in range(10):

# create an independent copy of ptlist
copylist = Rhino.Collections.Point3dList(ptlist)

print len(ptlist)
print len(copylist)