Draw open Polyline with same Start/End CV?

Hi All,

I’m currently developing a Grasshopper definition which grabs polylines from the Rhino document and builds Kangaroo2 goals from these. Some of these polylines represent bending glass fibre rods.

If I draw a closed polyline in Rhino this currently represent a periodic rod (see video). However, if I want to represent a rod that connects end-to-end, but IS NOT periodic, I’m now running into to the issue that a polylinecurve (or, polyline) does not seem to be able to be open (that is, when calling foo.IsClosed == False) AND have the same start and point.

A simple example is to draw an open polyline in Rhino and then snap the end point to the start point. It is now a closed curve.

Is there perhaps a workaround here? Alternatively I could have separate layers for periodic and and non-periodic rods, but I’d rather avoid that if possible.



I discovered what you mention when drawing airfoil sections. I found that to prevent the curve from closing when making the last click at the first click (which I want to be the trailing edge) I need to make the last click (control point) just near the first one and then move the last point to the first afterwards. That preserves the sharp trailing edge that is characteristic of an airfoil.

That’s for a NURBS curve though, right? Which by the way will also result in a closed curve (in the sense that it’s property IsClosed will be True). It will however not be periodic, as you say.

Rhino does close curves that have coincident start and end points, but that is not the same as being periodic… Freeform curves created with Closed=Yes can be kept sharp by using that command line option - Sharp=Yes. (Sharp is Non-periodic). Polylines will not be periodic regardless.


Periodic curves are only ever Nurbs curves. It means that the knot-vector of the nurbs curve does not have coincident knots at the start and end of the curve, and a such the curve isn’t ‘clamped’ to the end-points. Instead, the curve starts and stops somewhere after the first control-point and before the last one, the distance depending on the degree of the curve. Although Rhino is fully capable of dealing with these curves, they are deemed confusing to users and there are no commands that can generate them.

The one exception to the above is periodic nurbs curves, which counteract the ‘gaps’ at the start and end of the curve by duplicating the control-points. These duplicate points are hidden by the Rhino UI, making it look as though there are only single control-points.

If you’re dealing with polylines, periodicness is not one of your concerns as polylines are never periodic. Polylines are closed if the first and last point are coincident, which is also the metric by which other types of curves are determined to be closed or not. I do now know exactly what role tolerances play in this determination, and whether or not that depends on the document tolerance settings.

Thanks Pascal and David,

I think I should have used a different word than periodic to describe my problem. What I meant was that the actual structural element (the rod) is periodic (i.e. the polyline representing it has a Kangaroo2 bending goal formed by the two lines which connect to the start/end point of a closed polyline). This is the case for the rod in the video (the thick black polyline). Hence a closed polyline will bend out to a perfect (discrete) circle.

However, a rod might also be attached tip-to-tip. In which case it will bend out to an eye/foil-shape. For this I (currently) need to draw (in Rhino) an open polyline with coincident start/end vertices. But as I understand from Pascal, this is probably not currently possible, correct?

Apologies for the confusion :confused:

Correct. Closedness is not some separate property a curve has, it is determined from the distance between the curve start and the curve end and from that distance alone.