I wrote this primitive script in GH Python component to make a set of curves:
import Rhino.Geometry as rg
# Create a plane in the horizontal direction
plane = rg.Plane.WorldXY
curves = []
for i in range(1, irange):
# Offset the curve in the horizontal plane
offset_curve = curve.Offset(plane, -i*0.1, 0.01, rg.CurveOffsetCornerStyle.Round)
curves.append(offset_curve)
a = curves
print(curves)
Problem is that it outputs this instead of geometry:
When I set the output to “a = offset_curve” it does output a curve. I have found an example where a list of curves is handled the same and it works fine so I don´t know what is wrong.
Offsets this curve. If you have a nice offset, then there will be one entry in the array. If the original curve had kinks or the offset curve had self intersections, you will get multiple segments in the output array.
Just append the first list entry of your curve result to your curve list and you will see if you get what you expect.
To improve on @flokart’s solution, don’t append just the first curve, but all returned curves to the list. Python list has a handy built-in method for it.