Hi,
The script was working fine in Rhino7 but now getting problems in Rhino8.
Just create a long polyline (>700) and select.
import rhinoscriptsyntax as rs
def cCrv_filt(rhino_object, geometry, component_index):
return rs.IsCurveClosed(geometry)
def start():
msg="Select a polyline for trimming"
cCrv = rs.GetObject(msg, 4, preselect=False)
if not cCrv: return
out_arc_in1 = rs.TrimCurve(cCrv, [0, 700], True)
start()
TypeError: since Python.NET 3.0 int can not be converted to Enum implicitly. Use Enum(int_value) in method Rhino.Geometry.Curve Trim(Rhino.Geometry.CurveEnd, Double)