Returns the control points, or control vertices, of a surface object.
rhinoscriptsyntax.SurfacePoints (surface_id, return_all=True)
rhinoscript.surface.SurfacePoints (surface_id, return_all=True)
surface_id |
Required. String or Guid. The object's identifier. |
return_all |
Optional. Boolean. If True (default) all surface edit points are returned. If False, the function will returned surface edit points based on whether or not the surface is closed or periodic. |
List |
The control points of the surface if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
def PrintControlPoints():
surface = rs.GetObject("Select surface", rs.filter.surface)
points = rs.SurfacePoints(surface)
if points is None: return
count = rs.SurfacePointCount(surface)
i = 0
for u in range(count[0]):
for v in range(count[1]):
print "CV[", u, ",", v, "] = ", points[i]
i += 1
PrintControlPoints()