本文整理汇总了C#中XYZ.Negate方法的典型用法代码示例。如果您正苦于以下问题:C# XYZ.Negate方法的具体用法?C# XYZ.Negate怎么用?C# XYZ.Negate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XYZ
的用法示例。
在下文中一共展示了XYZ.Negate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsLoopValid
private static bool IsLoopValid(//double minOpeningValue,
Face f, XYZ faceNormal,
XYZ loopNormal, double loopArea)
{
return loopArea < f.Area &&
//loopArea < (minOpeningValue) &&
(loopNormal.IsAlmostEqualTo(faceNormal)
|| loopNormal.Negate().IsAlmostEqualTo(faceNormal));
}
示例2: IsLoopOpen
private static bool IsLoopOpen(Wall wall, List<XYZ> loop,
XYZ loopNormal)
{
XYZ rayDirection = loopNormal.Negate();
XYZ rayOrigin = GetCenterOfPolygon(loop).
Add(rayDirection.Multiply(wall.Width).Negate());
// Let check if this loop is really an opening
ReferenceArray elementsOnTheOpening = wall.
Document.FindReferencesByDirection(rayOrigin,
rayDirection, (View3D)wall.Document.ActiveView);
Reference closestReference =
FindClosestReference(elementsOnTheOpening);
// If there is nothing on the direction
// or the closest element if more far than the wall width
// then the loop is a 'full' profile opening
bool loopIsOpen =
(closestReference == null ||
closestReference.Element.Id.IntegerValue !=
wall.Id.IntegerValue);
return loopIsOpen;
}