Beispiel #1
0
        private void LoadButton_Click(object sender, EventArgs e)
        {
            OpenFileDialog dialog = new OpenFileDialog();

            dialog.Filter = "XML file | *.xml";
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                var serializer = new XmlSerializer(typeof(List <Point>));
                using (var stream = File.OpenRead(dialog.FileName))
                {
                    var points = (List <Point>)(serializer.Deserialize(stream));
                    ControlPoints.Clear();
                    foreach (Point p in points)
                    {
                        ControlPoints.Add(new Vertex(p.X, p.Y));
                    }

                    Start       = ControlPoints[0];
                    End         = ControlPoints[ControlPoints.Count - 1];
                    Start.Size  = 11;
                    End.Size    = 11;
                    Start.Color = Color.DarkRed;
                    End.Color   = Color.DarkRed;
                    RefreshCanvas();
                }
            }
        }
        /// <summary>
        /// Adds the given point to the shape.
        /// </summary>
        /// <param name="point">The new <c>SKPoint</c> to add.</param>
        public void AddPoint(SKPoint point)
        {
            // is this the first point added?
            if (Points.Count > 0)
            {
                // No, grab first point
                var firstPoint = Points[0];

                // Is the new point within five pixels of the first point?
                if (point.X > (firstPoint.X - 5) && point.X < (firstPoint.X + 5) &&
                    point.Y > (firstPoint.Y - 5) && point.Y < (firstPoint.Y + 5))
                {
                    // Yes, close the shape and complete editing
                    point = firstPoint;
                    State = KimonoShapeState.Finalizing;
                }
            }

            // Add point and recalculate bounds
            Points.Add(point);
            RecalculateVectorBounds();

            // Are we in the editing mode?
            if (State == KimonoShapeState.Editing || State == KimonoShapeState.Finalizing)
            {
                // Add a new drag handle for the new point
                ControlPoints.Add(new KimonoHandle(point.X - KimonoHandle.DrawOffset, point.Y - KimonoHandle.DrawOffset));
            }
        }
Beispiel #3
0
        protected override DxfEntity PostParse()
        {
            Debug.Assert((_controlPointX.Count == _controlPointY.Count) && (_controlPointX.Count == _controlPointZ.Count));
            for (int i = 0; i < _controlPointX.Count; i++)
            {
                var weight = _controlPointX.Count == _weights.Count ? _weights[i] : 1.0;
                ControlPoints.Add(new DxfControlPoint(new DxfPoint(_controlPointX[i], _controlPointY[i], _controlPointZ[i]), weight));
            }

            _controlPointX.Clear();
            _controlPointY.Clear();
            _controlPointZ.Clear();

            Debug.Assert((_fitPointX.Count == _fitPointY.Count) && (_fitPointX.Count == _fitPointZ.Count));
            for (int i = 0; i < _fitPointX.Count; i++)
            {
                FitPoints.Add(new DxfPoint(_fitPointX[i], _fitPointY[i], _fitPointZ[i]));
            }

            _fitPointX.Clear();
            _fitPointY.Clear();
            _fitPointZ.Clear();

            return(this);
        }
        /// <summary>
        /// Adds the handles for the given bezier point.
        /// </summary>
        /// <param name="index">The index of the <c>KimonoBezierPoint</c> that handles are
        /// being created for.</param>
        /// <param name="bezierPoint">The <c>KimonoBezierPoint</c> that is getting handles.</param>
        public void AddHandlesForPoint(int index, KimonoBezierPoint bezierPoint)
        {
            // Add new control point handle
            var controlPoint = new KimonoHandle(bezierPoint.ControlPoint.X - KimonoHandle.DrawOffset,
                                                bezierPoint.ControlPoint.Y - KimonoHandle.DrawOffset)
            {
                Index      = index,
                HandleType = KimonoHandleType.BezierControlPoint
            };

            controlPoint.Moved += (pt) =>
            {
                // Move attached point
                Points[controlPoint.Index].ControlPoint = pt;
            };
            ControlPoints.Add(controlPoint);

            // Add new end point handle
            var endPoint = new KimonoHandle(bezierPoint.EndPoint.X - KimonoHandle.DrawOffset,
                                            bezierPoint.EndPoint.Y - KimonoHandle.DrawOffset)
            {
                Index = index
            };

            endPoint.Moved += (pt) =>
            {
                // Move attached point
                Points[endPoint.Index].EndPoint = pt;
            };
            ControlPoints.Add(endPoint);
        }
        public void Interpolate(List <Vector2> segmentPoints, float curvatureScale)
        {
            ControlPoints.Clear();

            if (segmentPoints.Count == 0)
            {
                segmentPoints.Add(Vector2.zero);
            }

            if (segmentPoints.Count == 1)
            {
                segmentPoints.Add(segmentPoints[0]);
            }

            Vector3 p0;
            Vector3 p1;
            Vector3 p2;
            Vector3 q0;
            Vector3 q1;
            Vector3 tangent;

            for (int i = 0; i < segmentPoints.Count; i++)
            {
                if (i == 0)
                {
                    p1      = segmentPoints[i];
                    p2      = segmentPoints[i + 1];
                    tangent = (p2 - p1);
                    q1      = p1 + curvatureScale * tangent;

                    ControlPoints.Add(p1);
                    ControlPoints.Add(q1);
                }
                else if (i == segmentPoints.Count - 1)
                {
                    p0      = segmentPoints[i - 1];
                    p1      = segmentPoints[i];
                    tangent = (p1 - p0);
                    q0      = p1 - curvatureScale * tangent;

                    ControlPoints.Add(q0);
                    ControlPoints.Add(p1);
                }
                else
                {
                    p0      = segmentPoints[i - 1];
                    p1      = segmentPoints[i];
                    p2      = segmentPoints[i + 1];
                    tangent = (p2 - p0).normalized;
                    q0      = p1 - curvatureScale * tangent * (p1 - p0).magnitude;
                    q1      = p1 + curvatureScale * tangent * (p2 - p1).magnitude;

                    ControlPoints.Add(q0);
                    ControlPoints.Add(p1);
                    ControlPoints.Add(q1);
                }
            }

            CurveCount = (ControlPoints.Count - 1) / 3;
        }
