How to get data out of NURBS curves in Rhino

How I can get some specific data out of NURBS curves drawn in Rhino in a .txt Format? Data like coordinates of control Points, their respective weights and knot vectors.
I tried python Scripting but I was not able to get a solution yet.

Please let me know if anyone knows how to get this or if someone has worked on something similar.

Hi, Rohith

How about the List command?
http://docs.mcneel.com/rhino/5/help/en-us/commands/list.htm

It renders a dialog with text that you can copy paste:

Note that if you run the command hyphened like so: _-List you can choose a destination:

Select objects to list:
Select objects to list. Press Enter when done:
Text destination <HistoryWindow> ( HistoryWindow  File  Clipboard  Dialog ): 

HTH
-Willem

Hi, Willem,
Thanks a lot, this command gives the coordinates of the control Points.
I Need the weights of each control Points and the knot vector as well. The data given under Knot Vector (9 knots) doesnt look like a knot vector.
I checked for it in the Details button of the Properties tab as well, it doesnt help either.

Please let me know if you get to know.

Thanks,
Rohith

Hi Rohith,

FWIW:

I do not know much about this type of data, however I did find that only when cpoint weights are rational they are
explicitly listed:

Hi Willem,

Thanks. I also found a few simple commands in Pythonscripting which give these data.

rhinoscriptsyntax.CurvePoints(curve) — for control points

rhinoscriptsyntax.CurveWeights(curve) — for weights

rhinoscriptsyntax.CurveKnots(curve) — for knot vector

Regards,
Rohith

Hi Rohith,

I used polysurf command to get the nurbs data of each patch, however, if the object of interest has more than one patch surfaces, polysurf doesn’t work. Do you know how to make a loop around the patches to get the nurbs data of all of the patches using python scripting in rhino?

Cheers,

Hadi