Salome HOME
Improve GeomAlgoAPI_ShapeTools::volume() method to return the volume of the shape...
[modules/shaper.git] / src / FeaturesPlugin / Test / TestScale_MultiLevelCompound_v0_4.py
index 23cf7c5c4831e34c499733d8f982dea7112894ef..4b9d7442042f4230a5829998d727abda48d64056 100644 (file)
@@ -89,6 +89,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(Compound_1.result().subResult(0).resultSubShapePair()[0].shape().middlePoint().xyz().multiplied(SCALE))
 midPoint = Scale_1.defaultResult().shape().middlePoint()
 assert(midPoint.distance(refPoint) < TOLERANCE)
@@ -102,6 +103,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(Compound_1.result().subResult(1).resultSubShapePair()[0].shape().middlePoint().xyz().multiplied(SCALE))
 midPoint = Scale_2.defaultResult().shape().middlePoint()
 assert(midPoint.distance(refPoint) < TOLERANCE)
@@ -115,6 +117,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(Compound_1.result().subResult(2).resultSubShapePair()[0].shape().middlePoint().xyz().multiplied(SCALE))
 midPoint = Scale_3.defaultResult().shape().middlePoint()
 assert(midPoint.distance(refPoint) < TOLERANCE)
@@ -127,7 +130,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(Compound_1.result().subResult(3).resultSubShapePair()[0].shape().middlePoint().xyz().multiplied(SCALE))
 midPoint = Scale_4.defaultResult().shape().middlePoint()
 assert(midPoint.distance(refPoint) < TOLERANCE)
@@ -140,7 +144,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(Compound_1.result().subResult(4).resultSubShapePair()[0].shape().middlePoint().xyz().multiplied(SCALE))
 midPoint = Scale_5.defaultResult().shape().middlePoint()
 assert(midPoint.distance(refPoint) < TOLERANCE)