How can create a closed curve using rhino3d?

Hi everyone,

I try to create curve using rhino3d in python, using the line like:

rhino3dm.Curve.CreateControlPointCurve(curpts, 3)

However, the curve is not closed, and I can’t find the option to close it.
Is there any suggestions?
Thanks!

Moved to Scripting category.

1 Like

To create a closed polyline or a control point curve, add the first point again as the last point in the list.
(i.e. the first and last points in the list must be the same, the curve will automatically be closed).

1 Like

Thank you so much, @Helvetosaur, for your prompt reply in holiday!
I thought of this method.
If there is no option in the command to apply for, I will follow this way.
Have a nice day!

In the rhinoscriptsyntax and RhinoCommon methods, there is no optional argument for creating a closed curve with a list of points, the last point must always be the same as the first point.

Some Grasshopper components do have this added as an optional input (closed True/False).

1 Like

Hi @Helvetosaur, thank you for your confrimation and suggestion.
Yes, I apply GH to close the curves and it works well.