From: El Hadi Moussi Date: Tue, 6 Aug 2024 08:56:24 +0000 (+0200) Subject: Correct the the values of the plane test because of the modification of the mesh X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6f9b3e7eee1e0447093c963d3cbeeb75fde2927f;p=tools%2Fmedcoupling.git Correct the the values of the plane test because of the modification of the mesh --- diff --git a/src/ShapeRecogn/Test/PlaneTest.cxx b/src/ShapeRecogn/Test/PlaneTest.cxx index ea09ed1ce..4b9744fbc 100644 --- a/src/ShapeRecogn/Test/PlaneTest.cxx +++ b/src/ShapeRecogn/Test/PlaneTest.cxx @@ -22,21 +22,21 @@ void PlaneTest::tearDown() void PlaneTest::testArea() { - CPPUNIT_ASSERT_EQUAL(46, (int)areas->getNumberOfNodes()); + CPPUNIT_ASSERT_EQUAL(36, (int)areas->getNumberOfNodes(0)); CPPUNIT_ASSERT_EQUAL(1, (int)areas->getNumberOfAreas()); // Normal std::array normal = areas->getNormal(0); - std::array normalRef = {0.78152546, 0.31060627, -0.54105609}; + std::array normalRef = {0.781525, 0.310606, -0.541056}; std::array affinePoint = areas->getAffinePoint(0); double proportion0 = normal[0] / normalRef[0]; double proportion1 = normal[1] / normalRef[1]; double proportion2 = normal[2] / normalRef[2]; double proportion3 = MathOps::dot(normal, affinePoint) / MathOps::dot(normalRef, affinePoint); // Check proportions between the normal vectors of the two planes - CPPUNIT_ASSERT_DOUBLES_EQUAL(proportion0, proportion1, 1E-2); - CPPUNIT_ASSERT_DOUBLES_EQUAL(proportion0, proportion2, 1E-2); - CPPUNIT_ASSERT_DOUBLES_EQUAL(proportion0, proportion3, 1E-1); + CPPUNIT_ASSERT_DOUBLES_EQUAL(proportion0, proportion1, 1E-6); + CPPUNIT_ASSERT_DOUBLES_EQUAL(proportion1, proportion2, 1E-6); + CPPUNIT_ASSERT_DOUBLES_EQUAL(proportion2, proportion3, 1E-6); // Check the angle double angle = MathOps::computeAngle(normal, normalRef); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, angle, 1E-2); -} + CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, angle, 1E-6); +} \ No newline at end of file