Hi there,

I´m trying my scripts from rhino 5 in rhino 6, and came across one problem.

This is obviously a part of a much longer code, but just the Addellipse is not willing for me to work in Rhino 6 GH
any hints anybody ?


Sorry, @petozatko89

in an attempt to improve the rs.AddEllipse functionality, it appears that I broke it.
I added the RH-44622 bug report.

For now, you can use this function that will work around the issue:

def AddEllipse(plane, radiusX, radiusY):
    import Rhino, scriptcontext, System #only required if used freely
    plane = rs.coerceplane(plane, True)
    ellipse = Rhino.Geometry.Ellipse(plane, radiusX, radiusY)
    rc = scriptcontext.doc.Objects.AddCurve(ellipse.ToNurbsCurve())
    if rc==System.Guid.Empty: raise Exception("Unable to add curve to document")
    return rc

Or, you can change the line:

rc = scriptcontext.doc.Objects.AddEllipse(ellipse)
rc = scriptcontext.doc.Objects.AddCurve(ellipse.ToNurbsCurve())

in the file

%appdata%\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\

I hope this is helpful,


Giulio Piacentino
for Robert McNeel & Associates

Hi @piac,

No problem, that´s why we´re here :slight_smile:
I changed the, and now it works.

thank you