本文整理匯總了C#中System.Edge.AsCurve方法的典型用法代碼示例。如果您正苦於以下問題:C# Edge.AsCurve方法的具體用法?C# Edge.AsCurve怎麽用?C# Edge.AsCurve使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Edge
的用法示例。
在下文中一共展示了Edge.AsCurve方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Stream
private void Stream(ArrayList data, Edge edge)
{
data.Add(new Snoop.Data.ClassSeparator(typeof(Edge)));
// Curve Type
{
string curveType = "None";
if (edge.AsCurve() != null)
{
Curve crv = edge.AsCurve();
if (crv is Arc)
curveType = "Arc";
else if (crv is CylindricalHelix)
curveType = "CylindricalHelix";
else if (crv is Ellipse)
curveType = "Ellipse";
else if (crv is HermiteSpline)
curveType = "HermiteSpline";
else if (crv is Line)
curveType = "Line";
else if (crv is NurbSpline)
curveType = "NurbSpline";
}
data.Add(new Snoop.Data.String("Curve Type", curveType));
}
try
{
data.Add(new Snoop.Data.Object("Curve", edge.AsCurve()));
}
catch (System.Exception ex)
{
data.Add(new Snoop.Data.Exception("Curve", ex));
}
try
{
data.Add(new Snoop.Data.Object("Start point reference", edge.GetEndPointReference(0)));
}
catch (System.Exception ex)
{
data.Add(new Snoop.Data.Exception("Start point reference", ex));
}
try
{
data.Add(new Snoop.Data.Object("End point reference", edge.GetEndPointReference(1)));
}
catch (System.Exception ex)
{
data.Add(new Snoop.Data.Exception("End point reference", ex));
}
data.Add(new Snoop.Data.Object("Reference", edge.Reference));
data.Add(new Snoop.Data.Double("Approximate length", edge.ApproximateLength));
data.Add(new Snoop.Data.Object("Face [0]", edge.GetFace(0)));
data.Add(new Snoop.Data.Object("Face [1]", edge.GetFace(1)));
data.Add(new Snoop.Data.CategorySeparator("Tesselated Points"));
System.Collections.Generic.IList<XYZ> pts = edge.Tessellate();
int i = 0;
foreach (XYZ pt in pts)
{
data.Add(new Snoop.Data.Xyz(string.Format("PT [{0:d}]", i++), pt));
}
// TBD: not sure how to use these yet...
// TesselateOnFace ??
}