Beispiel #6
0
            public override void GenerateControlPoints(OpenGL gl)
            {
                Point point1 = new Point(Start.X, Start.Y);
                Point point2 = new Point(End.X, End.Y);

                ControlPoints.Add(point1);
                ControlPoints.Add(point2);
            }
 public TestPattern(Vector2 startPosition, float speed) : base(startPosition, speed)
 {
     ControlPoints.Add(new Vector2(75, 300));
     ControlPoints.Add(new Vector2(400, 200));
     ControlPoints.Add(new Vector2(400, 400));
     ControlPoints.Add(new Vector2(100, 100));
     ControlPoints.Add(new Vector2(500, 600));
     ControlPoints.Add(new Vector2(500, 600));
 }
Beispiel #8
0
        public ControlPoint AddControlPoint(Point point)
        {
            var controlPoint = new ControlPoint(ControlPoints.Count + 1, point);

            ControlPoints.Add(controlPoint);

            CalculateCurve();

            return(controlPoint);
        }
Beispiel #9
0
        //--------------------------------------------------------------------------
        public GraphNodeDataLink(GraphReferenceItem item) : base(item)
        {
            LinkNoEvent = GraphReferenceItem.WrappedItem?.GraphNode;

            GraphReferenceItem.PropertyChanged += (e, args) =>
            {
                if (args.PropertyName == "WrappedItem")
                {
                    Link = GraphReferenceItem.WrappedItem?.GraphNode;
                }
                else if (args.PropertyName == "TextBrush")
                {
                    RaisePropertyChangedEvent("FontBrush");
                }
                else if (args.PropertyName == "Name")
                {
                    RaisePropertyChangedEvent("Title");
                }
                else if (args.PropertyName == "IsVisible")
                {
                    RaisePropertyChangedEvent("Link");
                }
            };

            if (GraphReferenceItem.Parent is StructItem && GraphReferenceItem.ReferenceDef.UseParentDescription)
            {
                GraphReferenceItem.Parent.PropertyChanged += (e, args) =>
                {
                    if (args.PropertyName == "Description")
                    {
                        RaisePropertyChangedEvent("Title");
                    }
                    else if (args.PropertyName == "TextBrush")
                    {
                        RaisePropertyChangedEvent("FontBrush");
                    }
                };
            }

            foreach (var controlPoint in GraphReferenceItem.ControlPoints)
            {
                ControlPoints.Add(new LinkControlPoint(this, controlPoint));
            }

            PropertyChanged += (e, args) =>
            {
                if (args.PropertyName == "Node")
                {
                    if (Link != null)
                    {
                        Link.ParentNodes.Add(Node);
                    }
                }
            };
        }
