Returns the knots, or knot vector, of a surface object.
rhinoscriptsyntax.SurfaceKnots (surface_id)
rhinoscript.surface.SurfaceKnots (surface_id)
surface_id |
Required. String or Guid. The object's identifier. |
List |
The knot values of the surface if successful. The list 2 lists with the following information: Element 0 = Knot vector in U direction Element 1 = Knot vector in V direction |
None |
If not successful, or on error. |
import rhinocsriptsyntax as rs
obj = rs.GetObject("Select a surface")
if rs.IsSurface(obj):
knots = rs.SurfaceKnots(obj)
if knots:
vector = knots[0]
print "Knot vector in U direction"
for item in vector: print "Surface knot value: ", item
vector = knots[1]
print "Knot vector in V direction"
for item in vector: print "Surface knot value: ", item