1 # Copyright (C) 2014-2021 CEA/DEN, EDF R&D
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 from SketchAPI import *
22 from salome.shaper import model
25 partSet = model.moduleDocument()
26 model.addParameter(partSet, "Gap", "10")
27 model.addParameter(partSet, "Rod", "12")
28 model.addParameter(partSet, "Thickness", "25")
29 Part_1 = model.addPart(partSet)
30 Part_1.setName("Body")
31 Part_1_doc = Part_1.document()
32 model.addParameter(Part_1_doc, "Radius", "50", "Radius of the body")
33 model.addParameter(Part_1_doc, "Width", "25", "Width of body arms")
34 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
35 SketchLine_1 = Sketch_1.addLine(50, 14.61148285474187, 50, 0)
36 SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_1.result(), 14.61148285474187)
37 SketchLine_2 = Sketch_1.addLine(50, 0, 6, 0)
38 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
39 SketchLine_3 = Sketch_1.addLine(7, 25, 16.13599978860571, 25)
40 SketchLine_3.setName("SketchLine_4")
41 SketchLine_3.result().setName("SketchLine_4")
42 SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_3.result())
43 SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_2.result())
44 SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_1.result())
45 SketchConstraintVertical_1.setName("SketchConstraintVertical_2")
46 SketchArc_1 = Sketch_1.addArc(16.1359986285606, -59.99999999999999, 16.13599978860571, 25, 46.80399475966571, 19.27467447616896, True)
47 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchArc_1.startPoint())
48 SketchConstraintCoincidence_2.setName("SketchConstraintCoincidence_4")
49 SketchConstraintTangent_1 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchLine_3.result())
50 SketchArc_2 = Sketch_1.addArc(45, 14.61145639129118, 46.80399475966571, 19.27467447616896, 50, 14.61148285474187, True)
51 SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchArc_2.startPoint(), SketchArc_1.endPoint())
52 SketchConstraintCoincidence_3.setName("SketchConstraintCoincidence_6")
53 SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchArc_2.endPoint(), SketchLine_1.startPoint())
54 SketchConstraintCoincidence_4.setName("SketchConstraintCoincidence_7")
55 SketchConstraintTangent_2 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchArc_2.results()[1])
56 SketchConstraintTangent_3 = Sketch_1.setTangent(SketchArc_2.results()[1], SketchLine_1.result())
57 SketchPoint_1 = Sketch_1.addPoint(50, 17.96300027009704)
58 SketchPoint_1.setAuxiliary(True)
59 SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchLine_1.result())
60 SketchConstraintCoincidence_5.setName("SketchConstraintCoincidence_8")
61 SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchPoint_1.result(), SketchArc_1.results()[1])
62 SketchConstraintCoincidence_6.setName("SketchConstraintCoincidence_9")
63 SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_2.results()[1], 5)
64 SketchPoint_2 = Sketch_1.addPoint(model.selection("VERTEX", "PartSet/Origin"))
65 SketchConstraintRadius_2 = Sketch_1.setRadius(SketchArc_1.results()[1], 85)
66 SketchConstraintRadius_2.setName("SketchConstraintRadius_4")
67 SketchLine_4 = Sketch_1.addLine(model.selection("EDGE", "PartSet/OZ"))
68 SketchLine_4.setName("SketchLine_27")
69 SketchLine_4.result().setName("SketchLine_27")
70 SketchConstraintDistance_1 = Sketch_1.setDistance(SketchLine_4.result(), SketchLine_2.startPoint(), "Radius")
71 SketchConstraintDistance_1.setName("SketchConstraintDistance_13")
72 SketchConstraintDistance_2 = Sketch_1.setDistance(SketchLine_3.startPoint(), SketchLine_2.result(), "Thickness")
73 SketchConstraintDistance_2.setName("SketchConstraintDistance_14")
74 SketchLine_5 = Sketch_1.addLine(6, 0, 6, 24)
75 SketchLine_5.setName("SketchLine_28")
76 SketchLine_5.result().setName("SketchLine_28")
77 SketchLine_6 = Sketch_1.addLine(6, 24, 7, 25)
78 SketchLine_6.setName("SketchLine_29")
79 SketchLine_6.result().setName("SketchLine_29")
80 SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
81 SketchConstraintCoincidence_7.setName("SketchConstraintCoincidence_32")
82 SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_5.result())
83 SketchConstraintVertical_2.setName("SketchConstraintVertical_3")
84 SketchConstraintDistance_3 = Sketch_1.setDistance(SketchLine_5.startPoint(), SketchLine_4.result(), "Rod/2")
85 SketchConstraintDistance_3.setName("SketchConstraintDistance_15")
86 SketchConstraintAngle_1 = Sketch_1.setAngleComplementary(SketchLine_6.result(), SketchLine_5.result(), 45.00000000000006)
87 SketchConstraintAngle_1.setName("SketchConstraintAngle_3")
88 SketchConstraintDistance_4 = Sketch_1.setDistance(SketchLine_4.result(), SketchLine_6.endPoint(), "Rod/2 + 1")
89 SketchConstraintDistance_4.setName("SketchConstraintDistance_16")
90 SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_5.startPoint())
91 SketchConstraintCoincidence_8.setName("SketchConstraintCoincidence_33")
92 SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_3.startPoint())
93 SketchConstraintCoincidence_9.setName("SketchConstraintCoincidence_34")
94 SketchLine_7 = Sketch_1.addLine(model.selection("EDGE", "PartSet/OX"))
95 SketchLine_7.setName("SketchLine_30")
96 SketchLine_7.result().setName("SketchLine_30")
97 SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_5.startPoint(), SketchLine_7.result())
98 SketchConstraintCoincidence_10.setName("SketchConstraintCoincidence_35")
100 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchArc_2_2f-SketchArc_1_2f-SketchLine_4r-SketchLine_29r-SketchLine_28r-SketchLine_2r-SketchLine_1r")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
101 Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_2"))
102 SketchLine_8 = Sketch_2.addLine(0, 0, 25, 43.30127018922193)
103 SketchLine_8.setName("SketchLine_5")
104 SketchLine_8.result().setName("SketchLine_5")
105 SketchLine_8.setAuxiliary(True)
106 SketchPoint_3 = Sketch_2.addPoint(model.selection("VERTEX", "PartSet/Origin"))
107 SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchLine_8.startPoint(), SketchPoint_3.result())
108 SketchCircle_1 = Sketch_2.addCircle(model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_2][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1]"))
109 SketchConstraintCoincidence_12 = Sketch_2.setCoincident(SketchLine_8.endPoint(), SketchCircle_1.results()[1])
110 SketchLine_9 = Sketch_2.addLine(39.43375672974064, -43.30127018922192, 15.87711932209923, -2.499977343709401)
111 SketchLine_9.setName("SketchLine_10")
112 SketchLine_9.result().setName("SketchLine_10")
113 SketchLine_10 = Sketch_2.addLine(0, 0, 25, -43.30127018922193)
114 SketchLine_10.setName("SketchLine_6")
115 SketchLine_10.result().setName("SketchLine_6")
116 SketchLine_10.setAuxiliary(True)
117 SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_10.startPoint(), SketchPoint_3.result())
118 SketchCircle_2 = Sketch_2.addCircle(model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_2][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1]"))
119 SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_10.endPoint(), SketchCircle_2.results()[1])
120 SketchLine_11 = Sketch_2.addLine(15.87713238415337, 2.499999967850816, 39.43375672974065, 43.30127018922192)
121 SketchLine_11.setName("SketchLine_11")
122 SketchLine_11.result().setName("SketchLine_11")
123 SketchLine_12 = Sketch_2.addLine(model.selection("EDGE", "PartSet/OX"))
124 SketchLine_12.setName("SketchLine_7")
125 SketchLine_12.result().setName("SketchLine_7")
126 SketchConstraintAngle_2 = Sketch_2.setAngleBackward(SketchLine_12.result(), SketchLine_10.result(), 59.99999999999994)
127 SketchConstraintAngle_2.setName("SketchConstraintAngle_1")
128 SketchConstraintAngle_3 = Sketch_2.setAngle(SketchLine_12.result(), SketchLine_8.result(), 59.99999999999999)
129 SketchConstraintAngle_3.setName("SketchConstraintAngle_2")
130 SketchLine_13 = Sketch_2.addLine(14.43375672974065, -4.667176185980158e-016, 39.43375672974065, 43.30127018922192)
131 SketchLine_13.setName("SketchLine_9")
132 SketchLine_13.result().setName("SketchLine_9")
133 SketchLine_13.setAuxiliary(True)
134 SketchLine_14 = Sketch_2.addLine(39.43375672974064, -43.30127018922192, 14.43375672974065, -4.667176185980158e-016)
135 SketchLine_14.setName("SketchLine_8")
136 SketchLine_14.result().setName("SketchLine_8")
137 SketchLine_14.setAuxiliary(True)
138 SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchLine_14.endPoint(), SketchLine_13.startPoint())
139 SketchConstraintCoincidence_15.setName("SketchConstraintCoincidence_16")
140 SketchConstraintParallel_1 = Sketch_2.setParallel(SketchLine_14.result(), SketchLine_10.result())
141 SketchConstraintParallel_2 = Sketch_2.setParallel(SketchLine_13.result(), SketchLine_8.result())
142 SketchConstraintEqual_1 = Sketch_2.setEqual(SketchLine_8.result(), SketchLine_14.result())
143 SketchConstraintEqual_2 = Sketch_2.setEqual(SketchLine_10.result(), SketchLine_13.result())
144 SketchConstraintDistance_5 = Sketch_2.setDistance(SketchLine_13.startPoint(), SketchLine_10.result(), "Width/2")
145 SketchConstraintDistance_5.setName("SketchConstraintDistance_4")
146 SketchArc_3 = Sketch_2.addArc(20.20725942163691, 2.933703812344835e-015, 15.87713238415337, 2.499999967850816, 15.87711932209923, -2.499977343709401, False)
147 SketchConstraintCoincidence_16 = Sketch_2.setCoincident(SketchArc_3.startPoint(), SketchLine_11.startPoint())
148 SketchConstraintCoincidence_16.setName("SketchConstraintCoincidence_15")
149 SketchConstraintCoincidence_17 = Sketch_2.setCoincident(SketchArc_3.endPoint(), SketchLine_9.endPoint())
150 SketchConstraintTangent_4 = Sketch_2.setTangent(SketchArc_3.results()[1], SketchLine_9.result())
151 SketchConstraintTangent_5 = Sketch_2.setTangent(SketchArc_3.results()[1], SketchLine_11.result())
152 SketchConstraintCoincidence_18 = Sketch_2.setCoincident(SketchLine_14.startPoint(), SketchLine_9.startPoint())
153 SketchConstraintCoincidence_19 = Sketch_2.setCoincident(SketchLine_13.endPoint(), SketchLine_11.endPoint())
154 SketchConstraintCoincidence_20 = Sketch_2.setCoincident(SketchLine_9.endPoint(), SketchLine_14.result())
155 SketchConstraintCoincidence_21 = Sketch_2.setCoincident(SketchLine_11.startPoint(), SketchLine_13.result())
156 SketchConstraintRadius_3 = Sketch_2.setRadius(SketchArc_3.results()[1], 5)
157 SketchConstraintRadius_3.setName("SketchConstraintRadius_2")
158 SketchConstraintDistance_6 = Sketch_2.setDistance(SketchLine_13.startPoint(), SketchLine_8.result(), "Width/2")
159 SketchConstraintDistance_6.setName("SketchConstraintDistance_5")
160 SketchArc_4 = Sketch_2.addArc(14.43375672974064, -1.454136002932938e-015, 39.43375672974064, -43.30127018922192, 39.43375672974065, 43.30127018922192, False)
161 SketchConstraintCoincidence_22 = Sketch_2.setCoincident(SketchLine_9.startPoint(), SketchArc_4.startPoint())
162 SketchConstraintCoincidence_23 = Sketch_2.setCoincident(SketchLine_14.startPoint(), SketchArc_4.startPoint())
163 SketchConstraintCoincidence_24 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchArc_4.endPoint())
164 SketchConstraintCoincidence_25 = Sketch_2.setCoincident(SketchLine_13.endPoint(), SketchArc_4.endPoint())
165 SketchConstraintEqual_3 = Sketch_2.setEqual(SketchArc_4.results()[1], SketchCircle_1.results()[1])
166 SketchMultiRotation_1_objects = [SketchLine_11.result(), SketchArc_3.results()[1], SketchLine_9.result(), SketchArc_4.results()[1]]
167 SketchMultiRotation_1 = Sketch_2.addRotation(SketchMultiRotation_1_objects, SketchCircle_2.center(), 120, 3)
168 [SketchLine_15, SketchLine_16, SketchArc_5, SketchArc_6, SketchLine_17, SketchLine_18, SketchArc_7, SketchArc_8] = SketchMultiRotation_1.rotated()
169 SketchArc_7.setName("SketchArc_6")
170 SketchArc_7.result().setName("SketchArc_6")
171 SketchArc_7.results()[1].setName("SketchArc_6_2")
172 SketchLine_18.setName("SketchLine_15")
173 SketchLine_18.result().setName("SketchLine_15")
174 SketchLine_17.setName("SketchLine_13")
175 SketchLine_17.result().setName("SketchLine_13")
176 SketchArc_6.setName("SketchArc_7")
177 SketchArc_6.result().setName("SketchArc_7")
178 SketchArc_6.results()[1].setName("SketchArc_7_2")
179 SketchLine_16.setName("SketchLine_14")
180 SketchLine_16.result().setName("SketchLine_14")
181 SketchLine_15.setName("SketchLine_12")
182 SketchLine_15.result().setName("SketchLine_12")
183 SketchLine_19 = Sketch_2.addLine(7.828185376255509, -23.55881480274223, 31.38482278389692, -64.36010764825475)
184 SketchLine_19.setName("SketchLine_16")
185 SketchLine_19.result().setName("SketchLine_16")
186 SketchLine_20 = Sketch_2.addLine(31.38482278389692, -64.36010764825475, 40.0450768217413, -59.36010764825475)
187 SketchLine_20.setName("SketchLine_17")
188 SketchLine_20.result().setName("SketchLine_17")
189 SketchConstraintCoincidence_26 = Sketch_2.setCoincident(SketchLine_19.endPoint(), SketchLine_20.startPoint())
190 SketchConstraintCoincidence_26.setName("SketchConstraintCoincidence_28")
191 SketchLine_21 = Sketch_2.addLine(40.0450768217413, -59.36010764825475, 16.48843941409989, -18.55881480274223)
192 SketchLine_21.setName("SketchLine_18")
193 SketchLine_21.result().setName("SketchLine_18")
194 SketchConstraintCoincidence_27 = Sketch_2.setCoincident(SketchLine_20.endPoint(), SketchLine_21.startPoint())
195 SketchConstraintCoincidence_27.setName("SketchConstraintCoincidence_29")
196 SketchConstraintParallel_3 = Sketch_2.setParallel(SketchLine_10.result(), SketchLine_19.result())
197 SketchConstraintParallel_4 = Sketch_2.setParallel(SketchLine_10.result(), SketchLine_21.result())
198 SketchConstraintEqual_4 = Sketch_2.setEqual(SketchLine_9.result(), SketchLine_21.result())
199 SketchConstraintEqual_5 = Sketch_2.setEqual(SketchLine_9.result(), SketchLine_19.result())
200 SketchConstraintDistance_7 = Sketch_2.setDistance(SketchCircle_1.center(), SketchLine_19.result(), "Gap/2")
201 SketchConstraintDistance_7.setName("SketchConstraintDistance_6")
202 SketchConstraintDistance_8 = Sketch_2.setDistance(SketchCircle_1.center(), SketchLine_21.result(), "Gap/2")
203 SketchConstraintDistance_8.setName("SketchConstraintDistance_7")
204 SketchArc_9 = Sketch_2.addArc(10.5, -18.18653347947321, 7.828185376255509, -23.55881480274223, 16.48843941409989, -18.55881480274223, True)
205 SketchConstraintCoincidence_28 = Sketch_2.setCoincident(SketchArc_9.center(), SketchLine_10.result())
206 SketchConstraintCoincidence_28.setName("SketchConstraintCoincidence_27")
207 SketchConstraintCoincidence_29 = Sketch_2.setCoincident(SketchLine_19.startPoint(), SketchArc_9.startPoint())
208 SketchConstraintCoincidence_29.setName("SketchConstraintCoincidence_30")
209 SketchConstraintCoincidence_30 = Sketch_2.setCoincident(SketchArc_9.endPoint(), SketchLine_21.endPoint())
210 SketchConstraintCoincidence_30.setName("SketchConstraintCoincidence_31")
211 SketchConstraintRadius_4 = Sketch_2.setRadius(SketchArc_9.results()[1], 6)
212 SketchConstraintRadius_4.setName("SketchConstraintRadius_3")
213 SketchMultiRotation_2_objects = [SketchLine_19.result(), SketchLine_20.result(), SketchLine_21.result(), SketchArc_9.results()[1]]
214 SketchMultiRotation_2 = Sketch_2.addRotation(SketchMultiRotation_2_objects, SketchCircle_1.center(), 120, 3)
215 [SketchLine_22, SketchLine_23, SketchLine_24, SketchLine_25, SketchLine_26, SketchLine_27, SketchArc_10, SketchArc_11] = SketchMultiRotation_2.rotated()
216 SketchLine_27.setName("SketchLine_24")
217 SketchLine_27.result().setName("SketchLine_24")
218 SketchLine_26.setName("SketchLine_21")
219 SketchLine_26.result().setName("SketchLine_21")
220 SketchLine_25.setName("SketchLine_23")
221 SketchLine_25.result().setName("SketchLine_23")
222 SketchLine_24.setName("SketchLine_20")
223 SketchLine_24.result().setName("SketchLine_20")
224 SketchLine_23.setName("SketchLine_22")
225 SketchLine_23.result().setName("SketchLine_22")
226 SketchLine_22.setName("SketchLine_19")
227 SketchLine_22.result().setName("SketchLine_19")
228 SketchConstraintDistance_9 = Sketch_2.setDistance(SketchArc_9.center(), SketchPoint_3.coordinates(), 21)
229 SketchConstraintDistance_9.setName("SketchConstraintDistance_8")
231 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_2/Face-SketchArc_4_2f-SketchLine_11r-SketchArc_3_2f-SketchLine_10r_wire"), model.selection("WIRE", "Sketch_2/Face-SketchArc_7_2f-SketchLine_15r-SketchArc_8_2f-SketchLine_14r_wire"), model.selection("FACE", "Sketch_2/Face-SketchArc_5_2f-SketchLine_13r-SketchArc_6_2f-SketchLine_12r"), model.selection("FACE", "Sketch_2/Face-SketchLine_19f-SketchLine_20f-SketchLine_21f-SketchArc_10_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_16f-SketchLine_17f-SketchLine_18f-SketchArc_9_2f"), model.selection("WIRE", "Sketch_2/Face-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchArc_11_2f_wire")], model.selection(), model.selection(), 10, model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_4"), 10)
232 Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Revolution_1_1")], [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_1_4"), model.selection("SOLID", "Extrusion_1_5")])
233 Cut_2 = model.addCut(Part_1_doc, [model.selection("SOLID", "Cut_1_1")], [model.selection("SOLID", "Extrusion_1_2"), model.selection("SOLID", "Extrusion_1_3"), model.selection("SOLID", "Extrusion_1_6")])
234 Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Cut_2_1/Modified_Face&Sketch_2/SketchLine_21"), model.selection("FACE", "Cut_2_1/Modified_Face&Sketch_2/SketchLine_19"))
235 Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
236 SketchCircle_3 = Sketch_3.addCircle(25, -10, 4)
237 SketchCircle_4 = Sketch_3.addCircle(40, -10, 4)
238 SketchConstraintRadius_5 = Sketch_3.setRadius(SketchCircle_4.results()[1], 4)
239 SketchConstraintEqual_6 = Sketch_3.setEqual(SketchCircle_3.results()[1], SketchCircle_4.results()[1])
240 SketchLine_28 = Sketch_3.addLine(model.selection("EDGE", "PartSet/OZ"))
241 SketchLine_28.setName("SketchLine_25")
242 SketchLine_28.result().setName("SketchLine_25")
243 SketchConstraintDistance_10 = Sketch_3.setDistance(SketchCircle_3.center(), SketchLine_28.result(), 25)
244 SketchConstraintDistance_10.setName("SketchConstraintDistance_9")
245 SketchConstraintDistance_11 = Sketch_3.setDistance(SketchCircle_4.center(), SketchLine_28.result(), 40)
246 SketchConstraintDistance_11.setName("SketchConstraintDistance_10")
247 SketchProjection_1 = Sketch_3.addProjection(model.selection("EDGE", "Cut_2_1/Generated_Edge&Sketch_2/SketchLine_21&Sketch_1/SketchLine_2"), False)
248 SketchLine_29 = SketchProjection_1.createdFeature()
249 SketchLine_29.setName("SketchLine_26")
250 SketchLine_29.result().setName("SketchLine_26")
251 SketchConstraintDistance_12 = Sketch_3.setDistance(SketchCircle_4.center(), SketchLine_29.result(), 10)
252 SketchConstraintDistance_12.setName("SketchConstraintDistance_11")
253 SketchConstraintDistance_13 = Sketch_3.setDistance(SketchCircle_3.center(), SketchLine_29.result(), 10)
254 SketchConstraintDistance_13.setName("SketchConstraintDistance_12")
256 Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchCircle_3_2r"), model.selection("WIRE", "Sketch_3/Face-SketchCircle_4_2f_wire")], model.selection(), model.selection("FACE", "Cut_1_1/Modified_Face&Sketch_2/SketchLine_11"), 5, model.selection("FACE", "Cut_1_1/Modified_Face&Sketch_2/SketchLine_13"), 5)
257 Cut_3 = model.addCut(Part_1_doc, [model.selection("SOLID", "Cut_2_1")], [model.selection("SOLID", "Extrusion_2_1"), model.selection("SOLID", "Extrusion_2_2")])
258 Recover_1 = model.addRecover(Part_1_doc, Cut_3, [Extrusion_2.results()[1], Extrusion_2.result()])
259 Rotation_1 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Recover_1_1"), model.selection("SOLID", "Recover_1_2")], model.selection("EDGE", "PartSet/OZ"), 120)
260 Cut_4 = model.addCut(Part_1_doc, [model.selection("SOLID", "Cut_3_1")], [model.selection("SOLID", "Rotation_1_1"), model.selection("SOLID", "Rotation_1_2")])
261 Recover_2 = model.addRecover(Part_1_doc, Cut_4, [Rotation_1.results()[1], Rotation_1.result()])
262 Rotation_2 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Recover_2_1"), model.selection("SOLID", "Recover_2_2")], model.selection("EDGE", "PartSet/OZ"), 120)
263 Cut_5 = model.addCut(Part_1_doc, [model.selection("SOLID", "Cut_4_1")], [model.selection("SOLID", "Rotation_2_2"), model.selection("SOLID", "Rotation_2_1")])
265 Part_2 = model.addPart(partSet)
266 Part_2.setName("Arm 1")
267 Part_2_doc = Part_2.document()
268 model.addParameter(Part_2_doc, "a", "7.5")
269 model.addParameter(Part_2_doc, "b", "12.5")
270 model.addParameter(Part_2_doc, "c", "(a-b)/4")
271 Sketch_4 = model.addSketch(Part_2_doc, model.defaultPlane("XOY"))
272 SketchLine_30 = Sketch_4.addLine(-7.563632736215193e-032, -5.762896622594646, 0, 3.75)
273 SketchLine_30.setAuxiliary(True)
274 SketchLine_31 = Sketch_4.addLine(0, 3.75, 4.894344934278314, 2.394344934278312)
275 SketchLine_31.setAuxiliary(True)
276 SketchConstraintCoincidence_31 = Sketch_4.setCoincident(SketchLine_30.endPoint(), SketchLine_31.startPoint())
277 SketchLine_32 = Sketch_4.addLine(4.894344934278314, 2.394344934278312, -7.563632736215193e-032, -5.762896622594646)
278 SketchLine_32.setAuxiliary(True)
279 SketchConstraintCoincidence_32 = Sketch_4.setCoincident(SketchLine_31.endPoint(), SketchLine_32.startPoint())
280 SketchConstraintCoincidence_33 = Sketch_4.setCoincident(SketchLine_30.startPoint(), SketchLine_32.endPoint())
281 SketchConstraintVertical_3 = Sketch_4.setVertical(SketchLine_30.result())
282 SketchLine_33 = Sketch_4.addLine(0, 3.75, 6.25, 3.75)
283 SketchLine_33.setAuxiliary(True)
284 SketchConstraintCoincidence_34 = Sketch_4.setCoincident(SketchLine_30.endPoint(), SketchLine_33.startPoint())
285 SketchConstraintCoincidence_35 = Sketch_4.setCoincident(SketchLine_31.startPoint(), SketchLine_33.startPoint())
286 SketchLine_34 = Sketch_4.addLine(6.25, 3.75, 6.25, 0)
287 SketchLine_34.setAuxiliary(True)
288 SketchConstraintCoincidence_36 = Sketch_4.setCoincident(SketchLine_33.endPoint(), SketchLine_34.startPoint())
289 SketchLine_35 = Sketch_4.addLine(6.25, 0, 0, 0)
290 SketchLine_35.setAuxiliary(True)
291 SketchConstraintCoincidence_37 = Sketch_4.setCoincident(SketchLine_34.endPoint(), SketchLine_35.startPoint())
292 SketchConstraintCoincidence_38 = Sketch_4.setCoincident(SketchLine_35.endPoint(), SketchLine_30.result())
293 SketchConstraintHorizontal_3 = Sketch_4.setHorizontal(SketchLine_35.result())
294 SketchConstraintHorizontal_4 = Sketch_4.setHorizontal(SketchLine_33.result())
295 SketchConstraintVertical_4 = Sketch_4.setVertical(SketchLine_34.result())
296 SketchLine_36 = Sketch_4.addLine(-7.563632736215193e-032, -5.762896622594646, 2.447172467139156, 3.072172467139157)
297 SketchLine_36.setAuxiliary(True)
298 SketchConstraintCoincidence_39 = Sketch_4.setCoincident(SketchLine_30.startPoint(), SketchLine_36.startPoint())
299 SketchConstraintCoincidence_40 = Sketch_4.setCoincident(SketchLine_32.endPoint(), SketchLine_36.startPoint())
300 SketchConstraintCoincidence_41 = Sketch_4.setCoincident(SketchLine_36.endPoint(), SketchLine_31.result())
301 SketchConstraintPerpendicular_1 = Sketch_4.setPerpendicular(SketchLine_36.result(), SketchLine_31.result())
302 SketchPoint_4 = Sketch_4.addPoint(model.selection("VERTEX", "PartSet/Origin"))
303 SketchConstraintCoincidence_42 = Sketch_4.setCoincident(SketchLine_35.endPoint(), SketchPoint_4.coordinates())
304 SketchConstraintCoincidence_42.setName("SketchConstraintCoincidence_20")
305 SketchConstraintLength_1 = Sketch_4.setLength(SketchLine_33.result(), "b/2")
306 SketchConstraintLength_2 = Sketch_4.setLength(SketchLine_34.result(), "a/2")
307 SketchCircle_5 = Sketch_4.addCircle(1.25, -1.25, 1.25)
308 SketchCircle_5.setAuxiliary(True)
309 SketchConstraintRadius_6 = Sketch_4.setRadius(SketchCircle_5.results()[1], "(b-a)/4")
310 SketchConstraintTangent_6 = Sketch_4.setTangent(SketchCircle_5.results()[1], SketchLine_35.result())
311 SketchConstraintTangent_7 = Sketch_4.setTangent(SketchCircle_5.results()[1], SketchLine_30.result())
312 SketchConstraintTangent_8 = Sketch_4.setTangent(SketchCircle_5.results()[1], SketchLine_32.result())
313 SketchLine_37 = Sketch_4.addLine(4.894344934278314, 2.394344934278312, 6.25, 0)
314 SketchLine_37.setAuxiliary(True)
315 SketchConstraintCoincidence_44 = Sketch_4.setCoincident(SketchLine_31.endPoint(), SketchLine_37.startPoint())
316 SketchConstraintCoincidence_45 = Sketch_4.setCoincident(SketchLine_32.startPoint(), SketchLine_37.startPoint())
317 SketchConstraintCoincidence_46 = Sketch_4.setCoincident(SketchLine_34.endPoint(), SketchLine_37.endPoint())
318 SketchConstraintCoincidence_47 = Sketch_4.setCoincident(SketchLine_35.startPoint(), SketchLine_37.endPoint())
319 SketchLine_38 = Sketch_4.addLine(0, 3.75, 6.25, 0)
320 SketchLine_38.setName("SketchLine_10")
321 SketchLine_38.result().setName("SketchLine_10")
322 SketchLine_38.setAuxiliary(True)
323 SketchConstraintCoincidence_48 = Sketch_4.setCoincident(SketchLine_30.endPoint(), SketchLine_38.startPoint())
324 SketchConstraintCoincidence_48.setName("SketchConstraintCoincidence_23")
325 SketchConstraintCoincidence_49 = Sketch_4.setCoincident(SketchLine_31.startPoint(), SketchLine_38.startPoint())
326 SketchConstraintCoincidence_49.setName("SketchConstraintCoincidence_24")
327 SketchConstraintCoincidence_50 = Sketch_4.setCoincident(SketchLine_33.startPoint(), SketchLine_38.startPoint())
328 SketchConstraintCoincidence_50.setName("SketchConstraintCoincidence_25")
329 SketchConstraintCoincidence_51 = Sketch_4.setCoincident(SketchLine_34.endPoint(), SketchLine_38.endPoint())
330 SketchConstraintCoincidence_51.setName("SketchConstraintCoincidence_26")
331 SketchConstraintCoincidence_52 = Sketch_4.setCoincident(SketchLine_35.startPoint(), SketchLine_38.endPoint())
332 SketchConstraintCoincidence_52.setName("SketchConstraintCoincidence_27")
333 SketchConstraintCoincidence_53 = Sketch_4.setCoincident(SketchLine_37.endPoint(), SketchLine_38.endPoint())
334 SketchConstraintCoincidence_53.setName("SketchConstraintCoincidence_28")
335 SketchConstraintPerpendicular_2 = Sketch_4.setPerpendicular(SketchLine_32.result(), SketchLine_38.result())
336 SketchConstraintPerpendicular_2.setName("SketchConstraintPerpendicular_3")
337 SketchLine_39 = Sketch_4.addLine(model.selection("EDGE", "PartSet/OY"))
338 SketchLine_39.setName("SketchLine_11")
339 SketchLine_39.result().setName("SketchLine_11")
340 SketchLine_40 = Sketch_4.addLine(model.selection("EDGE", "PartSet/OX"))
341 SketchLine_40.setName("SketchLine_12")
342 SketchLine_40.result().setName("SketchLine_12")
343 SketchArc_12 = Sketch_4.addArc(-7.563632736215193e-032, -5.762896622594646, 0, 3.75, 4.894344934278314, 2.394344934278312, True)
344 SketchConstraintCoincidence_54 = Sketch_4.setCoincident(SketchLine_30.endPoint(), SketchArc_12.startPoint())
345 SketchConstraintCoincidence_54.setName("SketchConstraintCoincidence_30")
346 SketchConstraintCoincidence_55 = Sketch_4.setCoincident(SketchLine_31.startPoint(), SketchArc_12.startPoint())
347 SketchConstraintCoincidence_55.setName("SketchConstraintCoincidence_31")
348 SketchConstraintCoincidence_56 = Sketch_4.setCoincident(SketchLine_33.startPoint(), SketchArc_12.startPoint())
349 SketchConstraintCoincidence_56.setName("SketchConstraintCoincidence_32")
350 SketchConstraintCoincidence_57 = Sketch_4.setCoincident(SketchLine_38.startPoint(), SketchArc_12.startPoint())
351 SketchConstraintCoincidence_57.setName("SketchConstraintCoincidence_33")
352 SketchConstraintCoincidence_58 = Sketch_4.setCoincident(SketchArc_12.endPoint(), SketchLine_31.endPoint())
353 SketchConstraintCoincidence_58.setName("SketchConstraintCoincidence_34")
354 SketchConstraintCoincidence_59 = Sketch_4.setCoincident(SketchArc_12.center(), SketchLine_32.endPoint())
355 SketchConstraintCoincidence_59.setName("SketchConstraintCoincidence_35")
356 SketchArc_13 = Sketch_4.addArc(3.457737973711348, 3.788069295318559e-014, 6.25, 0, 4.894344934278314, 2.394344934278312, False)
357 SketchArc_13.setName("SketchArc_4")
358 SketchArc_13.result().setName("SketchArc_4")
359 SketchArc_13.results()[1].setName("SketchArc_4_2")
360 SketchConstraintCoincidence_60 = Sketch_4.setCoincident(SketchArc_13.startPoint(), SketchLine_35.startPoint())
361 SketchConstraintCoincidence_60.setName("SketchConstraintCoincidence_48")
362 SketchConstraintCoincidence_61 = Sketch_4.setCoincident(SketchArc_13.endPoint(), SketchArc_12.endPoint())
363 SketchConstraintCoincidence_61.setName("SketchConstraintCoincidence_49")
364 SketchConstraintCoincidence_43 = Sketch_4.setCoincident(SketchArc_13.center(), SketchLine_32.result())
365 SketchConstraintCoincidence_43.setName("SketchConstraintCoincidence_21")
366 SketchConstraintMirror_1 = Sketch_4.addMirror(SketchLine_40.result(), [SketchArc_13.results()[1], SketchArc_12.results()[1]])
367 [SketchArc_14, SketchArc_15] = SketchConstraintMirror_1.mirrored()
368 SketchArc_15.setName("SketchArc_6")
369 SketchArc_15.result().setName("SketchArc_6")
370 SketchArc_15.results()[1].setName("SketchArc_6_2")
371 SketchArc_14.setName("SketchArc_5")
372 SketchArc_14.result().setName("SketchArc_5")
373 SketchArc_14.results()[1].setName("SketchArc_5_2")
374 SketchConstraintMirror_2_objects = [SketchArc_12.results()[1], SketchArc_13.results()[1], SketchArc_14.results()[1], SketchArc_15.results()[1]]
375 SketchConstraintMirror_2 = Sketch_4.addMirror(SketchLine_39.result(), SketchConstraintMirror_2_objects)
376 [SketchArc_16, SketchArc_17, SketchArc_18, SketchArc_19] = SketchConstraintMirror_2.mirrored()
377 SketchArc_19.setName("SketchArc_10")
378 SketchArc_19.result().setName("SketchArc_10")
379 SketchArc_19.results()[1].setName("SketchArc_10_2")
380 SketchArc_18.setName("SketchArc_9")
381 SketchArc_18.result().setName("SketchArc_9")
382 SketchArc_18.results()[1].setName("SketchArc_9_2")
383 SketchArc_17.setName("SketchArc_8")
384 SketchArc_17.result().setName("SketchArc_8")
385 SketchArc_17.results()[1].setName("SketchArc_8_2")
386 SketchArc_16.setName("SketchArc_7")
387 SketchArc_16.result().setName("SketchArc_7")
388 SketchArc_16.results()[1].setName("SketchArc_7_2")
390 Sketch_5 = model.addSketch(Part_2_doc, model.defaultPlane("XOZ"))
391 SketchArc_20 = Sketch_5.addArc(75, 0, 21.9522369740045, 53.01825004597796, 20.93617039352901, -51.98174995402206, False)
392 SketchArc_20.setName("SketchArc_3")
393 SketchArc_20.result().setName("SketchArc_3")
394 SketchArc_20.results()[1].setName("SketchArc_3_2")
395 SketchArc_20.setAuxiliary(True)
396 SketchConstraintRadius_7 = Sketch_5.setRadius(SketchArc_20.results()[1], 75)
397 SketchLine_41 = Sketch_5.addLine(model.selection("EDGE", "PartSet/OX"))
398 SketchLine_41.setName("SketchLine_13")
399 SketchLine_41.result().setName("SketchLine_13")
400 SketchConstraintCoincidence_73 = Sketch_5.setCoincident(SketchArc_20.center(), SketchLine_41.result())
401 SketchConstraintCoincidence_73.setName("SketchConstraintCoincidence_38")
402 SketchConstraintCoincidence_74 = Sketch_5.setCoincident(SketchLine_41.startPoint(), SketchArc_20.results()[1])
403 SketchConstraintCoincidence_74.setName("SketchConstraintCoincidence_39")
404 SketchLine_42 = Sketch_5.addLine(16.9522369740045, -56.98174995402205, 16.9522369740045, -46.98174995402206)
405 SketchLine_42.setName("SketchLine_14")
406 SketchLine_42.result().setName("SketchLine_14")
407 SketchLine_43 = Sketch_5.addLine(16.9522369740045, -46.98174995402206, 36.95223697400451, -46.98174995402206)
408 SketchLine_43.setName("SketchLine_15")
409 SketchLine_43.result().setName("SketchLine_15")
410 SketchConstraintCoincidence_75 = Sketch_5.setCoincident(SketchLine_42.endPoint(), SketchLine_43.startPoint())
411 SketchConstraintCoincidence_75.setName("SketchConstraintCoincidence_40")
412 SketchLine_44 = Sketch_5.addLine(36.95223697400451, -46.98174995402206, 31.17873428210827, -56.98174995402205)
413 SketchLine_44.setName("SketchLine_16")
414 SketchLine_44.result().setName("SketchLine_16")
415 SketchConstraintCoincidence_76 = Sketch_5.setCoincident(SketchLine_43.endPoint(), SketchLine_44.startPoint())
416 SketchConstraintCoincidence_76.setName("SketchConstraintCoincidence_41")
417 SketchLine_45 = Sketch_5.addLine(31.17873428210827, -56.98174995402205, 16.9522369740045, -56.98174995402205)
418 SketchLine_45.setName("SketchLine_17")
419 SketchLine_45.result().setName("SketchLine_17")
420 SketchConstraintCoincidence_77 = Sketch_5.setCoincident(SketchLine_44.endPoint(), SketchLine_45.startPoint())
421 SketchConstraintCoincidence_77.setName("SketchConstraintCoincidence_42")
422 SketchConstraintCoincidence_78 = Sketch_5.setCoincident(SketchLine_42.startPoint(), SketchLine_45.endPoint())
423 SketchConstraintCoincidence_78.setName("SketchConstraintCoincidence_43")
424 SketchConstraintHorizontal_5 = Sketch_5.setHorizontal(SketchLine_43.result())
425 SketchConstraintHorizontal_6 = Sketch_5.setHorizontal(SketchLine_45.result())
426 SketchConstraintVertical_5 = Sketch_5.setVertical(SketchLine_42.result())
427 SketchConstraintAngle_4 = Sketch_5.setAngleComplementary(SketchLine_44.result(), SketchLine_45.result(), 60.00000000000006)
428 SketchConstraintDistance_14 = Sketch_5.setDistance(SketchLine_43.endPoint(), SketchLine_42.result(), 20)
429 SketchConstraintDistance_15 = Sketch_5.setDistance(SketchLine_42.startPoint(), SketchLine_43.result(), 10)
430 SketchLine_46 = Sketch_5.addLine(21.9522369740045, 53.01825004597796, 21.9522369740045, 0)
431 SketchLine_46.setName("SketchLine_18")
432 SketchLine_46.result().setName("SketchLine_18")
433 SketchLine_46.setAuxiliary(True)
434 SketchConstraintCoincidence_79 = Sketch_5.setCoincident(SketchArc_20.startPoint(), SketchLine_46.startPoint())
435 SketchConstraintCoincidence_79.setName("SketchConstraintCoincidence_44")
436 SketchConstraintCoincidence_80 = Sketch_5.setCoincident(SketchLine_46.endPoint(), SketchLine_41.result())
437 SketchConstraintCoincidence_80.setName("SketchConstraintCoincidence_45")
438 SketchConstraintVertical_6 = Sketch_5.setVertical(SketchLine_46.result())
439 SketchConstraintDistance_16 = Sketch_5.setDistance(SketchLine_42.endPoint(), SketchLine_46.result(), 5)
440 SketchConstraintDistance_17 = Sketch_5.setDistance(SketchArc_20.startPoint(), SketchLine_43.result(), 100)
441 SketchCircle_6 = Sketch_5.addCircle(21.9522369740045, 53.01825004597796, 8)
442 SketchConstraintCoincidence_81 = Sketch_5.setCoincident(SketchArc_20.startPoint(), SketchCircle_6.center())
443 SketchConstraintCoincidence_81.setName("SketchConstraintCoincidence_46")
444 SketchConstraintCoincidence_82 = Sketch_5.setCoincident(SketchLine_46.startPoint(), SketchCircle_6.center())
445 SketchConstraintCoincidence_82.setName("SketchConstraintCoincidence_47")
446 SketchConstraintRadius_8 = Sketch_5.setRadius(SketchCircle_6.results()[1], 8)
447 SketchCircle_7 = Sketch_5.addCircle(21.9522369740045, 53.01825004597796, 4)
448 SketchConstraintCoincidence_83 = Sketch_5.setCoincident(SketchArc_20.startPoint(), SketchCircle_7.center())
449 SketchConstraintCoincidence_83.setName("SketchConstraintCoincidence_61")
450 SketchConstraintCoincidence_84 = Sketch_5.setCoincident(SketchLine_46.startPoint(), SketchCircle_7.center())
451 SketchConstraintCoincidence_84.setName("SketchConstraintCoincidence_62")
452 SketchConstraintCoincidence_85 = Sketch_5.setCoincident(SketchCircle_6.center(), SketchCircle_7.center())
453 SketchConstraintCoincidence_85.setName("SketchConstraintCoincidence_63")
454 SketchConstraintRadius_9 = Sketch_5.setRadius(SketchCircle_7.results()[1], 4)
455 SketchLine_47 = Sketch_5.addLine(21.9522369740045, 53.01825004597796, 39.68353296044558, 53.01825004597796)
456 SketchLine_47.setName("SketchLine_19")
457 SketchLine_47.result().setName("SketchLine_19")
458 SketchLine_47.setAuxiliary(True)
459 SketchConstraintCoincidence_86 = Sketch_5.setCoincident(SketchArc_20.startPoint(), SketchLine_47.startPoint())
460 SketchConstraintCoincidence_86.setName("SketchConstraintCoincidence_64")
461 SketchConstraintCoincidence_87 = Sketch_5.setCoincident(SketchLine_46.startPoint(), SketchLine_47.startPoint())
462 SketchConstraintCoincidence_87.setName("SketchConstraintCoincidence_65")
463 SketchConstraintCoincidence_88 = Sketch_5.setCoincident(SketchCircle_6.center(), SketchLine_47.startPoint())
464 SketchConstraintCoincidence_88.setName("SketchConstraintCoincidence_66")
465 SketchConstraintCoincidence_89 = Sketch_5.setCoincident(SketchCircle_7.center(), SketchLine_47.startPoint())
466 SketchConstraintCoincidence_89.setName("SketchConstraintCoincidence_67")
467 SketchConstraintHorizontal_7 = Sketch_5.setHorizontal(SketchLine_47.result())
468 SketchConstraintDistance_18 = Sketch_5.setDistance(SketchArc_20.endPoint(), SketchLine_47.result(), 105)
469 SketchLine_48 = Sketch_5.addLine(75, 0, 20.93617039352901, -51.98174995402206)
470 SketchLine_48.setName("SketchLine_20")
471 SketchLine_48.result().setName("SketchLine_20")
472 SketchLine_48.setAuxiliary(True)
473 SketchConstraintCoincidence_90 = Sketch_5.setCoincident(SketchArc_20.center(), SketchLine_48.startPoint())
474 SketchConstraintCoincidence_90.setName("SketchConstraintCoincidence_68")
475 SketchConstraintCoincidence_91 = Sketch_5.setCoincident(SketchArc_20.endPoint(), SketchLine_48.endPoint())
476 SketchConstraintCoincidence_91.setName("SketchConstraintCoincidence_69")
477 SketchLine_49 = Sketch_5.addLine(21.9522369740045, 53.01825004597796, 0, 10)
478 SketchLine_49.setName("SketchLine_21")
479 SketchLine_49.result().setName("SketchLine_21")
480 SketchLine_49.setAuxiliary(True)
481 SketchConstraintCoincidence_92 = Sketch_5.setCoincident(SketchArc_20.startPoint(), SketchLine_49.startPoint())
482 SketchConstraintCoincidence_92.setName("SketchConstraintCoincidence_70")
483 SketchConstraintCoincidence_93 = Sketch_5.setCoincident(SketchLine_46.startPoint(), SketchLine_49.startPoint())
484 SketchConstraintCoincidence_93.setName("SketchConstraintCoincidence_71")
485 SketchConstraintCoincidence_94 = Sketch_5.setCoincident(SketchCircle_6.center(), SketchLine_49.startPoint())
486 SketchConstraintCoincidence_94.setName("SketchConstraintCoincidence_72")
487 SketchConstraintCoincidence_95 = Sketch_5.setCoincident(SketchCircle_7.center(), SketchLine_49.startPoint())
488 SketchConstraintCoincidence_95.setName("SketchConstraintCoincidence_73")
489 SketchConstraintCoincidence_96 = Sketch_5.setCoincident(SketchLine_47.startPoint(), SketchLine_49.startPoint())
490 SketchConstraintCoincidence_96.setName("SketchConstraintCoincidence_74")
491 SketchLine_50 = Sketch_5.addLine(model.selection("EDGE", "PartSet/OZ"))
492 SketchLine_50.setName("SketchLine_22")
493 SketchLine_50.result().setName("SketchLine_22")
494 SketchConstraintCoincidence_97 = Sketch_5.setCoincident(SketchLine_49.endPoint(), SketchLine_50.result())
495 SketchConstraintCoincidence_97.setName("SketchConstraintCoincidence_75")
496 SketchConstraintDistance_19 = Sketch_5.setDistance(SketchLine_49.endPoint(), SketchLine_41.result(), 10)
498 Face_1 = model.addFace(Part_2_doc, [model.selection("WIRE", "Sketch_1/Face-SketchArc_1_2f-SketchArc_7_2f-SketchArc_8_2f-SketchArc_9_2f-SketchArc_10_2f-SketchArc_6_2f-SketchArc_5_2f-SketchArc_4_2f_wire")])
499 Axis_4 = model.addAxis(Part_2_doc, model.selection("FACE", "PartSet/XOZ"), model.selection("VERTEX", "Sketch_2/SketchArc_3"))
500 Rotation_3 = model.addRotation(Part_2_doc, [model.selection("FACE", "Face_1_1")], model.selection("EDGE", "Axis_1"), -43.8752)
501 Pipe_1 = model.addPipe(Part_2_doc, [model.selection("FACE", "Rotation_1_1")], model.selection("EDGE", "Sketch_2/SketchArc_3_2"))
502 Extrusion_3 = model.addExtrusion(Part_2_doc, [model.selection("WIRE", "Sketch_2/Face-SketchCircle_2_2f-SketchCircle_3_2r_wire"), model.selection("WIRE", "Sketch_2/Face-SketchLine_17r-SketchLine_16r-SketchLine_15r-SketchLine_14r_wire")], model.selection(), "Gap/2", "Gap/2")
503 Fuse_1 = model.addFuse(Part_2_doc, [model.selection("SOLID", "Pipe_1_1")], [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_1_2")])
504 Extrusion_4 = model.addExtrusion(Part_2_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_3_2f")], model.selection(), "Gap", "Gap")
505 Cut_1 = model.addCut(Part_2_doc, [model.selection("SOLID", "Fuse_1_1")], [model.selection("SOLID", "Extrusion_2_1")])
506 Translation_1 = model.addTranslation(Part_2_doc, [model.selection("SOLID", "Cut_1_1")], model.selection("VERTEX", "Sketch_2/SketchCircle_2_2__cc"), model.selection("VERTEX", "Sketch_2/SketchLine_21_EndVertex"))
508 Part_3 = model.duplicatePart(Part_2)
509 Part_3.setName("Arm 2")
511 Part_4 = model.duplicatePart(Part_3)
512 Part_4.setName("Arm 3")
514 Translation_4 = model.addTranslation(partSet, [model.selection("COMPOUND", "Part_2/"), model.selection("COMPOUND", "Part_3/"), model.selection("COMPOUND", "Part_4/")], model.selection("EDGE", "OX"), -40)
515 Rotation_6 = model.addRotation(partSet, [model.selection("COMPOUND", "Translation_1_2/")], model.selection("EDGE", "OZ"), 120)
516 Rotation_7 = model.addRotation(partSet, [model.selection("COMPOUND", "Translation_1_3/")], model.selection("EDGE", "OZ"), 240)
517 Part_5 = model.addPart(partSet)
518 Part_5.setName("Rod part")
519 Part_5_doc = Part_5.document()
520 Parameter_H = model.addParameter(partSet, "H", "110")
521 Sketch_10 = model.addSketch(Part_5_doc, model.defaultPlane("YOZ"))
522 SketchLine_93 = Sketch_10.addLine(0, 25, 6, 25)
523 SketchLine_94 = Sketch_10.addLine(6, 25, 6, -75)
524 SketchConstraintCoincidence_232 = Sketch_10.setCoincident(SketchLine_93.endPoint(), SketchLine_94.startPoint())
525 SketchLine_95 = Sketch_10.addLine(6, -75, 4, -75)
526 SketchConstraintCoincidence_233 = Sketch_10.setCoincident(SketchLine_94.endPoint(), SketchLine_95.startPoint())
527 SketchLine_96 = Sketch_10.addLine(4, -75, 4, -81.00000000054168)
528 SketchConstraintCoincidence_234 = Sketch_10.setCoincident(SketchLine_95.endPoint(), SketchLine_96.startPoint())
529 SketchLine_97 = Sketch_10.addLine(4, -81.00000000054168, 0, -85)
530 SketchConstraintCoincidence_235 = Sketch_10.setCoincident(SketchLine_96.endPoint(), SketchLine_97.startPoint())
531 SketchLine_98 = Sketch_10.addLine(0, -85, 0, 25)
532 SketchConstraintCoincidence_236 = Sketch_10.setCoincident(SketchLine_97.endPoint(), SketchLine_98.startPoint())
533 SketchConstraintCoincidence_237 = Sketch_10.setCoincident(SketchLine_93.startPoint(), SketchLine_98.endPoint())
534 SketchConstraintVertical_15 = Sketch_10.setVertical(SketchLine_98.result())
535 SketchConstraintVertical_16 = Sketch_10.setVertical(SketchLine_94.result())
536 SketchConstraintVertical_17 = Sketch_10.setVertical(SketchLine_96.result())
537 SketchConstraintHorizontal_18 = Sketch_10.setHorizontal(SketchLine_93.result())
538 SketchConstraintHorizontal_19 = Sketch_10.setHorizontal(SketchLine_95.result())
539 SketchConstraintAngle_7 = Sketch_10.setAngle(SketchLine_97.result(), SketchLine_98.result(), 45.00000000387975)
540 SketchConstraintDistance_32 = Sketch_10.setDistance(SketchLine_97.endPoint(), SketchLine_95.result(), 10)
541 SketchConstraintDistance_33 = Sketch_10.setDistance(SketchLine_97.startPoint(), SketchLine_98.result(), 4)
542 SketchConstraintLength_7 = Sketch_10.setLength(SketchLine_93.result(), "Rod/2")
543 SketchConstraintDistance_34 = Sketch_10.setDistance(SketchLine_97.endPoint(), SketchLine_93.result(), "H")
544 SketchPoint_7 = Sketch_10.addPoint(model.selection("VERTEX", "PartSet/Origin"))
545 SketchConstraintCoincidence_238 = Sketch_10.setCoincident(SketchPoint_7.coordinates(), SketchLine_98.result())
546 SketchLine_99 = Sketch_10.addLine(model.selection("EDGE", "PartSet/OY"))
547 SketchConstraintDistance_35 = Sketch_10.setDistance(SketchLine_98.endPoint(), SketchLine_99.result(), "Thickness")
549 Revolution_2 = model.addRevolution(Part_5_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_6r-SketchLine_5r-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r")], model.selection("EDGE", "Sketch_1/SketchLine_6"), 360, 0)
550 Sketch_11 = model.addSketch(Part_5_doc, model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1"))
551 SketchCircle_14 = Sketch_11.addCircle(0, 0, 8.5)
552 SketchCircle_14.setAuxiliary(True)
553 SketchPoint_8 = Sketch_11.addPoint(model.selection("VERTEX", "Sketch_1/SketchLine_1_StartVertex"))
554 SketchConstraintCoincidence_239 = Sketch_11.setCoincident(SketchCircle_14.center(), SketchPoint_8.result())
555 SketchConstraintRadius_18 = Sketch_11.setRadius(SketchCircle_14.results()[1], "(Rod+5)/2")
556 SketchLine_100 = Sketch_11.addLine(-8.5, -4.907477288111821, -8.5, 4.907477288111821)
557 SketchLine_101 = Sketch_11.addLine(-8.5, 4.907477288111821, -2.182790672831509e-014, 9.814954576223595)
558 SketchConstraintCoincidence_240 = Sketch_11.setCoincident(SketchLine_100.endPoint(), SketchLine_101.startPoint())
559 SketchLine_102 = Sketch_11.addLine(-2.182790672831509e-014, 9.814954576223595, 8.5, 4.907477288111624)
560 SketchConstraintCoincidence_241 = Sketch_11.setCoincident(SketchLine_101.endPoint(), SketchLine_102.startPoint())
561 SketchLine_103 = Sketch_11.addLine(8.5, 4.907477288111624, 8.5, -4.907477288111966)
562 SketchConstraintCoincidence_242 = Sketch_11.setCoincident(SketchLine_102.endPoint(), SketchLine_103.startPoint())
563 SketchLine_104 = Sketch_11.addLine(8.5, -4.907477288111966, 4.843087198023196e-015, -9.814954576223641)
564 SketchConstraintCoincidence_243 = Sketch_11.setCoincident(SketchLine_103.endPoint(), SketchLine_104.startPoint())
565 SketchLine_105 = Sketch_11.addLine(4.843087198023196e-015, -9.814954576223641, -8.5, -4.907477288111821)
566 SketchConstraintCoincidence_244 = Sketch_11.setCoincident(SketchLine_104.endPoint(), SketchLine_105.startPoint())
567 SketchConstraintCoincidence_245 = Sketch_11.setCoincident(SketchLine_100.startPoint(), SketchLine_105.endPoint())
568 SketchConstraintVertical_18 = Sketch_11.setVertical(SketchLine_100.result())
569 SketchConstraintVertical_19 = Sketch_11.setVertical(SketchLine_103.result())
570 SketchConstraintTangent_15 = Sketch_11.setTangent(SketchCircle_14.results()[1], SketchLine_103.result())
571 SketchConstraintTangent_16 = Sketch_11.setTangent(SketchCircle_14.results()[1], SketchLine_100.result())
572 SketchConstraintTangent_17 = Sketch_11.setTangent(SketchLine_104.result(), SketchCircle_14.results()[1])
573 SketchConstraintTangent_18 = Sketch_11.setTangent(SketchLine_105.result(), SketchCircle_14.results()[1])
574 SketchConstraintTangent_19 = Sketch_11.setTangent(SketchLine_101.result(), SketchCircle_14.results()[1])
575 SketchConstraintTangent_20 = Sketch_11.setTangent(SketchLine_102.result(), SketchCircle_14.results()[1])
576 SketchConstraintEqual_7 = Sketch_11.setEqual(SketchLine_100.result(), SketchLine_101.result())
577 SketchConstraintEqual_8 = Sketch_11.setEqual(SketchLine_101.result(), SketchLine_102.result())
578 SketchConstraintEqual_9 = Sketch_11.setEqual(SketchLine_102.result(), SketchLine_103.result())
579 SketchConstraintEqual_10 = Sketch_11.setEqual(SketchLine_103.result(), SketchLine_104.result())
581 Extrusion_9 = model.addExtrusion(Part_5_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_13r-SketchLine_12r-SketchLine_11r-SketchLine_10r-SketchLine_9r-SketchLine_8r")], model.selection(), 25, 0)
582 Sketch_12 = model.addSketch(Part_5_doc, model.standardPlane("YOZ"))
583 SketchLine_106 = Sketch_12.addLine(9.814954576223595, 48.99999999999999, 9.814954576223595, 52.35726558990813)
584 SketchLine_107 = Sketch_12.addLine(9.814954576223595, 52.35726558990813, 4, 52.35726558990813)
585 SketchConstraintCoincidence_246 = Sketch_12.setCoincident(SketchLine_106.endPoint(), SketchLine_107.startPoint())
586 SketchLine_108 = Sketch_12.addLine(4, 52.35726558990813, 9.814954576223595, 48.99999999999999)
587 SketchConstraintCoincidence_247 = Sketch_12.setCoincident(SketchLine_107.endPoint(), SketchLine_108.startPoint())
588 SketchConstraintCoincidence_248 = Sketch_12.setCoincident(SketchLine_106.startPoint(), SketchLine_108.endPoint())
589 SketchConstraintHorizontal_20 = Sketch_12.setHorizontal(SketchLine_107.result())
590 SketchConstraintVertical_20 = Sketch_12.setVertical(SketchLine_106.result())
591 SketchConstraintAngle_8 = Sketch_12.setAngle(SketchLine_108.result(), SketchLine_107.result(), 30)
592 SketchLine_109 = Sketch_12.addLine(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_2/SketchLine_10][Extrusion_1_1/Generated_Face&Sketch_2/SketchLine_9]"))
593 SketchConstraintCoincidence_249 = Sketch_12.setCoincident(SketchLine_108.endPoint(), SketchLine_109.result())
594 SketchProjection_2 = Sketch_12.addProjection(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_2/SketchLine_10][Extrusion_1_1/To_Face]"), False)
595 SketchLine_110 = SketchProjection_2.createdFeature()
596 SketchConstraintDistance_36 = Sketch_12.setDistance(SketchLine_110.result(), SketchLine_108.endPoint(), 1)
597 SketchLine_111 = Sketch_12.addLine(model.selection("EDGE", "PartSet/OZ"))
598 SketchConstraintDistance_37 = Sketch_12.setDistance(SketchLine_108.startPoint(), SketchLine_111.result(), 4)
600 Revolution_3 = model.addRevolution(Part_5_doc, [model.selection("FACE", "Sketch_3/Face-SketchLine_14r-SketchLine_15f-SketchLine_16f")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
601 Cut_12 = model.addCut(Part_5_doc, [model.selection("SOLID", "Extrusion_1_1")], [model.selection("SOLID", "Revolution_2_1")])
602 Cut_13 = model.addFuse(Part_5_doc, [model.selection("SOLID", "Cut_1_1"), model.selection("SOLID", "Revolution_1_1")], [])
604 # Test reexecution after parameter change
605 Parameter_H.setValue(120)
607 model.testResultsVolumes(Part_5, [19052.771316640515578910708427429])
608 Parameter_H.setValue(110)
612 from GeomAPI import GeomAPI_Shape
614 model.testNbResults(Part_1, 1)
615 model.testNbSubResults(Part_1, [0])
616 model.testNbSubShapes(Part_1, GeomAPI_Shape.SOLID, [1])
617 model.testNbSubShapes(Part_1, GeomAPI_Shape.FACE, [52])
618 model.testNbSubShapes(Part_1, GeomAPI_Shape.EDGE, [338])
619 model.testNbSubShapes(Part_1, GeomAPI_Shape.VERTEX, [676])
620 model.testResultsVolumes(Part_1, [48835.437112214101944118738174438])
622 model.testNbResults(Translation_4, 3)
623 model.testNbSubResults(Translation_4, [0, 0, 0])
624 model.testNbSubShapes(Translation_4, GeomAPI_Shape.SOLID, [1, 1, 1])
625 model.testNbSubShapes(Translation_4, GeomAPI_Shape.FACE, [19, 19, 19])
626 model.testNbSubShapes(Translation_4, GeomAPI_Shape.EDGE, [102, 102, 102])
627 model.testNbSubShapes(Translation_4, GeomAPI_Shape.VERTEX, [204, 204, 204])
628 model.testResultsVolumes(Translation_4, [11018.354015402081131469458341599, 11018.354015402081131469458341599, 11018.354015402081131469458341599])
630 model.testNbResults(Rotation_6, 1)
631 model.testNbSubResults(Rotation_6, [0])
632 model.testNbSubShapes(Rotation_6, GeomAPI_Shape.SOLID, [1])
633 model.testNbSubShapes(Rotation_6, GeomAPI_Shape.FACE, [19])
634 model.testNbSubShapes(Rotation_6, GeomAPI_Shape.EDGE, [102])
635 model.testNbSubShapes(Rotation_6, GeomAPI_Shape.VERTEX, [204])
636 model.testResultsVolumes(Rotation_6, [11018.354015402079312480054795742])
638 model.testNbResults(Rotation_7, 1)
639 model.testNbSubResults(Rotation_7, [0])
640 model.testNbSubShapes(Rotation_7, GeomAPI_Shape.SOLID, [1])
641 model.testNbSubShapes(Rotation_7, GeomAPI_Shape.FACE, [19])
642 model.testNbSubShapes(Rotation_7, GeomAPI_Shape.EDGE, [102])
643 model.testNbSubShapes(Rotation_7, GeomAPI_Shape.VERTEX, [204])
644 model.testResultsVolumes(Rotation_7, [11018.354015402079312480054795742])
646 model.testNbResults(Part_5, 1)
647 model.testNbSubResults(Part_5, [0])
648 model.testNbSubShapes(Part_5, GeomAPI_Shape.SOLID, [1])
649 model.testNbSubShapes(Part_5, GeomAPI_Shape.FACE, [13])
650 model.testNbSubShapes(Part_5, GeomAPI_Shape.EDGE, [55])
651 model.testNbSubShapes(Part_5, GeomAPI_Shape.VERTEX, [110])
652 model.testResultsVolumes(Part_5, [17921.797961347954696975648403168])
654 assert(model.checkPythonDump())