本文整理匯總了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;
}