From: azv Date: Fri, 18 Jan 2019 13:05:05 +0000 (+0300) Subject: Update incorrect units tests and add missing tests (issues #2838, #2839, #2840, ... X-Git-Tag: Jan2019~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=51958e564daea285fa53e7211e9c4abb02e31557;p=modules%2Fshaper.git Update incorrect units tests and add missing tests (issues #2838, #2839, #2840, #2841, #2842, #2843, #2844, #2845) --- diff --git a/src/ModelAPI/CMakeLists.txt b/src/ModelAPI/CMakeLists.txt index 19fa6c522..adfe565d1 100644 --- a/src/ModelAPI/CMakeLists.txt +++ b/src/ModelAPI/CMakeLists.txt @@ -200,6 +200,7 @@ ADD_UNIT_TESTS(TestConstants.py TestFolder_Stability.py TestFolder_CustomName.py TestFolder_Empty.py + TestFolder_Sketch.py Test2358_1.py Test2358_2.py Test2396.py diff --git a/src/ModelAPI/Test/TestExternalConstruction.py b/src/ModelAPI/Test/TestExternalConstruction.py index 5437fe052..a418a6508 100644 --- a/src/ModelAPI/Test/TestExternalConstruction.py +++ b/src/ModelAPI/Test/TestExternalConstruction.py @@ -34,7 +34,17 @@ SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_1.startPoint() model.do() Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() -Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("COMPOUND", "PartSet/Sketch_1")], model.selection("EDGE", "PartSet/Sketch_1/Edge-SketchLine_3"), 360, 0) +Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("COMPOUND", "PartSet/Sketch_1")], model.selection("EDGE", "PartSet/Sketch_1/SketchLine_3"), 360, 0) model.end() +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Revolution_1, 1) +model.testNbSubResults(Revolution_1, [0]) +model.testNbSubShapes(Revolution_1, GeomAPI_Shape.SOLID, [1]) +model.testNbSubShapes(Revolution_1, GeomAPI_Shape.FACE, [2]) +model.testNbSubShapes(Revolution_1, GeomAPI_Shape.EDGE, [8]) +model.testNbSubShapes(Revolution_1, GeomAPI_Shape.VERTEX, [16]) +model.testResultsVolumes(Revolution_1, [17830100]) + assert(model.checkPythonDump()) diff --git a/src/ModelAPI/Test/TestFolder_Sketch.py b/src/ModelAPI/Test/TestFolder_Sketch.py index bf6768a1f..b61b56ca4 100644 --- a/src/ModelAPI/Test/TestFolder_Sketch.py +++ b/src/ModelAPI/Test/TestFolder_Sketch.py @@ -37,7 +37,7 @@ model.do() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_1 = Sketch_1.addCircle(50, 50, 25) model.do() -Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_1_2f")], model.selection(), 50, 0) +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_1_2r")], model.selection(), 50, 0) Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) SketchCircle_2 = Sketch_2.addCircle(100, -100, 50) @@ -45,7 +45,7 @@ model.do() Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_3")], model.selection(), 10, 0) ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [], model.selection(), 0, 10, [model.selection("SOLID", "Extrusion_2_1")]) Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_2_1/To_Face_1")) -SketchProjection_1 = Sketch_3.addProjection(model.selection("VERTEX", "Extrusion_2_1/Generated_Face_1&Extrusion_2_1/To_Face_1__cc"), False) +SketchProjection_1 = Sketch_3.addProjection(model.selection("VERTEX", "[Extrusion_2_1/Generated_Face&Sketch_3/SketchCircle_2_2][Extrusion_2_1/To_Face]__cc"), False) SketchPoint_1 = SketchProjection_1.createdFeature() SketchCircle_3 = Sketch_3.addCircle(100, -100, 25) SketchConstraintCoincidence_1 = Sketch_3.setCoincident(SketchPoint_1.result(), SketchCircle_3.center()) diff --git a/src/PythonAPI/CMakeLists.txt b/src/PythonAPI/CMakeLists.txt index bd31cd108..f1728ee63 100644 --- a/src/PythonAPI/CMakeLists.txt +++ b/src/PythonAPI/CMakeLists.txt @@ -44,13 +44,13 @@ ADD_UNIT_TESTS( TestSketcherSetFixed.py TestSketcherSetLength.py TestSketcherSetRadius.py - #TestSketcherSetAngle.py + TestSketcherSetAngle.py TestSketcherSetEqual.py TestSketcherSetFillet.py TestFeatures.py TestFeaturesExtrusion.py - #TestFeaturesRevolution.py + TestFeaturesRevolution.py TestPrimitivesBox.py diff --git a/src/PythonAPI/Test/Test2044.py b/src/PythonAPI/Test/Test2044.py index 3fff3e3e2..b9b050e46 100644 --- a/src/PythonAPI/Test/Test2044.py +++ b/src/PythonAPI/Test/Test2044.py @@ -34,7 +34,7 @@ SketchLine_4 = Sketch_1.addLine(184.3750000000001, -109.375, -184.375, -81.25) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_4.endPoint()) model.do() -Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r")], model.selection("EDGE", "PartSet/OZ"), 50, 0) +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r_wire")], model.selection("EDGE", "PartSet/OZ"), 50, 0) model.do() Extrusion_1.setDirection(model.selection("EDGE", "OX")) model.do() diff --git a/src/PythonAPI/Test/TestFeaturesRevolution.py b/src/PythonAPI/Test/TestFeaturesRevolution.py index 9b24e9550..b79c4703e 100644 --- a/src/PythonAPI/Test/TestFeaturesRevolution.py +++ b/src/PythonAPI/Test/TestFeaturesRevolution.py @@ -56,10 +56,9 @@ class FeaturesRevolutionFixture(FeaturesAddRevolutionFixture): base = base_sketch.selectFace() axis_point1 = model.addPoint(self.part, 20, -10, 0).result() axis_point2 = model.addPoint(self.part, 20, 10, 0).result() - axis_object = model.addAxis(self.part, axis_point1[0], axis_point2[0]).result() + axis_object = model.addAxis(self.part, axis_point1, axis_point2).result() - self.revolution = model.addRevolution(self.part, base, axis_object[0], - 0, 180) + self.revolution = model.addRevolution(self.part, base, axis_object, 0, 180) model.do() @@ -81,18 +80,15 @@ class FeaturesAddRevolutionTestCase(FeaturesAddRevolutionFixture): base = base_sketch.selectFace() axis_point1 = model.addPoint(self.part, 20, -10, 0).result() axis_point2 = model.addPoint(self.part, 20, 10, 0).result() - axis_object = model.addAxis(self.part, axis_point1[0], axis_point2[0]).result() + axis_object = model.addAxis(self.part, axis_point1, axis_point2).result() - revolution = model.addRevolution(self.part, base, axis_object[0], - 0, 180) + revolution = model.addRevolution(self.part, base, axis_object, 0, 180) self.assertEqual(revolution.creationMethod().value(), "ByAngles") self.assertEqual(revolution.toAngle().value(), 0) self.assertEqual(revolution.fromAngle().value(), 180) self.assertEqual(revolution.toObject().context(), None) - self.assertEqual(revolution.toOffset().value(), 0) self.assertEqual(revolution.fromObject().context(), None) - self.assertEqual(revolution.fromOffset().value(), 0) def test_add_revolution_by_face_and_planes(self): # base @@ -114,23 +110,19 @@ class FeaturesAddRevolutionTestCase(FeaturesAddRevolutionFixture): base = base_sketch.selectFace() axis_point1 = model.addPoint(self.part, 20, -10, 0).result() axis_point2 = model.addPoint(self.part, 20, 10, 0).result() - axis_object = model.addAxis(self.part, axis_point1[0], axis_point2[0]).result() + axis_object = model.addAxis(self.part, axis_point1, axis_point2).result() to_obejct = to_sketch.selectFace()[0] from_object = from_sketch.selectFace()[0] - revolution = model.addRevolution(self.part, base, axis_object[0], - to_obejct, 15, - from_object, 20) + self.revolution = model.addRevolution(self.part, base, axis_object, + to_obejct, 15, + from_object, 20) - self.assertEqual(revolution.creationMethod().value(), "ByPlanesAndOffsets") - self.assertEqual(revolution.toAngle().value(), 0) - self.assertEqual(revolution.fromAngle().value(), 0) -# self.assertEqual(revolution.getToObject().context(), -# to_sketch.result()) - self.assertEqual(revolution.toOffset().value(), 15) -# self.assertEqual(revolution.getFromObject().context(), -# from_sketch.result()) - self.assertEqual(revolution.fromOffset().value(), 20) + self.assertEqual(self.revolution.creationMethod().value(), "ByPlanesAndOffsets") + self.assertNotEqual(self.revolution.toObject().context(), None) + self.assertEqual(self.revolution.toOffset().value(), 15) + self.assertNotEqual(self.revolution.fromObject().context(), None) + self.assertEqual(self.revolution.fromOffset().value(), 20) class FeaturesRevolutionTestCase(FeaturesRevolutionFixture): @@ -166,9 +158,7 @@ class FeaturesRevolutionTestCase(FeaturesRevolutionFixture): self.assertEqual(self.revolution.toAngle().value(), 90) self.assertEqual(self.revolution.fromAngle().value(), 270) self.assertEqual(self.revolution.toObject().context(), None) - self.assertEqual(self.revolution.toOffset().value(), 0) self.assertEqual(self.revolution.fromObject().context(), None) - self.assertEqual(self.revolution.fromOffset().value(), 0) def test_revolution_set_planes_and_offsets(self): # base @@ -190,18 +180,17 @@ class FeaturesRevolutionTestCase(FeaturesRevolutionFixture): base = base_sketch.selectFace() axis_point1 = model.addPoint(self.part, 20, -10, 0).result() axis_point2 = model.addPoint(self.part, 20, 10, 0).result() - axis_object = model.addAxis(self.part, axis_point1[0], axis_point2[0]).result() + axis_object = model.addAxis(self.part, axis_point1, axis_point2).result() to_obejct = to_sketch.selectFace()[0] from_object = from_sketch.selectFace()[0] + self.revolution = model.addRevolution(self.part, base, axis_object, 0, 180) self.revolution.setPlanesAndOffsets(to_obejct, 15, from_object, 20) self.assertEqual(self.revolution.creationMethod().value(), "ByPlanesAndOffsets") - # self.assertEqual(self.revolution.toAngle().value(), 0) - # self.assertEqual(self.revolution.fromAngle().value(), 0) -# self.assertEqual(self.revolution.getToObject().context(), None) + self.assertNotEqual(self.revolution.toObject().context(), None) self.assertEqual(self.revolution.toOffset().value(), 15) -# self.assertEqual(self.revolution.getFromObject().context(), None) + self.assertNotEqual(self.revolution.fromObject().context(), None) self.assertEqual(self.revolution.fromOffset().value(), 20) diff --git a/src/SketchAPI/SketchAPI_Sketch.cpp b/src/SketchAPI/SketchAPI_Sketch.cpp index 9b202f6dd..cba215936 100644 --- a/src/SketchAPI/SketchAPI_Sketch.cpp +++ b/src/SketchAPI/SketchAPI_Sketch.cpp @@ -572,9 +572,9 @@ std::shared_ptr SketchAPI_Sketch::setAngle( fillAttribute(SketcherPrs_Tools::ANGLE_DIRECT, aFeature->integer(SketchPlugin_ConstraintAngle::TYPE_ID())); // fill the value before llines to avoid calculation of angle value by the Angle feature - fillAttribute(theValue, aFeature->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID())); fillAttribute(theLine1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A())); fillAttribute(theLine2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B())); + fillAttribute(theValue, aFeature->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID())); aFeature->execute(); return InterfacePtr(new ModelHighAPI_Interface(aFeature)); } @@ -588,10 +588,9 @@ std::shared_ptr SketchAPI_Sketch::setAngleComplementary( compositeFeature()->addFeature(SketchPlugin_ConstraintAngle::ID()); fillAttribute(SketcherPrs_Tools::ANGLE_COMPLEMENTARY, aFeature->integer(SketchPlugin_ConstraintAngle::TYPE_ID())); - fillAttribute(theValue, aFeature->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID())); fillAttribute(theLine1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A())); fillAttribute(theLine2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B())); -// fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE())); + fillAttribute(theValue, aFeature->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID())); aFeature->execute(); return InterfacePtr(new ModelHighAPI_Interface(aFeature)); } @@ -605,10 +604,9 @@ std::shared_ptr SketchAPI_Sketch::setAngleBackward( compositeFeature()->addFeature(SketchPlugin_ConstraintAngle::ID()); fillAttribute(SketcherPrs_Tools::ANGLE_BACKWARD, aFeature->integer(SketchPlugin_ConstraintAngle::TYPE_ID())); - fillAttribute(theValue, aFeature->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID())); fillAttribute(theLine1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A())); fillAttribute(theLine2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B())); -// fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE())); + fillAttribute(theValue, aFeature->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID())); aFeature->execute(); return InterfacePtr(new ModelHighAPI_Interface(aFeature)); } diff --git a/src/SketchPlugin/Test/Test1061.py b/src/SketchPlugin/Test/Test1061.py index 6fa4320f0..2120c4d18 100644 --- a/src/SketchPlugin/Test/Test1061.py +++ b/src/SketchPlugin/Test/Test1061.py @@ -23,7 +23,6 @@ Test case for issue #1061 "Distance constraint using for points with equal coordinates" """ -import math from salome.shaper import model model.begin() @@ -41,8 +40,7 @@ model.do() # check distance between points aDist2 = (SketchLine_1.endPoint().x() - SketchLine_2.startPoint().x())**2 + (SketchLine_1.endPoint().y() - SketchLine_2.startPoint().y())**2 -assert(math.fabs(aDist2 - DISTANCE**2) > 1e-12) +assert(aDist2 < 1e-12) +assert(Sketch_1.solverError() != "") model.end() - -assert(model.checkPythonDump()) diff --git a/src/SketchPlugin/Test/Test1779.py b/src/SketchPlugin/Test/Test1779.py index 797248731..142ede474 100644 --- a/src/SketchPlugin/Test/Test1779.py +++ b/src/SketchPlugin/Test/Test1779.py @@ -205,10 +205,10 @@ SketchConstraintTangent_10 = Sketch_1.setTangent(SketchLine_1.result(), SketchAr SketchConstraintTangent_10.setName("SketchConstraintTangent_13") SketchConstraintAngle_2 = Sketch_1.setAngle(SketchLine_11.result(), SketchLine_10.result(), 45) model.do() -Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_13r-SketchLine_14f-SketchLine_2f-SketchArc_1_2f-SketchArc_2_2f-SketchLine_5r-SketchArc_3_2f-SketchCircle_1_2r-SketchCircle_2_2r-SketchCircle_3_2r-SketchArc_4_2f-SketchArc_5_2r-SketchArc_6_2r-SketchLine_21r-SketchCircle_4_2r")], model.selection(), "height", 0) -Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_14")) +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchArc_1_2f-SketchLine_2f-SketchArc_3_2f-SketchLine_5r-SketchArc_2_2f-SketchArc_4_2f-SketchLine_21r-SketchArc_6_2r-SketchLine_14f-SketchArc_5_2r-SketchLine_13r-SketchCircle_2_2r-SketchCircle_1_2r-SketchCircle_4_2r-SketchCircle_3_2r")], model.selection(), "height", 0) +Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_2")) SketchLine_12 = Sketch_2.addLine(38.24999999999999, 6.5, 13.75, 6.5) -SketchLine_13 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_14&Extrusion_1_1/To_Face_1")) +SketchLine_13 = Sketch_2.addLine(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_2][Extrusion_1_1/To_Face_1]")) SketchLine_13.setName("SketchLine_15") SketchLine_13.result().setName("SketchLine_15") SketchConstraintCoincidence_25 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_13.result()) @@ -238,7 +238,7 @@ SketchConstraintLength_3 = Sketch_2.setLength(SketchLine_12.result(), "width_hol SketchConstraintDistance_13 = Sketch_2.setDistance(SketchLine_13.endPoint(), SketchLine_16.result(), "width_hole/2") SketchConstraintDistance_13.setName("SketchConstraintDistance_17") model.do() -ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_12f-SketchLine_16f-SketchLine_17f-SketchLine_18f")], model.selection(), 0, 100, [model.selection("SOLID", "Extrusion_1_1")]) +ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_12r-SketchLine_16f-SketchLine_17f-SketchLine_18f")], model.selection(), 0, 100, [model.selection("SOLID", "Extrusion_1_1")]) model.do() # check ExtrusionCut_1 is valid diff --git a/src/SketchPlugin/Test/TestProjectionUpdate.py b/src/SketchPlugin/Test/TestProjectionUpdate.py index e3312d02e..3a5ea10fd 100644 --- a/src/SketchPlugin/Test/TestProjectionUpdate.py +++ b/src/SketchPlugin/Test/TestProjectionUpdate.py @@ -32,11 +32,15 @@ SketchLine_1 = Sketch_1.addLine(20, -50, 70, 50) model.do() Sketch_2 = model.addSketch(partSet, model.defaultPlane("YOZ")) -SketchProjection_1 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_1s"), True) +SketchProjection_1 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_1_StartVertex"), True) model.do() # change the feature projected (no crash expected) -SketchProjection_1.setExternalFeature(model.selection("EDGE", "Sketch_1/Edge-SketchLine_1")) +SketchProjection_1.setExternalFeature(model.selection("EDGE", "Sketch_1/SketchLine_1")) model.do() model.end() + +from GeomAPI import GeomAPI_Shape + +model.testNbSubShapes(Sketch_2, GeomAPI_Shape.EDGE, [1]) diff --git a/src/SketchPlugin/Test/TestSignedDistancePointLine.py b/src/SketchPlugin/Test/TestSignedDistancePointLine.py index 5339a7aa6..286121bb1 100644 --- a/src/SketchPlugin/Test/TestSignedDistancePointLine.py +++ b/src/SketchPlugin/Test/TestSignedDistancePointLine.py @@ -75,7 +75,7 @@ SketchConstraintDistance_8 = Sketch_1.setDistance(SketchPoint_1.coordinates(), S SketchConstraintDistance_9 = Sketch_1.setDistance(SketchPoint_2.coordinates(), SketchPoint_1.coordinates(), 50, True) SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_1.result(), "length/8") model.do() -Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchArc_1_2r-SketchArc_2_2r-SketchLine_2r-SketchLine_3r-SketchLine_4r-SketchLine_5r-SketchLine_6r-SketchLine_7r-SketchLine_8r-SketchLine_9r-SketchArc_3_2f")], model.selection(), 500, 0) +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchArc_1_2r-SketchLine_9r-SketchLine_8r-SketchLine_7r-SketchLine_6r-SketchLine_5r-SketchLine_4r-SketchArc_3_2f-SketchLine_3r-SketchLine_2r-SketchArc_2_2r")], model.selection(), 500, 0) Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f"), model.selection("FACE", "Sketch_1/Face-SketchCircle_2_2f")], model.selection(), 500, -400) Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f"), model.selection("FACE", "Sketch_1/Face-SketchCircle_2_2f")], model.selection(), 100, 0) model.do() diff --git a/src/SketchPlugin/Test/TestSignedDistancePointPoint.py b/src/SketchPlugin/Test/TestSignedDistancePointPoint.py index d2bca85b4..32b1f4c94 100644 --- a/src/SketchPlugin/Test/TestSignedDistancePointPoint.py +++ b/src/SketchPlugin/Test/TestSignedDistancePointPoint.py @@ -75,7 +75,7 @@ SketchConstraintDistance_8 = Sketch_1.setDistance(SketchPoint_1.coordinates(), S SketchConstraintDistance_9 = Sketch_1.setDistance(SketchPoint_2.coordinates(), SketchPoint_1.coordinates(), 50, True) SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_1.result(), "length/8") model.do() -Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchArc_1_2r-SketchArc_2_2r-SketchLine_2r-SketchLine_3r-SketchLine_4r-SketchLine_5r-SketchLine_6r-SketchLine_7r-SketchLine_8r-SketchLine_9r-SketchArc_3_2f")], model.selection(), 500, 0) +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchArc_1_2r-SketchLine_9r-SketchLine_8r-SketchLine_7r-SketchLine_6r-SketchLine_5r-SketchLine_4r-SketchArc_3_2f-SketchLine_3r-SketchLine_2r-SketchArc_2_2r")], model.selection(), 500, 0) Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f"), model.selection("FACE", "Sketch_1/Face-SketchCircle_2_2f")], model.selection(), 500, -400) Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f"), model.selection("FACE", "Sketch_1/Face-SketchCircle_2_2f")], model.selection(), 100, 0) model.do()