]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix selectFace() use in extrusion and revolution tests.
authorspo <sergey.pokhodenko@opencascade.com>
Fri, 30 Oct 2015 12:10:33 +0000 (15:10 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Fri, 30 Oct 2015 13:42:53 +0000 (16:42 +0300)
src/PythonAPI/Test/TestFeaturesExtrusion.py
src/PythonAPI/Test/TestFeaturesRevolution.py

index 7c11dfbe18a968ee224b6f2278d3865eb209c2f2..decd198b7a82ab1f95f15d8ea8bc139d3af381b7 100644 (file)
@@ -30,7 +30,7 @@ class FeaturesExtrusionFixture(FeaturesAddExtrusionFixture):
         circle = sketch.addCircle(0, 0, 10)
         model.do()
 
-        base = [sketch.selectFace(circle.result())]
+        base = sketch.selectFace(circle.result())
         self.extrusion = model.addExtrusion(self.part, base, 10, 0)
         model.do()
 
@@ -54,7 +54,7 @@ class FeaturesAddExtrusionTestCase(FeaturesAddExtrusionFixture):
         circle = sketch.addCircle(0, 0, 10)
         model.do()
 
-        base = [sketch.selectFace(circle.result())]
+        base = sketch.selectFace(circle.result())
         extrusion = model.addExtrusion(self.part, base, 10, 0)
         model.do()
 
@@ -83,9 +83,9 @@ class FeaturesAddExtrusionTestCase(FeaturesAddExtrusionFixture):
 
         model.do()
 
-        base = [base_sketch.selectFace(base_circle.result())]
-        to_object = to_sketch.selectFace(to_circle.result())
-        from_object = from_sketch.selectFace(from_circle.result())
+        base = base_sketch.selectFace(base_circle.result())
+        to_object = to_sketch.selectFace(to_circle.result())[0]
+        from_object = from_sketch.selectFace(from_circle.result())[0]
         extrusion = model.addExtrusion(self.part, base,
                                        to_object, 15,
                                        from_object, 20)
@@ -150,8 +150,8 @@ class FeaturesExtrusionTestCase(FeaturesExtrusionFixture):
 
         model.do()
 
-        to_object = to_sketch.selectFace(to_circle.result())
-        from_object = from_sketch.selectFace(from_circle.result())
+        to_object = to_sketch.selectFace(to_circle.result())[0]
+        from_object = from_sketch.selectFace(from_circle.result())[0]
         self.extrusion.setPlanesAndOffsets(to_object, 15, from_object, 20)
 
 
index c3d1effd8f938efdd26885c52203a72b51d8db00..a7fbfde5a3fbdc9bd73a61c24157ccb2edeab68b 100644 (file)
@@ -36,7 +36,7 @@ class FeaturesRevolutionFixture(FeaturesAddRevolutionFixture):
 
         model.do()
 
-        base = [base_sketch.selectFace(circle.lastResult())]
+        base = base_sketch.selectFace(circle.lastResult())
         axis_object = Selection(axis_sketch.firstResult(),
                                 line.firstResult().shape())
 
@@ -70,7 +70,7 @@ class FeaturesAddRevolutionTestCase(FeaturesAddRevolutionFixture):
 
         model.do()
 
-        base = [base_sketch.selectFace(circle.lastResult())]
+        base = base_sketch.selectFace(circle.lastResult())
         axis_object = Selection(axis_sketch.firstResult(),
                                 line.firstResult().shape())
 
@@ -105,11 +105,11 @@ class FeaturesAddRevolutionTestCase(FeaturesAddRevolutionFixture):
 
         model.do()
 
-        base = [base_sketch.selectFace(base_circle.result())]
+        base = base_sketch.selectFace(base_circle.result())
         axis_object = Selection(axis_sketch.firstResult(),
                                 line.firstResult().shape())
-        to_obejct = to_sketch.selectFace(to_circle.result())
-        from_object = from_sketch.selectFace(from_circle.result())
+        to_obejct = to_sketch.selectFace(to_circle.result())[0]
+        from_object = from_sketch.selectFace(from_circle.result())[0]
 
         revolution = model.addRevolution(self.part, base, axis_object,
                                          to_obejct, 15,
@@ -183,11 +183,11 @@ class FeaturesRevolutionTestCase(FeaturesRevolutionFixture):
 
         model.do()
 
-        base = [base_sketch.selectFace(base_circle.result())]
+        base = base_sketch.selectFace(base_circle.result())
         axis_object = Selection(axis_sketch.firstResult(),
                                 line.firstResult().shape())
-        to_obejct = to_sketch.selectFace(to_circle.result())
-        from_object = from_sketch.selectFace(from_circle.result())
+        to_obejct = to_sketch.selectFace(to_circle.result())[0]
+        from_object = from_sketch.selectFace(from_circle.result())[0]
 
         self.revolution.setPlanesAndOffsets(to_obejct, 15, from_object, 20)