Ghpythonlib LoftOptions not working

Hello,

I try to use a Loft with options from the ghpythonlib.components, but get the following Error:
Loft: input 2 options. error: Data conversion failed from Text to Loft Options

Here is the code in question:

loftOptions = ghcomp.LoftOptions(False, True, 0, 0, 0)
loft = ghcomp.Loft([crv1, crv2, crv3], loftOptions)

Is there any way to make this work? I need the options to set the “adjust” parameter to true, to minimize twisting in the resulting lofts.

I appreciate any suggestions!

This is unfortunately known and tracked at RH-48617 – and assigned to @DavidRutten. I’ve asked if we can prioritize.

See also: GhPython Node to Code - Loft: input 2 options. error: Data conversion failed from Text to Loft Options - #5 by Alain for a workaround by @Alain.

1 Like

Hi, thanks for your reply!
Unfortunately the suggested workaround using rhinoscriptsyntax AddLoftSurface does not offer an option to automatically adjust the seams to minimize twist, if I understand the documentation correctly.

Is this override what you are after?

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Brep_CreateFromLoft_1.htm

I’m not sure (it says “This function will not adjust the seams of closed curves”) but I will give it a try, thank you!

Maybe the other one, Brep.CreateFromLoft Method (IEnumerable(Curve), Point3d, Point3d, LoftType, Boolean)

RH-48617 is fixed in Rhino 7 Service Release 9

1 Like