AnsweredAssumed Answered

SketchPoint Coordinates to Model Coodinates

Question asked by William Cruz on Dec 8, 2016
Latest reply on Dec 20, 2016 by William Cruz

Can anyone tell me what I'm doing wrong? It returns only the X coordinate, Y and Z return zero "0".

 

       internal void TransformPoints(SketchPoint sp)
        {
            try
            {
                MathUtility swMathUtil = (MathUtility)_swApp.GetMathUtility();

                double[] cPT = { sp.X, sp.Y, sp.Z };
                double[] vPoint = null;
                MathPoint swMathPt2 = default(MathPoint);

                swMathPt2 = (MathPoint)swMathUtil.CreatePoint(cPT);
                swMathPt2 = (MathPoint)swMathPt2.MultiplyTransform(sp.GetSketch().ModelToSketchTransform.Inverse());

                vPoint = (double[])swMathPt2.ArrayData;

            }
            catch (Exception ex)
            {

            }
        }

Outcomes