Rhino GH Python output seems wrong


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)
a = 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.

Thank you for your time :slight_smile:


the methode you use return the expected result.



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.

Tested it…answer before was only a guess.

1 Like

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.