Python equivalent of LineBetweenCurves method

Dear community,

Is there a python equivalent of the LineBetweenCurves method in Rhinoscript?

Thanks in advance.

Kind regards,

Filip

Use Rhino.Geometry.Line.TryCreateBetweenCurves.

Thanks for the reply.

Is there also a simple way to convert a GUID string referring to a curve to an actual RhinoCommon curve object?

I found something using the utility module

import utility as rhutil
crv = rhutil.coercecurve(...)

However, then I am stuck getting the message “No module named utility”. So how can I import utility.py in a sustainable way without file copying between folders?

Thanks in advance.

Kind regards,

Filip

That can be done something like this:

import scriptcontext as sc
obj=sc.doc.Objects.find(objID)
crv=obj.Geometry

–Mitch

1 Like

OK, thanks Dale and Mitch.

Thanks to you, it now works :wink: