public static Point3D Rot(this Point3D v, RotationInfo ri)
        {
            switch (char.ToUpper(ri.Axis))
            {
            case 'X': return(v.RotX(ri.Value));

            case 'Y': return(v.RotY(ri.Value));

            case 'Z': return(v.RotZ(ri.Value));

            default: return(v);
            }
        }
        private void AddRotationControl(RotationInfo ri)
        {
            var DockPanel = new DockPanel()
            {
                Tag = ri
            };
            var Label = new Label()
            {
                MinWidth = 30
            };

            Label.Content = ri.Axis;
            var ctm = new ContextMenu();
            var rm  = new MenuItem();

            rm.Header = "Remove";
            rm.Tag    = DockPanel;
            rm.Click += RotationSlider_Remove;
            ctm.Items.Add(rm);
            DockPanel.ContextMenu = ctm;
            DockPanel.SetDock(Label, Dock.Left);
            var Slider = new Slider()
            {
                Maximum             = 100,
                TickPlacement       = System.Windows.Controls.Primitives.TickPlacement.BottomRight,
                TickFrequency       = 5,
                Focusable           = false,
                IsSnapToTickEnabled = true,
                Tag = ri
            };

            Slider.ValueChanged += RotationSlider_ValueChanged;
            DockPanel.Children.Add(Label);
            DockPanel.Children.Add(Slider);
            Rotations.Add(ri);
            RotationsList.Children.Add(DockPanel);
        }