From: spo Date: Fri, 30 Oct 2015 12:10:33 +0000 (+0300) Subject: Fix selectFace() use in extrusion and revolution tests. X-Git-Tag: V_2.1.0~206^2~36 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=73ada7153e2be9b12c702298681bc33d95a1195d;p=modules%2Fshaper.git Fix selectFace() use in extrusion and revolution tests. --- diff --git a/src/PythonAPI/Test/TestFeaturesExtrusion.py b/src/PythonAPI/Test/TestFeaturesExtrusion.py index 7c11dfbe1..decd198b7 100644 --- a/src/PythonAPI/Test/TestFeaturesExtrusion.py +++ b/src/PythonAPI/Test/TestFeaturesExtrusion.py @@ -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) diff --git a/src/PythonAPI/Test/TestFeaturesRevolution.py b/src/PythonAPI/Test/TestFeaturesRevolution.py index c3d1effd8..a7fbfde5a 100644 --- a/src/PythonAPI/Test/TestFeaturesRevolution.py +++ b/src/PythonAPI/Test/TestFeaturesRevolution.py @@ -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)