private static PointN[] ToPointArray(gView.Framework.Geometry.IPointCollection pointCollection, bool closeIt) { List <PointN> pColl = new List <PointN>(); if (pointCollection != null) { for (int i = 0; i < pointCollection.PointCount; i++) { pColl.Add(ToPoint(pointCollection[i])); } } if (closeIt && pColl.Count > 2) { if (Math.Abs(pColl[0].X - pColl[pColl.Count - 1].X) > double.Epsilon || Math.Abs(pColl[0].Y - pColl[pColl.Count - 1].Y) > double.Epsilon || Math.Abs(pColl[0].Z - pColl[pColl.Count - 1].Z) > double.Epsilon) { pColl.Add(ToPoint(new gView.Framework.Geometry.Point( pColl[0].X, pColl[0].Y, pColl[0].Z))); } } return(pColl.ToArray()); }
private static PointN[] ToPointArray(gView.Framework.Geometry.IPointCollection pointCollection) { return(ToPointArray(pointCollection, false)); }