Beispiel #10
0
        public Bezier(Point2D P0, Point2D P1, Point2D P2, Point2D P3, Point2D P4, Color color)
            : base(color)
        {
            Degree = 4;

            ControlPoints.Add(P0);
            ControlPoints.Add(P1);
            ControlPoints.Add(P2);
            ControlPoints.Add(P3);
            ControlPoints.Add(P4);
        }
Beispiel #11
0
 public void FromX(XElement xe)
 {
     Closed = bool.Parse(xe.Attribute("Closed").Value);
     Degree = 3;
     ControlPoints.Clear();
     foreach (var pt in xe.Element("ControlPoints").Elements())
     {
         ControlPoints.Add(XParser.Parse <Point2D>(pt));
     }
     Knots.FromX(xe.Element("Knots"));
 }
Beispiel #12
0
    /// <summary>
    /// Appends a Bézier segment after last segment.
    /// Automatically calculates intermediate tangents.
    /// </summary>
    /// <param name="anchorPos">Position of new anchor point. </param>
    public void AddSegment(Vector3 anchorPos)
    {
        // Intermediate control points
        Vector3 firstTangent  = 2 * ControlPoints[CountPoints - 1] - ControlPoints[CountPoints - 2];
        Vector3 secondTangent = anchorPos + (firstTangent - anchorPos) * 0.5f;

        // Adding points to list
        ControlPoints.Add(firstTangent);
        ControlPoints.Add(secondTangent);
        ControlPoints.Add(anchorPos);
    }
Beispiel #13
0
        /// <summary>
        /// Adds a control point to the curve.
        /// </summary>
        /// <param name="input">The curves input value.</param>
        public void Add(double input)
        {
            if (!ControlPoints.Contains(input))
            {
                ControlPoints.Add(input);
            }

            ControlPoints.Sort(delegate(double lhs, double rhs)
            {
                return(lhs.CompareTo(rhs));
            });
        }
Beispiel #14
0
            public virtual void ReadChildData(BinaryReader reader)
            {
                int x = 0;

                for (x = 0; (x < _controlPoints.Count); x = (x + 1))
                {
                    ControlPoints.Add(new CameraTrackControlPointBlockBlock());
                    ControlPoints[x].Read(reader);
                }
                for (x = 0; (x < _controlPoints.Count); x = (x + 1))
                {
                    ControlPoints[x].ReadChildData(reader);
                }
            }
Beispiel #15
0
        public BSpline(Point2D P0, Point2D P1, Point2D P2, Point2D P3, Point2D P4, Point2D P5, Color color)
            : base(color)
        {
            Degree = 3;

            ControlPoints.Add(P0);
            ControlPoints.Add(P1);
            ControlPoints.Add(P2);
            ControlPoints.Add(P3);
            ControlPoints.Add(P4);
            ControlPoints.Add(P5);

            Knots = new float[] { 0, 0, 0, 0, 1 / 3f, 2 / 3f, 1, 1, 1, 1 };
        }
Beispiel #16
0
        public PathPoint(dynamic bymlNode)
        {
            if (bymlNode is Dictionary <string, dynamic> )
            {
                Prop = (Dictionary <string, dynamic>)bymlNode;
            }
            else
            {
                throw new Exception("Not a dictionary");
            }

            foreach (var point in this["ControlPoints"])
            {
                ControlPoints.Add(new BaseControlPoint(point));
            }
        }
Beispiel #17
0
        /// <summary>
        /// Re-creates the control points of the scene view and references their
        /// drag point data.
        /// </summary>
        private void RebuildControlPoints()
        {
            ControlPoints.Clear();

            for (var i = 0; i < DragPointEditable.GetDragPoints().Length; ++i)
            {
                var cp = new ControlPoint(
                    DragPointEditable.GetDragPoints()[i],
                    GUIUtility.GetControlID(FocusType.Passive),
                    i,
                    DragPointEditable.GetDragPoints().Length >= 2 ? (float)i / (DragPointEditable.GetDragPoints().Length - 1) : 0.0f
                    );
                ControlPoints.Add(cp);
            }

            CurveTravellerControlId = GUIUtility.GetControlID(FocusType.Passive);
        }
Beispiel #18
0
 private void _path_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     if (e.ClickCount == 2)
     {
         if (EndPoints == null)
         {
             EndPoints = new List <ThumbPoint>();
         }
         var point  = e.GetPosition(_canvas);
         var tpoint = new ThumbPoint(point);
         tpoint.DragDelta     += Thumb_DragDelta;
         tpoint.DragCompleted += Item_DragCompleted;
         _canvas.Children.Add(tpoint);
         EndPoints.Add(tpoint);
         ControlPoints.Add(tpoint);
         OrderControlPoints();
     }
 }
