How to create a NurbCircle in python

Hi,

I want to create a Nurb Circle within a python script …
Here’s my code :

nobject = Object.New('Curve', 'theCircle')
ncurve = Curve.New()
ncurve.appendNurb([0.0,-1.0, 0.0, 1.0])
ncurve[0].append([-1.0,-1.0, 0.0, 0.353553])
ncurve[0].append([-1.0,0.0, 0.0, 1.0])
ncurve[0].append([-1.0,1.0, 0.0, 0.353553])
ncurve[0].append([0.0,1.0, 0.0, 1.0])
ncurve[0].append([1.0,1.0, 0.0, 0.353553])
ncurve[0].append([1.0,0.0, 0.0, 1.0])
ncurve[0].append([1.0,-1.0, 0.0, 0.353553])
ncurve.update()
nobject.link(ncurve)
scn = Scene.getCurrent()
scn.link(nobject)
Redraw()

But the circle is not closed …
I have to manually select the first and last points and press “C” to close the circle …
Does anyone know how to close the circle in python ?

AFAIK it can’t be done yet. The nurbs/curve python API is incomplete and in the future will support bezier curves and also nurbs surfaces, I guess we’ll just have to wait.

bydesign