public InsertCurve ( List |
||
points | List |
points compose the curve |
return | void |
/// <summary> /// create GraphicsData of given AnalyticalModel3D /// </summary> /// <param name="model">AnalyticalModel3D contains geometry data</param> /// <returns></returns> public static GraphicsData CreateGraphicsData(AnalyticalModel model) { IList <Curve> curveList = model.GetCurves(AnalyticalCurveType.ActiveCurves); if (curveList.Count > 0) { GraphicsData data = new GraphicsData(); IEnumerator <Curve> curves = curveList.GetEnumerator(); curves.Reset(); while (curves.MoveNext()) { Curve curve = curves.Current as Curve; try { List <XYZ> points = curve.Tessellate() as List <XYZ>; data.InsertCurve(points); } catch { } } data.UpdataData(); return(data); } else { throw new Exception("Can't get curves."); } }
/// <summary> /// create GraphicsData of given AnalyticalModel3D /// </summary> /// <param name="model">AnalyticalModel3D contains geometry data</param> /// <returns></returns> public static GraphicsData CreateGraphicsData(AnalyticalModel model) { IList<Curve> curveList = model.GetCurves(AnalyticalCurveType.ActiveCurves); if (curveList.Count > 0) { GraphicsData data = new GraphicsData(); IEnumerator<Curve> curves = curveList.GetEnumerator(); curves.Reset(); while (curves.MoveNext()) { Curve curve = curves.Current as Curve; try { List<XYZ> points = curve.Tessellate() as List<XYZ>; data.InsertCurve(points); } catch { } } data.UpdataData(); return data; } else { throw new Exception("Can't get curves."); } }
/// <summary> /// create GraphicsData of given AnalyticalModel3D /// </summary> /// <param name="model">AnalyticalModel3D contains geometry data</param> /// <returns></returns> public static GraphicsData CreateGraphicsData(AnalyticalElement model) { IList <Curve> curveList = new List <Curve>(); if (model is AnalyticalMember) { curveList.Add(model.GetCurve()); } else if (model is AnalyticalPanel) { curveList = (model as AnalyticalPanel).GetOuterContour().ToList(); } if (curveList.Count > 0) { GraphicsData data = new GraphicsData(); IEnumerator <Curve> curves = curveList.GetEnumerator(); curves.Reset(); while (curves.MoveNext()) { Curve curve = curves.Current as Curve; try { List <XYZ> points = curve.Tessellate() as List <XYZ>; data.InsertCurve(points); } catch { } } data.UpdataData(); return(data); } else { throw new Exception("Can't get curves."); } }