Пример #1
0
        public static Circle FromList(List <double> list)
        {
            var circle = new Circle();

            circle.radius = list[2];
            circle.domain = new Interval(list[3], list[4]);
            circle.plane  = Plane.FromList(list.GetRange(5, 13));
            circle.units  = Units.GetUnitFromEncoding(list[list.Count - 1]);

            return(circle);
        }
Пример #2
0
        public static Ellipse FromList(List <double> list)
        {
            var ellipse = new Ellipse();

            ellipse.firstRadius  = list[2];
            ellipse.secondRadius = list[3];
            ellipse.domain       = new Interval(list[4], list[5]);

            ellipse.plane = Plane.FromList(list.GetRange(6, 13));
            ellipse.units = Units.GetUnitFromEncoding(list[list.Count - 1]);
            return(ellipse);
        }
Пример #3
0
        public static Arc FromList(List <double> list)
        {
            var arc = new Arc();

            arc.radius       = list[2];
            arc.startAngle   = list[3];
            arc.endAngle     = list[4];
            arc.angleRadians = list[5];
            arc.domain       = new Interval(list[6], list[7]);
            arc.units        = Units.GetUnitFromEncoding(list[list.Count - 1]);
            arc.plane        = Plane.FromList(list.GetRange(8, 13));
            arc.startPoint   = Point.FromList(list.GetRange(21, 3), arc.units);
            arc.midPoint     = Point.FromList(list.GetRange(24, 3), arc.units);
            arc.endPoint     = Point.FromList(list.GetRange(27, 3), arc.units);
            arc.plane.units  = arc.units;

            return(arc);
        }