]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Update incorrect units tests and add missing tests (issues #2838, #2839, #2840, ...
authorazv <azv@opencascade.com>
Fri, 18 Jan 2019 13:05:05 +0000 (16:05 +0300)
committerazv <azv@opencascade.com>
Fri, 18 Jan 2019 13:05:05 +0000 (16:05 +0300)
12 files changed:
src/ModelAPI/CMakeLists.txt
src/ModelAPI/Test/TestExternalConstruction.py
src/ModelAPI/Test/TestFolder_Sketch.py
src/PythonAPI/CMakeLists.txt
src/PythonAPI/Test/Test2044.py
src/PythonAPI/Test/TestFeaturesRevolution.py
src/SketchAPI/SketchAPI_Sketch.cpp
src/SketchPlugin/Test/Test1061.py
src/SketchPlugin/Test/Test1779.py
src/SketchPlugin/Test/TestProjectionUpdate.py
src/SketchPlugin/Test/TestSignedDistancePointLine.py
src/SketchPlugin/Test/TestSignedDistancePointPoint.py

index 19fa6c522568ba0669f8c1b1f228f1c4084a9e9f..adfe565d1672eaa030966e3c764f8c8f1ab7a2fa 100644 (file)
@@ -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
index 5437fe05292b02d0a5d430f5eb1f015b38e752c0..a418a65087a069e17f0dfe23e33105e423b53fd8 100644 (file)
@@ -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())
index bf6768a1ff0e0a29b80fca2240c46aad43c1f7bd..b61b56ca443290b6b10c597650d78946fa3a10fe 100644 (file)
@@ -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())
index bd31cd108a0abe51b73b7fdcb190d000190b08cc..f1728ee63fbac4fb21c5c61e8a2b4909bda6ddb4 100644 (file)
@@ -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
 
index 3fff3e3e28fcb177e7d51732b944082368cb968e..b9b050e46259f7a8422fa0d082e16515248d271d 100644 (file)
@@ -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()
index 9b24e95505456ad3c546e086e3747e4011e08789..b79c4703e694a8e9b2786568796cd05d19d4a34f 100644 (file)
@@ -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)
 
 
index 9b202f6dd6f3fea76a547b12868fddcc572abc03..cba215936ed4e2cef5f159ab65edacf56a2a9094 100644 (file)
@@ -572,9 +572,9 @@ std::shared_ptr<ModelHighAPI_Interface> 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<ModelHighAPI_Interface> 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<ModelHighAPI_Interface> 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));
 }
index 6fa4320f0d8651292d2b77ba4ec946587b2889df..2120c4d185888eaedd6270c5eb370e07a310be59 100644 (file)
@@ -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())
index 797248731414e585bcaa1c973c0984fb9b712737..142ede474f98ee0b0eb0c4757fcdb170658c2e82 100644 (file)
@@ -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
index e3312d02e1ae274fdf948891aac30c866c1f55ae..3a5ea10fdabed57ce36d5873aec53c5a73aa2da3 100644 (file)
@@ -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])
index 5339a7aa650eabf72801c3737eaa1d2db2848271..286121bb12f03659f1c81184692a8c7c3c16f5d5 100644 (file)
@@ -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()
index d2bca85b4fc41e6c4374acb77eb3d06d37c11b03..32b1f4c940b26e2d59a6bd1731ef87a53c5a2aab 100644 (file)
@@ -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()