Пример #1
0
        public static void TestGeometricTransforms()
        {
            // get geometric properties of a reference object (e.g. BOX_01)
            Matrix3D tr_WC2LC, tr_LC2WC;

            GeometricTransforms.ComputePCATransf(GeometricTransforms.BOX_01, out tr_WC2LC, out tr_LC2WC);
            List <Point3D> BOX_01_lc     = GeometricTransforms.TransformBy(GeometricTransforms.BOX_01, tr_WC2LC);
            string         BOX_01_lc_str = GeometricTransforms.PointListToString(BOX_01_lc);

            // position a new object (e.g. BOX_02_wc) relative to the one above
            List <Point3D> BOX_02_wc     = GeometricTransforms.TransformBy(GeometricTransforms.BOX_02_LC, tr_LC2WC);
            string         BOX_02_wc_str = GeometricTransforms.PointListToString(BOX_02_wc);

            // test test
            GeometricTransforms.ComputePCATransf(GeometricTransforms.OBJ_01, GeometricTransforms.OBJ_01_CORRECTION, out tr_WC2LC, out tr_LC2WC);
            List <Point3D> OBJ_01_lc     = GeometricTransforms.TransformBy(GeometricTransforms.OBJ_01, tr_WC2LC);
            string         OBJ_01_lc_str = GeometricTransforms.PointListToString(OBJ_01_lc);
        }