CloseCurve

Closes an open curve object by making adjustments to the end points so that they meet at a point.

Syntax

rhinoscriptsyntax.CloseCurve (curve_id, tolerance=-1.0 )

rhinoscript.curve.CloseCurve (curve_id, tolerance=-1.0 )

Parameters

curve_id

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

tolerance

Optional. Number.  The maximum allowable distance between start point and end point of the curve.  If omitted, the document's current absolute tolerance is used.

Returns

Guid

The identifier of the closed curve object if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Select curve", rs.filter.curve)

if not rs.IsCurveClosed(obj) and rs.IsCurveClosable(obj):

    rs.CloseCurve( obj )

Also See

IsCurveClosable

IsCurveClosed