本文整理汇总了C#中CurveLoop.IsCounterclockwise方法的典型用法代码示例。如果您正苦于以下问题:C# CurveLoop.IsCounterclockwise方法的具体用法?C# CurveLoop.IsCounterclockwise怎么用?C# CurveLoop.IsCounterclockwise使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CurveLoop
的用法示例。
在下文中一共展示了CurveLoop.IsCounterclockwise方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsIFCLoopCCW
/// <summary>
/// Determines if curve loop is counterclockwise.
/// </summary>
/// <param name="curveLoop">
/// The curveLoop.
/// </param>
/// <param name="normal">
/// The normal.
/// </param>
/// <returns>
/// Returns true only if the loop is counterclockwise, false otherwise.
/// </returns>
public static bool IsIFCLoopCCW(CurveLoop curveLoop, XYZ normal)
{
if (curveLoop == null)
throw new Exception("CurveLoop is null.");
// If loop is not suitable for ccw evaluation an exception is thrown
return curveLoop.IsCounterclockwise(normal);
}
示例2: SafeIsCurveLoopClockwise
/// <returns>true if the curve loop is clockwise, false otherwise.</returns>
private static bool SafeIsCurveLoopClockwise(CurveLoop curveLoop, XYZ dir)
{
if (curveLoop == null)
return false;
if (curveLoop.IsOpen())
return false;
if ((curveLoop.Count() == 1) && !(curveLoop.First().IsBound))
return false;
return !curveLoop.IsCounterclockwise(dir);
}