ConvertCurveToPolyline

Converts a curve to a polyline curve.

Syntax

rhinoscriptsyntax.ConvertCurveToPolyline ( curve_id, angle_tolerance=5.0, tolerance=0.01, delete_input=False, min_edge_length=0, max_edge_length=0 )

rhinoscript.curve.ConvertCurveToPolyline ( curve_id, angle_tolerance=5.0, tolerance=0.01, delete_input=False, min_edge_length=0, max_edge_length=0 )

Parameters

curve_id

Required.  String or Guid.  The object's identifier.

angle_tolerance

Optional.  Number.  The maximum angle between curve tangents at line endpoints.  If omitted, the angle tolerance is set to 5.0.

tolerance

Optional.  Number.  The distance tolerance at segment midpoints.  If omitted, the tolerance is set to 0.01.

delete_input

Optional.  Boolean.  Delete the curve object specified by curve_id.  If omitted, curve_id will not be deleted.

min_edge_length

Optional.  Number.  The minimum segment length.  Specify 0.0 (Default) for no minimum limit.

max_edge_length

Optional.  Number.  The maximum segment length. Specify 0.0 (Default) for no maximum limit.

Returns

Guid

The identifier of the new object if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Select a curve")

if rs.IsCurve(obj):

    polyline = rs.ConvertCurveToPolyline(obj)

    if polyline: rs.SelectObject(polyline)

Also See

IsCurve