Example #1
0
        private List <ParamsString> FillParamsList(AbstractTransformation transformation)
        {
            var resultList = new List <ParamsString>
            {
                new ParamsString("dX, м", transformation.DeltaCoordinateMatrix.Dx.ToString("F5")),
                new ParamsString("dY, м", transformation.DeltaCoordinateMatrix.Dy.ToString("F5")),
                new ParamsString("dZ, м", transformation.DeltaCoordinateMatrix.Dz.ToString("F5")),
                new ParamsString("wX, rad", transformation.RotationMatrix.Wx.ToString("F15")),
                new ParamsString("wY, rad", transformation.RotationMatrix.Wy.ToString("F15")),
                new ParamsString("wZ, rad", transformation.RotationMatrix.Wz.ToString("F15")),
                new ParamsString("M, [-]", transformation.M.ToString("F15"))
            };

            return(resultList);
        }
Example #2
0
        public static bool TryParse(string transformation, out AbstractTransformation res)
        {
            switch (transformation)
            {
            case "":
                res = IndentityTransformation.Instance;
                return(true);

            case "-X":
                res = IndentityTransformation.Instance;
                return(true);

            case "-X-X":
                res = IndentityTransformation.Instance;
                return(true);

            case "-X-X-Z":
                res = IndentityTransformation.Instance;
                return(true);

            case "-X-Z":
                res = IndentityTransformation.Instance;
                return(true);

            case "-X-Z-Z":
                res = IndentityTransformation.Instance;
                return(true);

            case "-XZ":
                res = IndentityTransformation.Instance;
                return(true);

            case "-Y":
                res = IndentityTransformation.Instance;
                return(true);

            case "-Y-Y":
                res = IndentityTransformation.Instance;
                return(true);

            case "-Y-Y-Z":
                res = IndentityTransformation.Instance;
                return(true);

            case "-Y-Z":
                res = IndentityTransformation.Instance;
                return(true);

            case "-Y-Z-Z":
                res = IndentityTransformation.Instance;
                return(true);

            case "-YZ":
                res = IndentityTransformation.Instance;
                return(true);

            case "-Z":
                res = IndentityTransformation.Instance;
                return(true);

            case "-Z-Z":
                res = IndentityTransformation.Instance;
                return(true);

            case "X":
                res = IndentityTransformation.Instance;
                return(true);

            case "X-Z":
                res = IndentityTransformation.Instance;
                return(true);

            case "X-Z-Z":
                res = IndentityTransformation.Instance;
                return(true);

            case "XZ":
                res = IndentityTransformation.Instance;
                return(true);

            case "Y":
                res = IndentityTransformation.Instance;
                return(true);

            case "Y-Z":
                res = IndentityTransformation.Instance;
                return(true);

            case "Y-Z-Z":
                res = IndentityTransformation.Instance;
                return(true);

            case "YZ":
                res = IndentityTransformation.Instance;
                return(true);

            case "Z":
                res = IndentityTransformation.Instance;
                return(true);

            case "Z-Z":
                res = IndentityTransformation.Instance;
                return(true);

            default:
                res = IndentityTransformation.Instance;
                return(false);
            }
        }