Salome HOME
Adjust test cases reference data according to precise calculation of bounding boxes.
authorArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Mon, 12 Oct 2020 17:31:11 +0000 (20:31 +0300)
committerArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Mon, 12 Oct 2020 17:31:11 +0000 (20:31 +0300)
src/FeaturesPlugin/Test/TestExtrusionCut_ThroughAll.py
src/FeaturesPlugin/Test/TestFillet_MultiLevelCompound_v0_3.py
src/FeaturesPlugin/Test/TestFillet_MultiLevelCompound_v0_4.py
src/FeaturesPlugin/Test/TestFillet_MultiLevelCompound_v95_3.py
src/FeaturesPlugin/Test/TestFillet_MultiLevelCompound_v95_4.py
src/FeaturesPlugin/Test/TestScale_MultiLevelCompound_v95_2.py

index 54e0f6fd4c6b760179258debf9e67e193d898b44..e19da51a6a031e6f0a7549732910b42e46208a44 100644 (file)
@@ -64,7 +64,7 @@ SketchCircle_3 = Sketch_3.addCircle(7, 2, 1.5)
 ExtrusionCut_3.setNestedSketch(Sketch_3)
 model.do()
 Shape = ExtrusionCut_3.results()[0].resultSubShapePair()[0].shape()
-checkMiddlePoint(Shape, 5.00008072, 5.079732786, 5.08050663)
+checkMiddlePoint(Shape, 5.00008072, 5.079732577, 5.08050677)
 
 model.end()
 
index b15634542b8c91df069147281c6f1aafc60b6828..e035002b6d64cdf2232351d9220e873391b67a2e 100644 (file)
@@ -124,7 +124,7 @@ model.testNbSubShapes(Fillet_6, GeomAPI_Shape.FACE, [23])
 model.testNbSubShapes(Fillet_6, GeomAPI_Shape.EDGE, [95])
 model.testNbSubShapes(Fillet_6, GeomAPI_Shape.VERTEX, [190])
 model.testResultsVolumes(Fillet_6, [1565.568094166])
-refPoint = GeomAPI_Pnt(2.7448, 2.7448, 5)
+refPoint = GeomAPI_Pnt(2.50004995, 2.50004995, 5.00005)
 midPoint = Fillet_6.defaultResult().shape().middlePoint()
 assert(midPoint.distance(refPoint) < TOLERANCE)
 
index b1b177b6581e683f5dc6aae51a4f8748ec87fc09..258f7ef0167b42192bebf57a94b28a452148654c 100644 (file)
@@ -127,7 +127,7 @@ model.testNbSubShapes(Fillet_6, GeomAPI_Shape.FACE, [23])
 model.testNbSubShapes(Fillet_6, GeomAPI_Shape.EDGE, [95])
 model.testNbSubShapes(Fillet_6, GeomAPI_Shape.VERTEX, [190])
 model.testResultsVolumes(Fillet_6, [1565.568094166])
-refPoint = GeomAPI_Pnt(2.7448, 2.7448, 5)
+refPoint = GeomAPI_Pnt(2.50004995, 2.50004995, 5.00005)
 midPoint = Fillet_6.defaultResult().shape().middlePoint()
 assert(midPoint.distance(refPoint) < TOLERANCE)
 
index 4ad363735f8ca42bbc5d773f5cb9efd11479c1d5..d02ae88274f0ec9326d5ee444aa3200cb6dd4fd4 100644 (file)
@@ -124,7 +124,7 @@ model.testNbSubShapes(Fillet_6, GeomAPI_Shape.FACE, [23])
 model.testNbSubShapes(Fillet_6, GeomAPI_Shape.EDGE, [95])
 model.testNbSubShapes(Fillet_6, GeomAPI_Shape.VERTEX, [190])
 model.testResultsVolumes(Fillet_6, [1565.568094166])
-refPoint = GeomAPI_Pnt(2.7448, 2.7448, 5)
+refPoint = GeomAPI_Pnt(2.50004995, 2.50004995, 5.00005)
 midPoint = Fillet_6.defaultResult().shape().middlePoint()
 assert(midPoint.distance(refPoint) < TOLERANCE)
 
@@ -136,7 +136,7 @@ model.testNbSubShapes(Fillet_7, GeomAPI_Shape.FACE, [23])
 model.testNbSubShapes(Fillet_7, GeomAPI_Shape.EDGE, [98])
 model.testNbSubShapes(Fillet_7, GeomAPI_Shape.VERTEX, [196])
 model.testResultsVolumes(Fillet_7, [2976.0685684791988])
-refPoint = GeomAPI_Pnt(-20.9807621135, 42.806, 5)
+refPoint = GeomAPI_Pnt(-20.9807621135, 42.5, 5)
 midPoint = Fillet_7.defaultResult().shape().middlePoint()
 assert(midPoint.distance(refPoint) < TOLERANCE)
 model.end()
