Reparametrize geometry python

Short answer:

mycurve= rs.AddPolyline(pts) #GUID
mycurve= rs.coercecurve(mycurve) #Rhino.Geometry.PolylineCurve

Long answer:

  • RhinoScriptSyntax is a wrapper for RhinoCommon (checkout this nifty tool)
  • rs.AddPolyline() adds an object to the document and returns a GUID
  • In order to identify that GUID as a geometry object you need to convert it to a Rhino.Geometry.PolylineCurve with rs.coercecurve
  • rs.SplitBrep() asks for two GUIDS. You must be passing something else than a Brep hence the error.

Hope this helps. If you have more doubts, please post your code, it´s always easier to help then.

2 Likes