X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=tests%2Ftest_quadrangles_gradation.py;fp=tests%2Ftest_quadrangles_gradation.py;h=965e2018feaae0627990a5470eadf1d20e7aaf39;hb=8385c8dc8bcbcb2630484016bc5e97e926f8f835;hp=b7fac3cee86f89feeef5402b0b03742ca6230f12;hpb=209c7e2a0ca7a9323cc63e6b2ad5067b567534af;p=plugins%2Fblsurfplugin.git diff --git a/tests/test_quadrangles_gradation.py b/tests/test_quadrangles_gradation.py index b7fac3c..965e201 100644 --- a/tests/test_quadrangles_gradation.py +++ b/tests/test_quadrangles_gradation.py @@ -8,15 +8,12 @@ geompy = geomBuilder.New(salome.myStudy) import math -area_tolerance = 1e-3 -nb_faces_tolerance = 10 +area_tolerance = 1e-2 +nb_faces_tolerance = 20 ## Return the min and max areas of a mesh def getMinMaxArea(mesh): - faces = mesh.GetElementsByType(SMESH.FACE) - areas = [mesh.GetArea(face) for face in faces] - mini = min(areas) - maxi = max(areas) + mini, maxi = mesh.GetMinMax(SMESH.FT_Area) return mini, maxi O = geompy.MakeVertex(0, 0, 0) @@ -105,14 +102,14 @@ maxi_1_ref = 0.530 if abs(mini_1-mini_1_ref) > area_tolerance: raise Exception("Min area of Mesh_1 incorrect") -if abs(maxi_1-maxi_1_ref) > area_tolerance: +if maxi_1 > maxi_1_ref: raise Exception("Max area of Mesh_1 incorrect") # Check the number of faces of Mesh_1 nb_faces_1 = Mesh_1.NbFaces() nb_faces_1_ref = 1208 -if abs(nb_faces_1-nb_faces_1_ref) > nb_faces_tolerance: +if nb_faces_1 < nb_faces_1_ref: raise Exception("Number of faces of Mesh_1 incorrect")