index ebd1bf9d3e765ed5c895e257967a245a13717d76..f4545a1f58d21df3050aa086c0d0a3e6de99c5f1 100644 (file)
@@ -142,7 +142,7 @@ VOLUME = 5565.117188528191
 assertResult(Fillet_5)
 
 Fillet_6 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Compound_1_1_7_2/Modified_Face&Box_2_1/Top][Compound_1_1_7_2/Modified_Face&Box_2_1/Front]"), model.selection("FACE", "Compound_1_1_7_2/Modified_Face&Box_2_1/Right")], RADIUS_1, RADIUS_2, keepSubResults = True)
-REFERENCE[6] = GeomAPI_Pnt(2.7448, 2.7448, 5)
+REFERENCE[6] = GeomAPI_Pnt(2.50004995, 2.50004995, 5.00005)
 NB_FACES += 6
 NB_EDGES += 29
 NB_VERTICES += 58
@@ -150,7 +150,7 @@ VOLUME = 5541.63666
 assertResult(Fillet_6)
 
 Fillet_7 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Compound_1_1_8_1/Modified_Face&Box_3_1/Back][Compound_1_1_8_1/Modified_Face&Box_3_1/Top]"), model.selection("FACE", "Compound_1_1_8_2/Modified_Face&Box_3_1/Left")], RADIUS_1, RADIUS_2, keepSubResults = True)
-REFERENCE[7] = GeomAPI_Pnt(-20.9807621135, 42.806, 5)
+REFERENCE[7] = GeomAPI_Pnt(-20.9807621135, 42.5, 5)
 NB_FACES += 5
 NB_EDGES += 26
 NB_VERTICES += 52
@@ -163,7 +163,7 @@ NB_EDGES += 12
 NB_VERTICES += 24
 VOLUME = 5507.602043482
 REFERENCE[5] = GeomAPI_Pnt(55.041662114, 5.021870383, 5.009557179275)
-REFERENCE[7] = GeomAPI_Pnt(-20.9807621135, 42.5409962, 5)
+REFERENCE[7] = GeomAPI_Pnt(-20.9807621135, 42.5, 5)
 assertResult(Fillet_8)
 
 model.end()
index 7975a6792f00158957a1f6953233d1279fb2eb37..077241b697ed248d6efab0c47ea9cd77cd144a8c 100644 (file)
@@ -107,14 +107,14 @@ assert(Scale_1.feature().error() != "")
 model.begin()
 Scale_1.setMainObjects([model.selection("COMPSOLID", "Compound_2_1_1")])
 REFERENCE[0] = GeomAPI_Pnt(REFERENCE[0].x() * SCALE_X, REFERENCE[0].y() * SCALE_Y, REFERENCE[0].z() * SCALE_Z)
-REFERENCE[0].setX(0) # <= B-spline poles are used to calculate the bounding box and thus the middle point
+##REFERENCE[0].setX(0) # <= B-spline poles are used to calculate the bounding box and thus the middle point
 assertResult(Scale_1, 74139.07479)
 
 Scale_2 = model.addScale(Part_1_doc, [model.selection("SOLID", "Scale_1_1_2_1")], model.selection("VERTEX", "PartSet/Origin"), SCALE_X, SCALE_Y, SCALE_Z, keepSubResults = True)
 subs = subsRefPoints(Compound_2.result().subResult(1))
 subs[0] = GeomAPI_Pnt(subs[0].xyz().added(GeomAPI_XYZ(5, -5, 5)))
 subs[0] = GeomAPI_Pnt(subs[0].x() * SCALE_X, subs[0].y() * SCALE_Y, subs[0].z() * SCALE_Z)
-subs[0].setY(-117.3204876) # <= B-spline poles are used to calculate the bounding box and thus the middle point
+##subs[0].setY(-117.3204876) # <= B-spline poles are used to calculate the bounding box and thus the middle point
 subs[1] = GeomAPI_Pnt(subs[1].xyz().added(GeomAPI_XYZ(-5, 5, -5)))
 REFERENCE[1] = average(subs)
 assertResult(Scale_2, 78066.07487341)
@@ -133,8 +133,8 @@ Scale_4.setMainObjects([model.selection("COMPSOLID", "Scale_3_1_1"), model.selec
 REFERENCE[0] = GeomAPI_Pnt(REFERENCE[0].x() / SCALE_X, REFERENCE[0].y() / SCALE_Y, REFERENCE[0].z() / SCALE_Z)
 subs[1] = GeomAPI_Pnt(subs[1].x() / SCALE_X, subs[1].y() / SCALE_Y, subs[1].z() / SCALE_Z)
 # B-spline poles are used to calculate the bounding box and thus the middle point
-subs[1].setX(-30.59017)
-subs[1].setY(-2.83826244)
+##subs[1].setX(-30.59017)
+##subs[1].setY(-2.83826244)
 REFERENCE[1] = average(subs)
 REFERENCE[2] = GeomAPI_Pnt(REFERENCE[2].x() / SCALE_X, REFERENCE[2].y() / SCALE_Y, REFERENCE[2].z() / SCALE_Z)
 assertResult(Scale_4, 17592.5112883)