Salome HOME
Improve GeomAlgoAPI_ShapeTools::volume() method to return the volume of the shape...
[modules/shaper.git] / src / FeaturesPlugin / Test / TestScale_MultiLevelCompound_v0_3.py
index 4ac842d053feddb9b80cbb5a8e0fdd399cb485ce..46ea3a16f385d94c0e1a7512ea2bbd6de94f0937 100644 (file)
@@ -87,6 +87,7 @@ model.testNbSubShapes(Scale_1, GeomAPI_Shape.FACE, [0])
 model.testNbSubShapes(Scale_1, GeomAPI_Shape.EDGE, [0])
 model.testNbSubShapes(Scale_1, GeomAPI_Shape.VERTEX, [1])
 model.testResultsVolumes(Scale_1, [0])
+model.testResultsAreas(Scale_1, [0])
 refPoint = GeomAPI_Pnt(Vertex_1.defaultResult().shape().middlePoint().xyz().multiplied(SCALE))
 midPoint = Scale_1.defaultResult().shape().middlePoint()
 assert(midPoint.distance(refPoint) < TOLERANCE)
@@ -99,6 +100,7 @@ model.testNbSubShapes(Scale_2, GeomAPI_Shape.FACE, [0])
 model.testNbSubShapes(Scale_2, GeomAPI_Shape.EDGE, [1])
 model.testNbSubShapes(Scale_2, GeomAPI_Shape.VERTEX, [2])
 model.testResultsVolumes(Scale_2, [0])
+model.testResultsAreas(Scale_2, [0])
 refPoint = GeomAPI_Pnt(Edge_1.defaultResult().shape().middlePoint().xyz().multiplied(SCALE))
 midPoint = Scale_2.defaultResult().shape().middlePoint()
 assert(midPoint.distance(refPoint) < TOLERANCE)
@@ -111,6 +113,7 @@ model.testNbSubShapes(Scale_3, GeomAPI_Shape.FACE, [0])
 model.testNbSubShapes(Scale_3, GeomAPI_Shape.EDGE, [2])
 model.testNbSubShapes(Scale_3, GeomAPI_Shape.VERTEX, [4])
 model.testResultsVolumes(Scale_3, [0])
+model.testResultsAreas(Scale_3, [0])
 refPoint = GeomAPI_Pnt(Wire_1.defaultResult().shape().middlePoint().xyz().multiplied(SCALE))
 midPoint = Scale_3.defaultResult().shape().middlePoint()
 assert(midPoint.distance(refPoint) < TOLERANCE)
@@ -122,7 +125,8 @@ model.testNbSubShapes(Scale_4, GeomAPI_Shape.SOLID, [0])
 model.testNbSubShapes(Scale_4, GeomAPI_Shape.FACE, [1])
 model.testNbSubShapes(Scale_4, GeomAPI_Shape.EDGE, [4])
 model.testNbSubShapes(Scale_4, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Scale_4, [109.154152964914914 * (SCALE**2)])
+model.testResultsVolumes(Scale_4, [0])
+model.testResultsAreas(Scale_4, [109.154152964914914 * (SCALE**2)])
 refPoint = GeomAPI_Pnt(Face_1.defaultResult().shape().middlePoint().xyz().multiplied(SCALE))
 midPoint = Scale_4.defaultResult().shape().middlePoint()
 assert(midPoint.distance(refPoint) < TOLERANCE)
@@ -134,7 +138,8 @@ model.testNbSubShapes(Scale_5, GeomAPI_Shape.SOLID, [0])
 model.testNbSubShapes(Scale_5, GeomAPI_Shape.FACE, [2])
 model.testNbSubShapes(Scale_5, GeomAPI_Shape.EDGE, [8])
 model.testNbSubShapes(Scale_5, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Scale_5, [182.822012116 * (SCALE**2)])
+model.testResultsVolumes(Scale_5, [0])
+model.testResultsAreas(Scale_5, [182.822012116 * (SCALE**2)])
 refPoint = GeomAPI_Pnt(Shell_1.defaultResult().shape().middlePoint().xyz().multiplied(SCALE))
 midPoint = Scale_5.defaultResult().shape().middlePoint()
 assert(midPoint.distance(refPoint) < TOLERANCE)