Close crv method not returning curve

Hallo

I am driven by need to close open curves generated by a GH definition

i tried to use ghpy and call the rhinoscriptsyntax method “CloseCurve”
but the script is returning a “null” variable
closecrv.gh (3.6 KB)

can anyone tell me what’s wrong with this script? there are no error message

BTW : if i use the the “CloseCrv” command in rhino i obtain the needed result

Thanks

IIRC RhinoCommon Curve.MakeClosed will only close the curve if the end points are within tolerance. It is not like native Rhino CloseCrv. So you will have to add the line segment yourself, or extend/move the endpoints to match.

2 Likes

@Helvetosaur thanks a lot , all clear. i will add a line between end points or interpolate a new curve by adding start point at the end of the list. cheers