Exemplo n.º 1
0
        private void Window_Initialized(object sender, EventArgs e)
        {
            Model = new StuartPlatform(16.5, 16.5, 100.0, 10.0, 28.5, 35.0);
            Model.Move(new Tools.Math.Vector3D(0, 0, 30));

            T1 = (Model.WorkPlatform.Joints[0].Position - Model.BasePlatform.Joints[0].Position) * 0.5 + Model.BasePlatform.Joints[0].Position;
            OnPropertyChanged("Model");
        }
Exemplo n.º 2
0
        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            System.Windows.Media.Media3D.Point3D result = new System.Windows.Media.Media3D.Point3D();

            if (values != null)
            {
                if (values.Count() == 3)
                {
                    if (values[0] == null || values[1] == null || !double.TryParse(values[2].ToString(), out double scale))
                    {
                        return(result);
                    }
                    Tools.Math.Vector3D origin    = (Tools.Math.Vector3D)values[0];
                    Tools.Math.Vector3D direction = (Tools.Math.Vector3D)values[1];

                    var t = (direction - origin) * scale + origin;
                    result = new System.Windows.Media.Media3D.Point3D(t.X, t.Y, t.Z);
                }
            }

            return(result);
        }