Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5785

How to get data out of NURBS solids in Rhino

$
0
0

How I can get some specific data out of NURBS solids drawn in Rhino in a .txt Format? Data like coordinates of control Points, their respective weights and knot vectors.

Finding from the earlier question, I can get some data out of NURBS curves and surfaces.

How to get data out of NURBS curves in Rhino

For example, to get the data of NURBS surface, the following code can be used:

import Rhino
import System.Guid
import scriptcontext
import rhinoscriptsyntax as rs
surface=rs.GetObject(“Select”,rs.filter.surface)
print ‘NURBS Data’
if rs.IsSurface(surface):
points = rs.SurfacePoints(surface)
weights = rs.SurfaceWeights(surface)
knots = rs.SurfaceKnots(surface)
print points
print weights
print knots
print ‘Done’

Please let me know if anyone knows how to get this. Thank you.

7 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 5785

Trending Articles