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