Closes an open curve object by making adjustments to the end points so that they meet at a point.
rhinoscriptsyntax.CloseCurve (curve_id, tolerance=-1.0 )
rhinoscript.curve.CloseCurve (curve_id, tolerance=-1.0 )
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. |
Guid |
The identifier of the closed curve object if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select curve", rs.filter.curve)
if not rs.IsCurveClosed(obj) and rs.IsCurveClosable(obj):
rs.CloseCurve( obj )