Пример #1
0
        /////////////////////////////////////////////////////////////
        // Use: Returns Normal as UnitVector for input Face.
        //
        /////////////////////////////////////////////////////////////
        public static UnitVector GetFaceNormal(
            Face face,
            Point point)
        {
            SurfaceEvaluator oEvaluator = face.Evaluator;

            Double[] Points = { point.X, point.Y, point.Z };

            Double[]             GuessParams = new Double[2];
            Double[]             MaxDev      = new Double[2];
            Double[]             Params      = new Double[2];
            SolutionNatureEnum[] sol         = new SolutionNatureEnum[2];

            oEvaluator.GetParamAtPoint(
                ref Points,
                ref GuessParams,
                ref MaxDev,
                ref Params,
                ref sol);

            Double[] normal = new Double[3];

            oEvaluator.GetNormal(ref Params, ref normal);

            return(_Tg.CreateUnitVector(
                       normal[0],
                       normal[1],
                       normal[2]));
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        //Use: Returns Normal as UnitVector for input Face.
        //
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        public static UnitVector GetFaceNormal(Face face)
        {
            SurfaceEvaluator evaluator = face.Evaluator;

            double[] points = { face.PointOnFace.X, face.PointOnFace.Y, face.PointOnFace.Z };

            double[]             guessParams = new double[2];
            double[]             maxDev      = new double[2];
            double[]             Params      = new double[2];
            SolutionNatureEnum[] sol         = new SolutionNatureEnum[2];

            evaluator.GetParamAtPoint(ref points, ref guessParams, ref maxDev, ref Params, ref sol);

            double[] normal = new double[3];

            evaluator.GetNormal(ref Params, ref normal);

            return(InvApplication.TransientGeometry.CreateUnitVector(
                       normal[0], normal[1], normal[2]));
        }
Пример #3
0
        /////////////////////////////////////////////////////////////
        // Use: Returns Normal as UnitVector for input Face.
        //
        /////////////////////////////////////////////////////////////
        public static UnitVector GetFaceNormal(Face face)
        {
            SurfaceEvaluator oEvaluator = face.Evaluator;

            double[] point = new double[3]
            {
                face.PointOnFace.X,
                face.PointOnFace.Y,
                face.PointOnFace.Z
            };

            double[] guessParams = new double[2] {
                0.0, 0.0
            };
            double[] maxDev = new double[2] {
                0.0, 0.0
            };
            double[] Params = new double[2] {
                0.0, 0.0
            };

            SolutionNatureEnum[] sol = new SolutionNatureEnum[1]
            {
                SolutionNatureEnum.kUnknownSolutionNature
            };

            oEvaluator.GetParamAtPoint(ref point,
                                       ref guessParams,
                                       ref maxDev,
                                       ref Params,
                                       ref sol);

            double[] normal = new double[3];

            oEvaluator.GetNormal(ref Params, ref normal);

            return(_Tg.CreateUnitVector(
                       normal[0],
                       normal[1],
                       normal[2]));
        }
Пример #4
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        //Use: Returns Normal as UnitVector for input Face.
        //
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        public static UnitVector GetFaceNormal(Face face)
        {
            SurfaceEvaluator evaluator = face.Evaluator;

            double[] points = { face.PointOnFace.X, face.PointOnFace.Y, face.PointOnFace.Z };

            double[] guessParams = new double[2];
            double[] maxDev = new double[2];
            double[] Params = new double[2];
            SolutionNatureEnum[] sol = new SolutionNatureEnum[2];

            evaluator.GetParamAtPoint(ref points, ref guessParams, ref maxDev, ref Params, ref sol);

            double[] normal = new double[3];

            evaluator.GetNormal(ref Params, ref normal);

            return InvApplication.TransientGeometry.CreateUnitVector(
                normal[0], normal[1], normal[2]);
        }