Python rs.CurveEditPoints() return value


just stumbled over this while not beeing able to slice without using coerce3dpointlist:

pts = rs.CurveEditPoints(id) 

returns a type of ‘Point3dList’ while

pts = rs.CurvePoints(id)

returns a regular python ‘list’. Is there any reason for the difference ?


Hi Clement
rs.CurvePoints(id) return control points,Like the picture right return edit point,Like the picture left command

Hi Clement,

I’ve seen this happen before in a couple of places - I think this is just that the two RhinoCommon methods are written slightly differently. IIRC, you can just use list(rs.CurveEditPoints(id)) as a workaround if you want to slice the list…

@alain, this probably should be looked at anyway?



I think that returning a list is the right thing to do and is more consistent with RhinoScript.



Thanks, that makes sense.


I have noticed this occurs in a couple of places too. To one that comes to mind is rs.coercemesh. This produces a number of arrays that are not normal python lists (MeshVertexList, MeshVertexNormalList etc).

This may be intended but it seems inconsistent with how other functions work.


I like this one, much simpler than my current workaround!