本文整理汇总了C#中CurveLoop.Flip方法的典型用法代码示例。如果您正苦于以下问题:C# CurveLoop.Flip方法的具体用法?C# CurveLoop.Flip怎么用?C# CurveLoop.Flip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CurveLoop
的用法示例。
在下文中一共展示了CurveLoop.Flip方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddCurveToLoop
// We are going to try a few passes to add a curve to the CurveLoop, based on the fact that we can't always trust that the
// orientation of the given curve loop is correct. So we will:
// 1. Try to add the curve, according to the orientation we believe is correct.
// 2. Try to add the curve, reversing the orientation.
// 3. Reverse the curve loop, and try steps 1-2 again.
private void AddCurveToLoop(CurveLoop curveLoop, Curve curve, bool initialReverse, bool allowFlip)
{
try
{
AddCurveToLoopInternal(curveLoop, curve, initialReverse, false);
}
catch (Exception ex)
{
if (ex.Message.Contains("not contiguous"))
{
// One last attempt to solve the problem - flip the curve loop, try again.
if (allowFlip)
{
curveLoop.Flip();
AddCurveToLoop(curveLoop, curve, initialReverse, false);
}
else
throw ex;
}
else
throw ex;
}
}