Beispiel #1
0
        private bool TestIntersectionDroitesXy(double[] v_coordPtA, double[] v_coordPtB, double[] v_coordPtC, double[] v_coordPtD, bool p_envoyerMessageSiKo_vf)
        {
            bool v_retour = true;

            double[] v_coordIntersectionParametrique;
            double[] v_coordIntersectionExplicite;

            v_coordIntersectionParametrique = FLabServices.createCalculLow().GetIntersectionDroites2DMethodeParametrique(v_coordPtA, v_coordPtB, v_coordPtC, v_coordPtD);
            v_coordIntersectionExplicite    = FLabServices.createCalculLow().GetIntersectionDroites2D(v_coordPtA, v_coordPtB, v_coordPtC, v_coordPtD);

            if (v_coordIntersectionParametrique == null && v_coordIntersectionExplicite == null)
            {
                return(true);
            }

            if (v_coordIntersectionParametrique[0] != v_coordIntersectionExplicite[0] || v_coordIntersectionParametrique[1] != v_coordIntersectionExplicite[1])
            {
                if (p_envoyerMessageSiKo_vf)
                {
                    string v_message = "Tests intersection ";
                    v_message += " KO\n";
                    v_message += "Parametriques " + v_coordIntersectionParametrique[0] + " / " + v_coordIntersectionParametrique[1] + "\n";
                    v_message += "Explicites " + v_coordIntersectionExplicite[0] + " / " + v_coordIntersectionExplicite[1] + "\n";
                    MessageBox.Show(v_message);
                }


                return(false);
            }
            return(v_retour);
        }
Beispiel #2
0
        internal bool TestInversionMatrice3D(bool p_envoyerMessageSiKo_vf)
        {
            bool v_resultat = true;

            try
            {
                //1-Matrice quelconque
                double[,] v_matriceSource;
                int param_seedRandomisateur;
                param_seedRandomisateur = 11;
                v_matriceSource         = GetMatriceCarreeAleatoire(3, -100, 100, param_seedRandomisateur);
                double[,] v_matriceInverse;
                v_matriceInverse = FLabServices.createCalculLow().GetMatriceInverse3x3(v_matriceSource);
                v_resultat       = TestInversionMatrice(v_matriceSource, v_matriceInverse, p_envoyerMessageSiKo_vf);
                if (!v_resultat)
                {
                    return(false);
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(v_resultat);
        }
Beispiel #3
0
        //
        private bool TestInversionMatrice(double[,] v_matriceSource, double[,] v_matriceInverse, bool p_envoyerMessageSiKo_vf)
        {
            bool v_resultat = true;

            try
            {
                int param_tolerance = 6;
                v_resultat = FLabServices.createCalculLow().IsInversionMatriceOk(v_matriceSource, v_matriceInverse, param_tolerance);
                if (p_envoyerMessageSiKo_vf && !v_resultat)
                {
                    string v_message = "Tests inversion matrice KO \n ";

                    MessageBox.Show(v_message);
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(v_resultat);
        }