Returns the control points, or control vertices, of a curve object. If the curve is a rational NURBS curve, the euclidean control vertices are returned.
rhinoscriptsyntax.CurvePoints (curve_id, segment_index=-1)
rhinoscript.curve.CurvePoints (curve_id, segment_index=-1)
curve_id |
Required. String or Guid. The object's identifier. |
segment_index |
Optional. Number. If curve_id identifies a polycurve object, then intIndex identifies the curve segment of the polycurve to query. |
List |
The control points of the curve if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select a curve")
if rs.IsCurve(obj):
points = rs.CurvePoints(obj)
if points: [rs.AddPoint(pt) for pt in points]