CurveMidPoint

Returns the mid point of a curve object.

Syntax

rhinoscriptsyntax.CurveMidPoint (curve_id, segment_index=-1)

rhinoscript.curve.CurveMidPoint (curve_id, segment_index=-1)

Parameters

curve_id

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

segment_index

Optional. Number. If curve_id identifies a polycurve object, then segment_index identifies the curve segment of the polycurve to query.

Returns

Point3d

The 3-D mid point of the curve if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

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

if rs.IsCurve(object):

    point = rs.CurveMidPoint(pbject)

    rs.AddPoint( point )

Also See

CurveEndPoint

CurveStartPoint

IsCurve