Esempio n. 1
0
 public NurbsData(List <double> knots, int degree, bool closed)
 {
     Knots = new KnotCollection(this);
     Knots.AddRange(knots);
     ControlPoints = new List <Point2D>();
     Degree        = degree;
     Closed        = closed;
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public NurbsData()
 {
     Knots         = new KnotCollection(this);
     ControlPoints = new List <Point2D>();
 }