Salome HOME
calculation of areas was incorrect (lack of precision) with SALOME V7.7.1: bug mantis...
[modules/hydro.git] / src / HYDROTools / controls.py
index bf8927db52d60c68ae27c9dc2793066a7e33b19a..8f7f3c531475fc4e74b8fd599f3e009403923fa8 100644 (file)
@@ -5,7 +5,7 @@
 def controlGeomProps(geompy, geomShape, refLength, refArea):
   """
   compare area and length of a geometric face with a reference,
-  with relative precision of 1.E-7 
+  with relative precision of 1.E-3 
   """
   props = geompy.BasicProperties(geomShape)
   print " Wires length: ", props[0]
@@ -13,7 +13,7 @@ def controlGeomProps(geompy, geomShape, refLength, refArea):
   print " Volume      : ", props[2]
   deltaLength = 2.0*abs((props[0] - refLength)/(props[0] + refLength))
   deltaArea   = 2.0*abs((props[1] - refArea)/(props[1] + refArea))
-  if deltaLength > 1e-7 or deltaArea > 1e-7 or props[2] != 0:
+  if deltaLength > 1e-3 or deltaArea > 1e-3 or props[2] != 0:
     print "While must be:"
     print " Wires length: ", refLength
     print " Surface area: ", refArea