ClosedCurveOrientation

Determine the orientation (counter-clockwise or clockwise) of a closed, planar curve.

Syntax

Rhino.ClosedCurveOrientation (strObject [, arrDirection])

Parameters

strObject

Required.  String.  The object's identifier.

arrDirection

Optional.  Array.  A 3-D vector that identifies the up, or Z axis, direction of the plane to test against.  If omitted, the world Z axis (0,0,1) is used.

Returns

1

The curve's orientation is counter-clockwise.

-1

The curve's orientation is clockwise.

0

Unable to compute the curve's orientation.

Null

On error.

Example

Const rhObjectCurve = 4

Dim strObject

strObject = Rhino.GetObject("Select curve", rhObjectCurve)

If Rhino.IsCurveClosed(strObject) And Rhino.IsCurvePlanar(strObject) Then

Rhino.Print Rhino.ClosedCurveOrientation(strObject)

End If

Also See

IsCurveClosed

IsCurvePlanar