public LineNode(string label, IList<double[]> points) : base(label) { foreach (double[] p in points) Add(new Point3DEntity(this, null, p)); List<Point3D> pts = new List<Point3D>(Attributes.Count); foreach (IAttribute atr in Attributes) if (atr is Point3Attribute) pts.Add(new Point3D((atr as Point3Attribute).Value as double[])); LinearPath lp = new LinearPath(pts.ToArray(), System.Drawing.Color.Black); Length = lp.Length(); }
public LineNode(string label, double[,] points) : base(label) { for (int i = 0; i < points.GetLength(0); i++) Add(new Point3DEntity(this, points[i, 0], points[i, 1], points[i, 2])); List<Point3D> pts = new List<Point3D>(Attributes.Count); foreach (IAttribute atr in Attributes) if (atr is Point3Attribute) pts.Add(new Point3D((atr as Point3Attribute).Value as double[])); LinearPath lp = new LinearPath(pts.ToArray(), System.Drawing.Color.Black); Length = lp.Length(); }