Beispiel #19
0
            public override void GenerateControlPoints(OpenGL gl)
            {
                int stepX = Math.Abs(End.X - Start.X) / 2;
                int stepY = Math.Abs(End.Y - Start.Y) / 2;

                for (int i = -1; i <= 1; i++)
                {
                    for (int j = -1; j <= 1; j++)
                    {
                        if (i == 0 && j == 0)
                        {
                            continue;
                        }
                        Point point = new Point(Xc + j * stepX, Yc + i * stepY);
                        ControlPoints.Add(point);
                    }
                }
            }
Beispiel #20
0
        public Form1()
        {
            InitializeComponent();
            Bitmap bitmap = new Bitmap(BitmapCanvas.Width, BitmapCanvas.Height);

            BitmapCanvas.Image = bitmap;
            image          = new Bitmap(Project3.Properties.Resources.check);
            thumbnail      = new Bitmap(image, new Size(50, 50));
            grayscaleImage = new Bitmap(image);
            for (int x = 0; x < grayscaleImage.Width; x++)
            {
                for (int y = 0; y < grayscaleImage.Height; y++)
                {
                    Color color     = grayscaleImage.GetPixel(x, y);
                    int   grayScale = (int)((color.R * 0.3) + (color.G * 0.59) + (color.B * 0.11));
                    Color newColor  = Color.FromArgb(color.A, grayScale, grayScale, grayScale);
                    grayscaleImage.SetPixel(x, y, newColor);
                }
            }
            grayscaleThumbnail = new Bitmap(grayscaleImage, new Size(50, 50));

            ImageBox.Image = thumbnail;
            ImageBox.Refresh();

            Start.Position = new Vector2(BitmapCanvas.Width / 5, BitmapCanvas.Height / 2);
            Start.Size     = 11;
            End.Size       = 11;
            End.Position   = new Vector2(4 * BitmapCanvas.Width / 5, BitmapCanvas.Height / 2 + 1);
            Start.Color    = Color.DarkRed;
            End.Color      = Color.DarkRed;

            ControlPoints.Add(Start);
            ControlPoints.Add(End);


            timer          = new Timer();
            timer.Interval = 16;
            timer.Tick    += Timer_Tick;
            GeneratePoints(null, null);
            ControlPoints[1].Position = new Vector2(ControlPoints[1].Position.X, ControlPoints[1].Position.Y - BitmapCanvas.Height / 3);
            ControlPoints[3].Position = new Vector2(ControlPoints[3].Position.X, ControlPoints[3].Position.Y + BitmapCanvas.Height / 3);
            CalculateBezier();
            RefreshCanvas();
        }
        /// <summary>
        /// Places the shape into the editing mode where the user can adjust the individual data points
        /// that define the shape.
        /// </summary>
        public override void StartEditing()
        {
            base.StartEditing();

            // Add the required control points
            ControlPoints.Clear();
            for (int n = 0; n < Points.Count; ++n)
            {
                var point  = Points[n];
                var handle = new KimonoHandle(point.X - KimonoHandle.DrawOffset, point.Y - KimonoHandle.DrawOffset);
                handle.Index  = n;
                handle.Moved += (pt) =>
                {
                    // Move attached point
                    Points[handle.Index] = pt;
                };
                ControlPoints.Add(handle);
            }
        }
Beispiel #22
0
 private void _canvas_MouseUp(object sender, MouseButtonEventArgs e)
 {
     if (e.ClickCount == 2)
     {
         var point = e.GetPosition(_canvas);
         int n     = Points.Where(p => Math.Abs(p.X - point.X) < 2 && Math.Abs(p.Y - point.Y) < 2).Count();
         if (n > 0)
         {
             return;
         }
         var thumb = new ThumbPoint(point);
         thumb.DragDelta     += Thumb_DragDelta;
         thumb.DragCompleted += Item_DragCompleted;
         ControlPoints.Add(thumb);
         _canvas.Children.Add(thumb);
         OrderControlPoints();
         GetBezierApproximation();
     }
 }
