IsCounterclockwise Method


Determines if this CurveLoop is oriented counter-clockwise (CCW) or clockwise (CW) with respect to the specified 3D direction.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2012

Syntax

C#
public bool IsCounterclockwise(
	XYZ normal
)
Visual Basic
Public Function IsCounterclockwise ( _
	normal As XYZ _
) As Boolean
Visual C++
public:
bool IsCounterclockwise(
	XYZ^ normal
)

Parameters

normal
Type: Autodesk.Revit.DBXYZ
The normal vector to the plane used for this determination.

Return Value

True if the curve loop is oriented counter-clockwise with respect to the specified 3D direction, false if the loop is oriented clockwise.

Remarks

CCW means that the projection of the CurveLoop onto a plane having "normal" as its oriented normal is CCW. This method should only be called if the loop is closed and has a non-singular projection onto the plane (i.e., the projection should have no self-intersections and should not be degenerate or even nearly degenerate). The return value in other cases is indeterminate.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException The curve loop is open or consists of a single unbound curve; counterclockwise determination has no meaning.

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →