本文整理汇总了C#中System.Edge.AsCurveFollowingFace方法的典型用法代码示例。如果您正苦于以下问题:C# Edge.AsCurveFollowingFace方法的具体用法?C# Edge.AsCurveFollowingFace怎么用?C# Edge.AsCurveFollowingFace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Edge
的用法示例。
在下文中一共展示了Edge.AsCurveFollowingFace方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FindCandidatePathEdge
/// <summary>
/// Finds candidate path edges from a side face with two edges on the profile face.
/// </summary>
/// <param name="face">The side face.</param>
/// <param name="edge0">The edge on the profile face and the side face.</param>
/// <param name="edge1">The edge on the profile face and the side face.</param>
/// <returns>The potential path edges. Should at least have two path on one face</returns>
private static List<Edge> FindCandidatePathEdge(Face face, Edge edge0, Edge edge1)
{
double vertexEps = ExporterCacheManager.Document.Application.VertexTolerance;
Curve curve0 = edge0.AsCurveFollowingFace(face);
Curve curve1 = edge1.AsCurveFollowingFace(face);
XYZ[,] endPoints = new XYZ[2, 2] { { curve0.GetEndPoint(0), curve1.GetEndPoint(1) }, { curve0.GetEndPoint(1), curve1.GetEndPoint(0) } };
List<Edge> candidatePathEdges = new List<Edge>();
EdgeArray outerEdgeLoop = face.EdgeLoops.get_Item(0);
foreach (Edge edge in outerEdgeLoop)
{
XYZ endPoint0 = edge.Evaluate(0);
XYZ endPoint1 = edge.Evaluate(1);
for (int i = 0; i < 2; i++)
{
bool found = false;
for (int j = 0; j < 2; j++)
{
if (endPoint0.IsAlmostEqualTo(endPoints[i, j], vertexEps))
{
int k = 1 - j;
if (endPoint1.IsAlmostEqualTo(endPoints[i, k], vertexEps))
{
candidatePathEdges.Add(edge);
found = true;
break;
}
}
}
if (found)
break;
}
}
return candidatePathEdges;
}