Beispiel #23
0
        private void GeneratePoints(object sender, EventArgs e)
        {
            int   count = (int)PointCounter.Value;
            float hx    = (End.X - Start.X) / (float)(count - 1);
            float hy    = (End.Y - Start.Y) / (float)(count - 1);
            float X     = Start.X;
            float Y     = Start.Y;

            ControlPoints.Clear();
            ControlPoints.Add(Start);
            for (int i = 1; i < count - 1; i++)
            {
                X += hx;
                Y += hy;
                ControlPoints.Add(new Vertex((int)X, (int)Y));
            }
            ControlPoints.Add(End);
            CalculateBezier();
            RefreshCanvas();
        }
Beispiel #24
0
        protected override void OnNodeSet()
        {
            base.OnNodeSet();
            if (ControlPoints.Count == 0)
            {
                IControlPoint p0 = CreateControlPoint();
                p0.Translation = new Vec3F(-1f, 0, 0);
                ControlPoints.Add(p0);
            }

            if (ControlPoints.Count < 2)
            {
                IControlPoint p1 = CreateControlPoint();
                p1.Translation = new Vec3F(1, 0, 0);
                ControlPoints.Add(p1);
            }
            TransformationType = TransformationTypes.Translation;

            DomNode.ChildInserted += DomNode_HierarchyChanged;
            DomNode.ChildRemoved  += DomNode_HierarchyChanged;
        }
        internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder)
        {
            int index = 0;
            var k     = Integer(parameters, index++); // upper index of sum
            var m     = Integer(parameters, index++); // degree of basis functions

            IsPlanar     = Boolean(parameters, index++);
            IsClosed     = Boolean(parameters, index++);
            IsPolynomial = Boolean(parameters, index++);
            IsPeriodic   = Boolean(parameters, index++);
            var n = 1 + k - m;
            var a = n + 2 * m;

            for (int i = 0; i < a + 1; i++)
            {
                KnotValues.Add(Double(parameters, index++));
            }

            for (int i = 0; i < k + 1; i++)
            {
                Weights.Add(Double(parameters, index++));
            }

            for (int i = 0; i < k + 1; i++)
            {
                var x = Double(parameters, index++);
                var y = Double(parameters, index++);
                var z = Double(parameters, index++);
                ControlPoints.Add(new IgesPoint(x, y, z));
            }

            StartParameter = Double(parameters, index++);
            EndParameter   = Double(parameters, index++);
            Normal         = IsPlanar
                ? new IgesVector(Double(parameters, index++), Double(parameters, index++), Double(parameters, index++))
                : IgesVector.ZAxis;

            return(index);
        }
Beispiel #26
0
            public override void GenerateControlPoints(OpenGL gl)
            {
                base.GenerateControlPoints(gl);
                int step = (End.X - Start.X) / 2; // step = r

                // center coordinate
                int xc = (Start.X + End.X) / 2;
                int yc = End.Y;

                for (int i = -1; i < 2; i++)
                {
                    for (int j = -1; j < 2; j++)
                    {
                        if (i == 0 && j == 0)
                        {
                            continue;
                        }
                        Point point = new Point(xc + j * step, gl.RenderContextProvider.Height - yc - i * step);
                        ControlPoints.Add(point);
                    }
                }
            }
        /// <summary>
        /// Re-creates the control points of the scene view and references their
        /// drag point data.
        /// </summary>
        private void RebuildControlPoints()
        {
            ControlPoints.Clear();
            var dragPoints = DragPointInspector.DragPoints;

            for (var i = 0; i < dragPoints.Length; ++i)
            {
                var cp = new ControlPoint(
                    dragPoints[i],
                    GUIUtility.GetControlID(FocusType.Passive),
                    i,
                    dragPoints.Length > 1
                                                ? (float)i / (dragPoints.Length - 1)
                                                : 0.0f
                    );
                ControlPoints.Add(cp);
            }
            CurveTravellerControlId = GUIUtility.GetControlID(FocusType.Passive);

            // persist prefab changes
            EditorUtility.SetDirty(MainComponent.gameObject);
            PrefabUtility.RecordPrefabInstancePropertyModifications(MainComponent as Object);
        }
Beispiel #28
0
 public void AddControlPoint(Point2D point)
 {
     ControlPoints.Add(point);
 }
