Splits, or divides, a curve at a specified parameter. The parameter must be in the interior of the curve's domain.
rhinoscriptsyntax.SplitCurve ( curve_id, parameter, delete_input=True)
rhinoscript.curve.SplitCurve ( curve_id, parameter, delete_input=True)
curve_id |
Required. String or Guid. The object's identifier. |
parameter |
Required. Number or list of numbers. One or more parameters to split the curve at, that is in the interval returned by CurveDomain. |
delete_input |
Optional. Boolean. Delete the input curve. The default is to delete the input curve (True). |
List |
A list containing the identifiers of the two newly created curve objects, if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
curve = rs.GetObject("Select a curve to split", rs.filter.curve)
if rs.IsCurve(curve):
domain = rs.CurveDomain(curve)
parameter = domain[1] / 2.0
rs.SplitCurve( curve, parameter )