public NurbsData(List <double> knots, int degree, bool closed) { Knots = new KnotCollection(this); Knots.AddRange(knots); ControlPoints = new List <Point2D>(); Degree = degree; Closed = closed; }
public NurbsData(List <Point2D> controlPoints, List <double> knots, int degree, bool closed) { Degree = degree; Closed = closed; int num = controlPoints.Count - 2; Knots = new KnotCollection(this); if (knots[0] <= knots[1] && knots[0] <= 0) { Closed = knots[0] < 0; for (int i = degree; i < knots.Count - degree; i++) { Knots.Add(knots[i]); } } else { Knots.AddRange(knots); } ControlPoints = new List <Point2D>(controlPoints); }