Beispiel #29
0
        public void SetPatternType(int size, Size count, int[] xList, bool keepCorners)
        {
            _patternSize  = size;
            _patternCount = count;

            var eckenVorher = ControlPoints.Where(c => c.ControlPointType == ControlPointType.IsEcke).ToArray();

            ControlPoints.Clear();
            BoundingControlPoints.Clear();
            Enumerable.Range(0, count.Width * count.Height).ToList().ForEach(p => ControlPoints.Add(new ControlPoint()));

            var dy = _resolution.Height / (count.Height - 1);
            var y  = 0;

            for (var i = 0; i < ControlPoints.Count; i++)
            {
                if (i > 0 && i % count.Width == 0)
                {
                    y += dy;
                    if (y >= _resolution.Height)
                    {
                        y = _resolution.Height - 1;
                    }
                }
                ControlPoints[i].Y = ControlPoints[i].V = y;
            }

            for (var iy = 0; iy < count.Height; iy++)
            {
                for (var ix = 0; ix < count.Width; ix++)
                {
                    var index = iy * count.Width + ix;
                    ControlPoints[index].X = ControlPoints[index].U = xList[ix];
                }
            }

            BoundingControlPoints.AddRange(ControlPoints.Take(count.Width));
            for (var iy = 1; iy < count.Height; iy++)
            {
                BoundingControlPoints.Add(ControlPoints[iy * count.Width + (count.Width - 1)]);
            }
            for (var ix = 1; ix < count.Width - 1; ix++)
            {
                BoundingControlPoints.Add(ControlPoints[count.Height * count.Width - ix - 1]);
            }
            for (var iy = count.Height - 1; iy > 0; iy--)
            {
                BoundingControlPoints.Add(ControlPoints[iy * count.Width]);
            }

            ControlPoints[0].ControlPointType = ControlPointType.IsEcke;
            ControlPoints[count.Width - 1].ControlPointType = ControlPointType.IsEcke;
            ControlPoints[count.Width * (count.Height - 1)].ControlPointType = ControlPointType.IsEcke;
            ControlPoints[count.Width * count.Height - 1].ControlPointType   = ControlPointType.IsEcke;

            foreach (var cp in BlacklevelControlPoints)
            {
                cp.X = cp.U;
                cp.Y = cp.V;
            }

            if (keepCorners && eckenVorher.Any())
            {
                var ecken = ControlPoints.Where(c => c.ControlPointType == ControlPointType.IsEcke).ToArray();
                for (var i = 0; i < eckenVorher.Length; i++)
                {
                    ecken[i].X = eckenVorher[i].X;
                    ecken[i].Y = eckenVorher[i].Y;
                }
            }
            Interpolate(ControlPoints);

            MakeTriangleStrip();
            DetermineControlPointDirections();
        }
Beispiel #30
0
            internal override bool TrySetPair(DxfCodePair pair)
            {
                switch (pair.Code)
                {
                case 94:
                    Degree = pair.IntegerValue;
                    break;

                case 73:
                    IsRational = BoolShort(pair.ShortValue);
                    break;

                case 74:
                    IsPeriodic = BoolShort(pair.ShortValue);
                    break;

                case 95:
                    var _knotCount = pair.IntegerValue;
                    break;

                case 96:
                    var _controlPointCount = pair.IntegerValue;
                    break;

                case 40:
                    Knots.Add(pair.DoubleValue);
                    break;

                case 10:
                    ControlPoints.Add(new DxfControlPoint(new DxfPoint(pair.DoubleValue, 0.0, 0.0)));
                    break;

                case 20:
                    ControlPoints[ControlPoints.Count - 1] = new DxfControlPoint(ControlPoints[ControlPoints.Count - 1].Point.WithUpdatedY(pair.DoubleValue));
                    break;

                case 42:
                    ControlPoints[_currentWeight] = new DxfControlPoint(ControlPoints[_currentWeight].Point, pair.DoubleValue);
                    _currentWeight++;
                    break;

                case 97:
                    var _fitPointCount = pair.IntegerValue;
                    break;

                case 11:
                    FitPoints.Add(new DxfPoint(pair.DoubleValue, 0.0, 0.0));
                    break;

                case 21:
                    FitPoints[FitPoints.Count - 1] = FitPoints[FitPoints.Count - 1].WithUpdatedY(pair.DoubleValue);
                    break;

                case 12:
                    StartTangent = StartTangent.WithUpdatedX(pair.DoubleValue);
                    break;

                case 22:
                    StartTangent = StartTangent.WithUpdatedY(pair.DoubleValue);
                    break;

                case 13:
                    EndTangent = EndTangent.WithUpdatedX(pair.DoubleValue);
                    break;

                case 23:
                    EndTangent = EndTangent.WithUpdatedY(pair.DoubleValue);
                    break;

                default:
                    return(false);
                }

                return(true);
            }