1 # -*- coding: utf-8 -*-
3 ## Copyright (C) 2014-2017 CEA/DEN, EDF R&D
5 ## This library is free software; you can redistribute it and/or
6 ## modify it under the terms of the GNU Lesser General Public
7 ## License as published by the Free Software Foundation; either
8 ## version 2.1 of the License, or (at your option) any later version.
10 ## This library is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ## Lesser General Public License for more details.
15 ## You should have received a copy of the GNU Lesser General Public
16 ## License along with this library; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 ## See http:##www.salome-platform.org/ or
20 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
24 from SketchAPI import *
26 from salome.shaper import model
29 partSet = model.moduleDocument()
30 Part_1 = model.addPart(partSet)
31 Part_1_doc = Part_1.document()
32 model.addParameter(Part_1_doc, "r1", "26.5")
33 model.addParameter(Part_1_doc, "r2", "22")
34 model.addParameter(Part_1_doc, "entraxe", "80")
35 Parameter_Epaisseur = model.addParameter(Part_1_doc, "epaisseur", "34")
36 model.addParameter(Part_1_doc, "ep", "4")
37 model.addParameter(Part_1_doc, "d1", "112")
38 model.addParameter(Part_1_doc, "d2", "24")
39 model.addParameter(Part_1_doc, "d3", "5")
40 model.addParameter(Part_1_doc, "r3", "2.5")
41 model.addParameter(Part_1_doc, "dtrou", "9")
42 model.addParameter(Part_1_doc, "ep_o", "24")
43 model.addParameter(Part_1_doc, "d_per", "2.5")
44 model.addParameter(Part_1_doc, "r4", "15")
45 model.addParameter(Part_1_doc, "h", "45")
46 model.addParameter(Part_1_doc, "ep_o2", "5")
47 model.addParameter(Part_1_doc, "d_o", "10")
48 model.addParameter(Part_1_doc, "h_o", "57")
49 model.addParameter(Part_1_doc, "p_trou1", "29.2")
50 model.addParameter(Part_1_doc, "p2_trou1", "19.2")
51 model.addParameter(Part_1_doc, "p_trou2", "46")
52 model.addParameter(Part_1_doc, "p2_trou", "36.5")
53 model.addParameter(Part_1_doc, "h_p", "40")
54 model.addParameter(Part_1_doc, "M8", "4")
55 model.addParameter(Part_1_doc, "r_trou2", "10")
56 model.addParameter(Part_1_doc, "r_al1", "12.5")
57 model.addParameter(Part_1_doc, "r_al2", "14")
58 model.addParameter(Part_1_doc, "coeff", "1")
59 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
60 SketchPoint_1 = Sketch_1.addPoint(model.selection("VERTEX", "PartSet/Origin"))
61 SketchCircle_1 = Sketch_1.addCircle(0, 0, 15)
62 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.result(), SketchCircle_1.center())
63 SketchCircle_2 = Sketch_1.addCircle(80, 0, 15)
64 SketchCircle_3 = Sketch_1.addCircle(0, 0, 12.5)
65 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchCircle_3.center())
66 SketchCircle_4 = Sketch_1.addCircle(80, 0, 14)
67 SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchCircle_2.center(), SketchCircle_4.center())
68 SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_3.results()[1], "r_al1*coeff")
69 SketchConstraintRadius_2 = Sketch_1.setRadius(SketchCircle_4.results()[1], "r_al2*coeff")
70 SketchConstraintRadius_3 = Sketch_1.setRadius(SketchCircle_1.results()[1], "r4*coeff")
71 SketchConstraintRadius_4 = Sketch_1.setRadius(SketchCircle_2.results()[1], "r4*coeff")
72 SketchConstraintDistance_1 = Sketch_1.setDistance(SketchCircle_3.center(), SketchCircle_4.center(), "entraxe*coeff")
73 SketchArc_1 = Sketch_1.addArc(0, 0, 13.96424004376894, -17, 13.96424004376894, 17, True)
74 SketchArc_1.setName("SketchArc_4")
75 SketchArc_1.result().setName("SketchArc_4")
76 SketchArc_1.results()[1].setName("SketchArc_4_2")
77 SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchCircle_3.center(), SketchArc_1.center())
78 SketchConstraintCoincidence_4.setName("SketchConstraintCoincidence_7")
79 SketchLine_1 = Sketch_1.addLine(13.96424004376894, 17, 66.03575995620928, 17)
80 SketchLine_1.setName("SketchLine_6")
81 SketchLine_1.result().setName("SketchLine_6")
82 SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_1.startPoint())
83 SketchConstraintCoincidence_5.setName("SketchConstraintCoincidence_18")
84 SketchLine_2 = Sketch_1.addLine(13.96424004376894, -17, 66.03575995623092, -17)
85 SketchLine_2.setName("SketchLine_10")
86 SketchLine_2.result().setName("SketchLine_10")
87 SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_2.result())
88 SketchConstraintHorizontal_1.setName("SketchConstraintHorizontal_5")
89 SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_1.result())
90 SketchConstraintHorizontal_2.setName("SketchConstraintHorizontal_6")
91 SketchLine_3 = Sketch_1.addLine(model.selection("EDGE", "PartSet/OX"))
92 SketchLine_3.setName("SketchLine_11")
93 SketchLine_3.result().setName("SketchLine_11")
94 SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchArc_1.startPoint(), SketchLine_2.startPoint())
95 SketchConstraintCoincidence_6.setName("SketchConstraintCoincidence_15")
96 SketchConstraintRadius_5 = Sketch_1.setRadius(SketchArc_1.results()[1], "r2*coeff")
97 SketchConstraintDistance_2 = Sketch_1.setDistance(SketchArc_1.endPoint(), SketchLine_3.result(), "epaisseur/2*coeff")
98 SketchConstraintDistance_3 = Sketch_1.setDistance(SketchArc_1.endPoint(), SketchLine_2.result(), "epaisseur*coeff")
99 SketchArc_2 = Sketch_1.addArc(80, 0, 66.03575995623092, -17, 66.03575995620928, 17, False)
100 SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchCircle_2.center(), SketchArc_2.center())
101 SketchConstraintCoincidence_7.setName("SketchConstraintCoincidence_8")
102 SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchArc_2.startPoint())
103 SketchConstraintCoincidence_8.setName("SketchConstraintCoincidence_9")
104 SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchArc_2.endPoint(), SketchLine_1.endPoint())
105 SketchConstraintCoincidence_9.setName("SketchConstraintCoincidence_10")
106 SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchCircle_2.center(), SketchLine_3.result())
107 SketchConstraintCoincidence_10.setName("SketchConstraintCoincidence_11")
108 SketchConstraintEqual_1 = Sketch_1.setEqual(SketchArc_1.results()[1], SketchArc_2.results()[1])
109 SketchArc_3 = Sketch_1.addArc(9.077705920073647e-31, -3.860574861749558e-31, 15.46247221747307, -11.0413745939477, 18.89444362769119, -2, False)
110 SketchArc_3.setName("SketchArc_7")
111 SketchArc_3.result().setName("SketchArc_7")
112 SketchArc_3.results()[1].setName("SketchArc_7_2")
113 SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchArc_3.center())
114 SketchConstraintCoincidence_11.setName("SketchConstraintCoincidence_54")
115 SketchArc_4 = Sketch_1.addArc(3.497294868556922e-32, 3.186289860391258e-33, 18.89444362769119, 2, 15.46247221747308, 11.04137459394768, False)
116 SketchArc_4.setName("SketchArc_8")
117 SketchArc_4.result().setName("SketchArc_8")
118 SketchArc_4.results()[1].setName("SketchArc_8_2")
119 SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchArc_4.center())
120 SketchConstraintCoincidence_12.setName("SketchConstraintCoincidence_55")
121 SketchConstraintEqual_2 = Sketch_1.setEqual(SketchArc_4.results()[1], SketchArc_3.results()[1])
122 SketchConstraintEqual_2.setName("SketchConstraintEqual_8")
123 SketchArc_5 = Sketch_1.addArc(17.5, 12.49632352941176, 15.46247221747308, 11.04137459394768, 17.5, 15, True)
124 SketchArc_5.setName("SketchArc_9")
125 SketchArc_5.result().setName("SketchArc_9")
126 SketchArc_5.results()[1].setName("SketchArc_9_2")
127 SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchArc_4.endPoint(), SketchArc_5.startPoint())
128 SketchConstraintCoincidence_13.setName("SketchConstraintCoincidence_56")
129 SketchConstraintTangent_1 = Sketch_1.setTangent(SketchArc_4.results()[1], SketchArc_5.results()[1])
130 SketchArc_6 = Sketch_1.addArc(17.5, -12.49632352941177, 15.46247221747307, -11.0413745939477, 17.5, -15, False)
131 SketchArc_6.setName("SketchArc_10")
132 SketchArc_6.result().setName("SketchArc_10")
133 SketchArc_6.results()[1].setName("SketchArc_10_2")
134 SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchArc_3.startPoint(), SketchArc_6.startPoint())
135 SketchConstraintCoincidence_14.setName("SketchConstraintCoincidence_57")
136 SketchConstraintTangent_2 = Sketch_1.setTangent(SketchArc_3.results()[1], SketchArc_6.results()[1])
137 SketchLine_4 = Sketch_1.addLine(17.5, 15, 37.99999999999999, 15)
138 SketchLine_4.setName("SketchLine_42")
139 SketchLine_4.result().setName("SketchLine_42")
140 SketchConstraintCoincidence_15 = Sketch_1.setCoincident(SketchArc_5.endPoint(), SketchLine_4.startPoint())
141 SketchConstraintCoincidence_15.setName("SketchConstraintCoincidence_58")
142 SketchLine_5 = Sketch_1.addLine(18.89444362769119, -2, 34.49444362769118, -2)
143 SketchLine_5.setName("SketchLine_44")
144 SketchLine_5.result().setName("SketchLine_44")
145 SketchConstraintCoincidence_16 = Sketch_1.setCoincident(SketchArc_3.endPoint(), SketchLine_5.startPoint())
146 SketchConstraintCoincidence_16.setName("SketchConstraintCoincidence_60")
147 SketchLine_6 = Sketch_1.addLine(18.89444362769119, 2, 34.49444362769118, 2)
148 SketchLine_6.setName("SketchLine_45")
149 SketchLine_6.result().setName("SketchLine_45")
150 SketchConstraintCoincidence_17 = Sketch_1.setCoincident(SketchArc_4.startPoint(), SketchLine_6.startPoint())
151 SketchConstraintCoincidence_17.setName("SketchConstraintCoincidence_61")
152 SketchLine_7 = Sketch_1.addLine(37.99999999999999, 15, 38.00000000000001, 5.505556372308819)
153 SketchLine_7.setName("SketchLine_46")
154 SketchLine_7.result().setName("SketchLine_46")
155 SketchConstraintCoincidence_18 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_7.startPoint())
156 SketchConstraintCoincidence_18.setName("SketchConstraintCoincidence_62")
157 SketchConstraintEqual_3 = Sketch_1.setEqual(SketchArc_5.results()[1], SketchArc_6.results()[1])
158 SketchConstraintEqual_3.setName("SketchConstraintEqual_9")
159 SketchConstraintEqual_4 = Sketch_1.setEqual(SketchLine_5.result(), SketchLine_6.result())
160 SketchConstraintEqual_4.setName("SketchConstraintEqual_11")
161 SketchConstraintHorizontal_3 = Sketch_1.setHorizontal(SketchLine_6.result())
162 SketchConstraintHorizontal_3.setName("SketchConstraintHorizontal_12")
163 SketchConstraintHorizontal_4 = Sketch_1.setHorizontal(SketchLine_4.result())
164 SketchConstraintHorizontal_4.setName("SketchConstraintHorizontal_13")
165 SketchConstraintHorizontal_5 = Sketch_1.setHorizontal(SketchLine_5.result())
166 SketchConstraintHorizontal_5.setName("SketchConstraintHorizontal_14")
167 SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_7.result())
168 SketchConstraintVertical_1.setName("SketchConstraintVertical_7")
169 SketchLine_8 = Sketch_1.addLine(40, 17, 40, -17.00000000000001)
170 SketchLine_8.setName("SketchLine_47")
171 SketchLine_8.result().setName("SketchLine_47")
172 SketchLine_8.setAuxiliary(True)
173 SketchConstraintCoincidence_19 = Sketch_1.setCoincident(SketchLine_8.startPoint(), SketchLine_1.result())
174 SketchConstraintCoincidence_19.setName("SketchConstraintCoincidence_63")
175 SketchConstraintCoincidence_20 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_2.result())
176 SketchConstraintCoincidence_20.setName("SketchConstraintCoincidence_64")
177 SketchConstraintMiddle_1 = Sketch_1.setMiddlePoint(SketchLine_8.startPoint(), SketchLine_1.result())
178 SketchConstraintMiddle_1.setName("SketchConstraintMiddle_4")
179 SketchConstraintMiddle_2 = Sketch_1.setMiddlePoint(SketchLine_8.endPoint(), SketchLine_2.result())
180 SketchConstraintMiddle_2.setName("SketchConstraintMiddle_5")
181 SketchPoint_2 = Sketch_1.addPoint(40, 2.220450266386716e-15)
182 SketchPoint_2.setName("SketchPoint_7")
183 SketchPoint_2.result().setName("SketchPoint_7")
184 SketchConstraintCoincidence_21 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_8.result())
185 SketchConstraintCoincidence_21.setName("SketchConstraintCoincidence_65")
186 SketchConstraintMiddle_3 = Sketch_1.setMiddlePoint(SketchLine_8.result(), SketchPoint_2.coordinates())
187 SketchConstraintMiddle_3.setName("SketchConstraintMiddle_6")
188 SketchConstraintDistance_4 = Sketch_1.setDistance(SketchLine_6.startPoint(), SketchLine_3.result(), "2*coeff")
189 SketchConstraintDistance_4.setName("SketchConstraintDistance_17")
190 SketchConstraintDistance_5 = Sketch_1.setDistance(SketchArc_3.endPoint(), SketchLine_3.result(), "2*coeff")
191 SketchConstraintDistance_5.setName("SketchConstraintDistance_18")
192 SketchConstraintRadius_6 = Sketch_1.setRadius(SketchArc_4.results()[1], "(r4+4)*coeff")
193 SketchConstraintRadius_6.setName("SketchConstraintRadius_13")
194 SketchConstraintDistance_6 = Sketch_1.setDistance(SketchLine_4.endPoint(), SketchLine_8.result(), "2*coeff")
195 SketchConstraintDistance_6.setName("SketchConstraintDistance_19")
196 SketchArc_7 = Sketch_1.addArc(40, 2.220450266386716e-15, 34.49444362769118, 2, 38.00000000000001, 5.505556372308819, True)
197 SketchArc_7.setName("SketchArc_11")
198 SketchArc_7.result().setName("SketchArc_11")
199 SketchArc_7.results()[1].setName("SketchArc_11_2")
200 SketchConstraintCoincidence_22 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchArc_7.center())
201 SketchConstraintCoincidence_22.setName("SketchConstraintCoincidence_66")
202 SketchConstraintCoincidence_23 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchArc_7.startPoint())
203 SketchConstraintCoincidence_23.setName("SketchConstraintCoincidence_67")
204 SketchArc_8 = Sketch_1.addArc(40.00000000000001, -2.652239435709897e-15, 34.49444362769118, -2, 37.95784774655168, -5.490060577298436, False)
205 SketchArc_8.setName("SketchArc_12")
206 SketchArc_8.result().setName("SketchArc_12")
207 SketchArc_8.results()[1].setName("SketchArc_12_2")
208 SketchConstraintCoincidence_24 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchArc_8.center())
209 SketchConstraintCoincidence_24.setName("SketchConstraintCoincidence_68")
210 SketchConstraintCoincidence_25 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchArc_8.startPoint())
211 SketchConstraintCoincidence_25.setName("SketchConstraintCoincidence_69")
212 SketchConstraintCoincidence_26 = Sketch_1.setCoincident(SketchArc_7.endPoint(), SketchLine_7.endPoint())
213 SketchConstraintCoincidence_26.setName("SketchConstraintCoincidence_72")
214 SketchConstraintDistance_7 = Sketch_1.setDistance(SketchArc_5.endPoint(), SketchLine_1.result(), "2*coeff")
215 SketchConstraintDistance_7.setName("SketchConstraintDistance_21")
216 SketchConstraintTangent_3 = Sketch_1.setTangent(SketchArc_5.results()[1], SketchLine_4.result())
217 SketchCircle_5 = Sketch_1.addCircle(40, -13, 2.5)
218 SketchCircle_5.setName("SketchCircle_11")
219 SketchCircle_5.result().setName("SketchCircle_11")
220 SketchCircle_5.results()[1].setName("SketchCircle_11_2")
221 SketchConstraintCoincidence_27 = Sketch_1.setCoincident(SketchLine_8.result(), SketchCircle_5.center())
222 SketchConstraintCoincidence_27.setName("SketchConstraintCoincidence_70")
223 SketchConstraintRadius_7 = Sketch_1.setRadius(SketchCircle_5.results()[1], "2.5*coeff")
224 SketchConstraintRadius_7.setName("SketchConstraintRadius_14")
225 SketchArc_9 = Sketch_1.addArc(40, -13, 35.51437699680511, -13.35942492012782, 37.95784774655168, -8.990060577298436, True)
226 SketchArc_9.setName("SketchArc_13")
227 SketchArc_9.result().setName("SketchArc_13")
228 SketchArc_9.results()[1].setName("SketchArc_13_2")
229 SketchConstraintCoincidence_28 = Sketch_1.setCoincident(SketchCircle_5.center(), SketchArc_9.center())
230 SketchConstraintCoincidence_28.setName("SketchConstraintCoincidence_71")
231 SketchLine_9 = Sketch_1.addLine(37.95784774655168, -5.490060577298436, 37.95784774655168, -8.990060577298436)
232 SketchLine_9.setName("SketchLine_48")
233 SketchLine_9.result().setName("SketchLine_48")
234 SketchConstraintCoincidence_29 = Sketch_1.setCoincident(SketchArc_8.endPoint(), SketchLine_9.startPoint())
235 SketchConstraintCoincidence_29.setName("SketchConstraintCoincidence_74")
236 SketchConstraintCoincidence_30 = Sketch_1.setCoincident(SketchArc_9.endPoint(), SketchLine_9.endPoint())
237 SketchConstraintCoincidence_30.setName("SketchConstraintCoincidence_75")
238 SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_9.result())
239 SketchConstraintVertical_2.setName("SketchConstraintVertical_8")
240 SketchConstraintRadius_8 = Sketch_1.setRadius(SketchArc_9.results()[1], "(2.5+2)*coeff")
241 SketchConstraintRadius_8.setName("SketchConstraintRadius_15")
242 SketchConstraintDistance_8 = Sketch_1.setDistance(SketchCircle_5.center(), SketchLine_2.result(), "4*coeff")
243 SketchConstraintDistance_8.setName("SketchConstraintDistance_22")
244 SketchLine_10 = Sketch_1.addLine(17.5, -15, 34.00000000000001, -15)
245 SketchLine_10.setName("SketchLine_43")
246 SketchLine_10.result().setName("SketchLine_43")
247 SketchConstraintCoincidence_31 = Sketch_1.setCoincident(SketchArc_6.endPoint(), SketchLine_10.startPoint())
248 SketchConstraintCoincidence_31.setName("SketchConstraintCoincidence_73")
249 SketchArc_10 = Sketch_1.addArc(34.00000000000001, -13.48076923076937, 34.00000000000001, -15, 35.51437699680511, -13.35942492012782, False)
250 SketchArc_10.setName("SketchArc_14")
251 SketchArc_10.result().setName("SketchArc_14")
252 SketchArc_10.results()[1].setName("SketchArc_14_2")
253 SketchConstraintCoincidence_32 = Sketch_1.setCoincident(SketchLine_10.endPoint(), SketchArc_10.startPoint())
254 SketchConstraintCoincidence_32.setName("SketchConstraintCoincidence_76")
255 SketchConstraintTangent_4 = Sketch_1.setTangent(SketchLine_10.result(), SketchArc_10.results()[1])
256 SketchConstraintCoincidence_33 = Sketch_1.setCoincident(SketchArc_9.results()[1], SketchArc_10.endPoint())
257 SketchConstraintCoincidence_33.setName("SketchConstraintCoincidence_77")
258 SketchConstraintTangent_5 = Sketch_1.setTangent(SketchArc_9.results()[1], SketchArc_10.results()[1])
259 SketchConstraintCoincidence_34 = Sketch_1.setCoincident(SketchArc_9.startPoint(), SketchArc_10.endPoint())
260 SketchConstraintCoincidence_34.setName("SketchConstraintCoincidence_78")
261 SketchConstraintDistance_9 = Sketch_1.setDistance(SketchLine_10.endPoint(), SketchLine_2.result(), "2*coeff")
262 SketchConstraintDistance_9.setName("SketchConstraintDistance_20")
263 SketchConstraintHorizontal_6 = Sketch_1.setHorizontal(SketchLine_10.result())
264 SketchConstraintHorizontal_6.setName("SketchConstraintHorizontal_15")
265 SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_10.result(), "16.5*coeff")
266 SketchConstraintLength_1.setName("SketchConstraintLength_8")
267 SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_4.result(), "20.5*coeff")
268 SketchConstraintLength_2.setName("SketchConstraintLength_9")
269 SketchLine_11 = Sketch_1.addLine(17.5, 15, 17.5, -15)
270 SketchLine_11.setName("SketchLine_49")
271 SketchLine_11.result().setName("SketchLine_49")
272 SketchLine_11.setAuxiliary(True)
273 SketchConstraintCoincidence_35 = Sketch_1.setCoincident(SketchArc_5.endPoint(), SketchLine_11.startPoint())
274 SketchConstraintCoincidence_35.setName("SketchConstraintCoincidence_79")
275 SketchConstraintCoincidence_36 = Sketch_1.setCoincident(SketchArc_6.endPoint(), SketchLine_11.endPoint())
276 SketchConstraintCoincidence_36.setName("SketchConstraintCoincidence_80")
277 SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_11.result())
278 SketchConstraintVertical_3.setName("SketchConstraintVertical_9")
279 SketchConstraintLength_3 = Sketch_1.setLength(SketchLine_5.result(), "15.6*coeff")
280 SketchConstraintLength_3.setName("SketchConstraintLength_10")
281 SketchConstraintLength_4 = Sketch_1.setLength(SketchLine_9.result(), "3.5*coeff")
282 SketchConstraintLength_4.setName("SketchConstraintLength_11")
283 SketchConstraintMirror_1_objects = [SketchLine_4.result(), SketchArc_5.results()[1], SketchArc_4.results()[1], SketchLine_6.result(), SketchArc_7.results()[1], SketchLine_7.result(), SketchLine_5.result(), SketchArc_8.results()[1], SketchLine_9.result(), SketchArc_9.results()[1], SketchArc_10.results()[1], SketchLine_10.result(), SketchArc_6.results()[1], SketchArc_3.results()[1]]
284 SketchConstraintMirror_1 = Sketch_1.addMirror(SketchLine_8.result(), SketchConstraintMirror_1_objects)
285 [SketchLine_12, SketchArc_11, SketchArc_12, SketchLine_13, SketchArc_13, SketchLine_14, SketchLine_15, SketchArc_14, SketchLine_16, SketchArc_15, SketchArc_16, SketchLine_17, SketchArc_17, SketchArc_18] = SketchConstraintMirror_1.mirrored()
286 SketchArc_18.setName("SketchArc_22")
287 SketchArc_18.result().setName("SketchArc_22")
288 SketchArc_18.results()[1].setName("SketchArc_22_2")
289 SketchArc_17.setName("SketchArc_21")
290 SketchArc_17.result().setName("SketchArc_21")
291 SketchArc_17.results()[1].setName("SketchArc_21_2")
292 SketchLine_17.setName("SketchLine_55")
293 SketchLine_17.result().setName("SketchLine_55")
294 SketchArc_16.setName("SketchArc_20")
295 SketchArc_16.result().setName("SketchArc_20")
296 SketchArc_16.results()[1].setName("SketchArc_20_2")
297 SketchArc_15.setName("SketchArc_19")
298 SketchArc_15.result().setName("SketchArc_19")
299 SketchArc_15.results()[1].setName("SketchArc_19_2")
300 SketchLine_16.setName("SketchLine_54")
301 SketchLine_16.result().setName("SketchLine_54")
302 SketchArc_14.setName("SketchArc_18")
303 SketchArc_14.result().setName("SketchArc_18")
304 SketchArc_14.results()[1].setName("SketchArc_18_2")
305 SketchLine_15.setName("SketchLine_53")
306 SketchLine_15.result().setName("SketchLine_53")
307 SketchLine_14.setName("SketchLine_52")
308 SketchLine_14.result().setName("SketchLine_52")
309 SketchArc_13.setName("SketchArc_17")
310 SketchArc_13.result().setName("SketchArc_17")
311 SketchArc_13.results()[1].setName("SketchArc_17_2")
312 SketchLine_13.setName("SketchLine_51")
313 SketchLine_13.result().setName("SketchLine_51")
314 SketchArc_12.setName("SketchArc_16")
315 SketchArc_12.result().setName("SketchArc_16")
316 SketchArc_12.results()[1].setName("SketchArc_16_2")
317 SketchArc_11.setName("SketchArc_15")
318 SketchArc_11.result().setName("SketchArc_15")
319 SketchArc_11.results()[1].setName("SketchArc_15_2")
320 SketchLine_12.setName("SketchLine_50")
321 SketchLine_12.result().setName("SketchLine_50")
323 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchArc_4_2f-SketchLine_6r-SketchLine_10f-SketchArc_2_2f")], model.selection(), "h_p*coeff", 0)
324 Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/To_Face_1"))
325 SketchProjection_1 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchCircle_2_2"))
326 SketchCircle_6 = SketchProjection_1.createdFeature()
327 SketchCircle_6.setName("SketchCircle_5")
328 SketchCircle_6.result().setName("SketchCircle_5")
329 SketchCircle_6.results()[1].setName("SketchCircle_5_2")
330 SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchCircle_4_2"))
331 SketchCircle_7 = SketchProjection_2.createdFeature()
332 SketchCircle_7.setName("SketchCircle_6")
333 SketchCircle_7.result().setName("SketchCircle_6")
334 SketchCircle_7.results()[1].setName("SketchCircle_6_2")
335 SketchCircle_8 = Sketch_2.addCircle(80, 0, 22)
336 SketchCircle_8.setName("SketchCircle_7")
337 SketchCircle_8.result().setName("SketchCircle_7")
338 SketchCircle_8.results()[1].setName("SketchCircle_7_2")
339 SketchConstraintCoincidence_37 = Sketch_2.setCoincident(SketchCircle_6.result(), SketchCircle_8.center())
340 SketchConstraintCoincidence_37.setName("SketchConstraintCoincidence_12")
341 SketchConstraintRadius_9 = Sketch_2.setRadius(SketchCircle_8.results()[1], "r2*coeff")
342 SketchConstraintRadius_9.setName("SketchConstraintRadius_6")
344 Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection(), "10*coeff", 0)
345 ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchCircle_3_2f")], model.selection(), "p_trou1*coeff", 0, [model.selection("SOLID", "Extrusion_1_1")])
346 ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchCircle_1_2r")], model.selection(), "p2_trou1*coeff", 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
347 ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_4_2f")], model.selection(), "p_trou2*coeff", 0, [model.selection("SOLID", "Extrusion_2_1"), model.selection("SOLID", "ExtrusionCut_2_1")])
348 ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchCircle_2_2r")], model.selection(), "p2_trou*coeff", 0, [model.selection("SOLID", "ExtrusionCut_3_2")])
349 Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), "22.5*coeff", False)
350 Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Plane_1"), "45*coeff", True)
351 Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_2"))
352 SketchProjection_3 = Sketch_3.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_1"))
353 SketchLine_18 = SketchProjection_3.createdFeature()
354 SketchLine_18.setName("SketchLine_4")
355 SketchLine_18.result().setName("SketchLine_4")
356 SketchProjection_4 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_6"))
357 SketchLine_19 = SketchProjection_4.createdFeature()
358 SketchLine_19.setName("SketchLine_5")
359 SketchLine_19.result().setName("SketchLine_5")
360 SketchProjection_5 = Sketch_3.addProjection(model.selection("EDGE", "PartSet/OY"))
361 SketchLine_20 = SketchProjection_5.createdFeature()
362 SketchLine_20.setName("SketchLine_7")
363 SketchLine_20.result().setName("SketchLine_7")
364 SketchProjection_6 = Sketch_3.addProjection(model.selection("EDGE", "PartSet/OX"))
365 SketchLine_21 = SketchProjection_6.createdFeature()
366 SketchLine_21.setName("SketchLine_8")
367 SketchLine_21.result().setName("SketchLine_8")
368 SketchLine_22 = Sketch_3.addLine(72.5, 0, 87.5, 0)
369 SketchLine_22.setName("SketchLine_9")
370 SketchLine_22.result().setName("SketchLine_9")
371 SketchConstraintCoincidence_38 = Sketch_3.setCoincident(SketchLine_22.startPoint(), SketchLine_21.result())
372 SketchConstraintCoincidence_38.setName("SketchConstraintCoincidence_13")
373 SketchLine_23 = Sketch_3.addLine(87.5, 0, 87.5, -12)
374 SketchLine_23.setName("SketchLine_12")
375 SketchLine_23.result().setName("SketchLine_12")
376 SketchConstraintCoincidence_39 = Sketch_3.setCoincident(SketchLine_22.endPoint(), SketchLine_23.startPoint())
377 SketchConstraintCoincidence_39.setName("SketchConstraintCoincidence_14")
378 SketchLine_24 = Sketch_3.addLine(72.5, -12, 72.5, 0)
379 SketchLine_24.setName("SketchLine_14")
380 SketchLine_24.result().setName("SketchLine_14")
381 SketchConstraintCoincidence_40 = Sketch_3.setCoincident(SketchLine_22.startPoint(), SketchLine_24.endPoint())
382 SketchConstraintCoincidence_40.setName("SketchConstraintCoincidence_19")
383 SketchConstraintHorizontal_7 = Sketch_3.setHorizontal(SketchLine_22.result())
384 SketchConstraintHorizontal_7.setName("SketchConstraintHorizontal_4")
385 SketchConstraintVertical_4 = Sketch_3.setVertical(SketchLine_24.result())
386 SketchConstraintVertical_4.setName("SketchConstraintVertical_1")
387 SketchConstraintVertical_5 = Sketch_3.setVertical(SketchLine_23.result())
388 SketchConstraintVertical_5.setName("SketchConstraintVertical_2")
389 SketchConstraintEqual_5 = Sketch_3.setEqual(SketchLine_24.result(), SketchLine_23.result())
390 SketchConstraintEqual_5.setName("SketchConstraintEqual_3")
391 SketchConstraintLength_5 = Sketch_3.setLength(SketchLine_22.result(), "15*coeff")
392 SketchConstraintLength_5.setName("SketchConstraintLength_1")
393 SketchConstraintLength_6 = Sketch_3.setLength(SketchLine_24.result(), "12*coeff")
394 SketchConstraintLength_6.setName("SketchConstraintLength_2")
395 SketchCircle_9 = Sketch_3.addCircle(80, -9, 4)
396 SketchCircle_9.setName("SketchCircle_8")
397 SketchCircle_9.result().setName("SketchCircle_8")
398 SketchCircle_9.results()[1].setName("SketchCircle_8_2")
399 SketchConstraintDistance_10 = Sketch_3.setDistance(SketchCircle_9.center(), SketchLine_22.result(), "dtrou*coeff")
400 SketchConstraintDistance_10.setName("SketchConstraintDistance_5")
401 SketchConstraintRadius_10 = Sketch_3.setRadius(SketchCircle_9.results()[1], "M8*coeff")
402 SketchConstraintRadius_10.setName("SketchConstraintRadius_7")
403 SketchConstraintDistance_11 = Sketch_3.setDistance(SketchLine_20.result(), SketchLine_24.endPoint(), "(entraxe-15/2)*coeff")
404 SketchConstraintDistance_11.setName("SketchConstraintDistance_7")
405 SketchConstraintDistance_12 = Sketch_3.setDistance(SketchCircle_9.center(), SketchLine_24.result(), "15/2*coeff")
406 SketchConstraintDistance_12.setName("SketchConstraintDistance_8")
407 SketchLine_25 = Sketch_3.addLine(85, -17, 75, -17)
408 SketchLine_25.setName("SketchLine_26")
409 SketchLine_25.result().setName("SketchLine_26")
410 SketchLine_26 = Sketch_3.addLine(75, -17, 72.5, -12)
411 SketchLine_26.setName("SketchLine_27")
412 SketchLine_26.result().setName("SketchLine_27")
413 SketchConstraintCoincidence_41 = Sketch_3.setCoincident(SketchLine_25.endPoint(), SketchLine_26.startPoint())
414 SketchConstraintCoincidence_41.setName("SketchConstraintCoincidence_31")
415 SketchConstraintCoincidence_42 = Sketch_3.setCoincident(SketchLine_24.startPoint(), SketchLine_26.endPoint())
416 SketchConstraintCoincidence_42.setName("SketchConstraintCoincidence_32")
417 SketchLine_27 = Sketch_3.addLine(87.5, -12, 85, -17)
418 SketchLine_27.setName("SketchLine_28")
419 SketchLine_27.result().setName("SketchLine_28")
420 SketchConstraintCoincidence_43 = Sketch_3.setCoincident(SketchLine_23.endPoint(), SketchLine_27.startPoint())
421 SketchConstraintCoincidence_43.setName("SketchConstraintCoincidence_33")
422 SketchConstraintCoincidence_44 = Sketch_3.setCoincident(SketchLine_25.startPoint(), SketchLine_27.endPoint())
423 SketchConstraintCoincidence_44.setName("SketchConstraintCoincidence_34")
424 SketchConstraintHorizontal_8 = Sketch_3.setHorizontal(SketchLine_25.result())
425 SketchConstraintHorizontal_8.setName("SketchConstraintHorizontal_7")
426 SketchConstraintEqual_6 = Sketch_3.setEqual(SketchLine_27.result(), SketchLine_26.result())
427 SketchConstraintEqual_6.setName("SketchConstraintEqual_7")
428 SketchConstraintDistance_13 = Sketch_3.setDistance(SketchLine_22.endPoint(), SketchLine_25.result(), "17*coeff")
429 SketchConstraintDistance_13.setName("SketchConstraintDistance_11")
430 SketchConstraintDistance_14 = Sketch_3.setDistance(SketchLine_23.result(), SketchLine_25.startPoint(), "2.5*coeff")
431 SketchConstraintDistance_14.setName("SketchConstraintDistance_12")
433 Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchLine_9r-SketchLine_12r-SketchLine_14r-SketchLine_26r-SketchLine_27r-SketchLine_28r")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_3"), 0, model.selection(), 0)
434 Smash_1 = model.addSmash(Part_1_doc, [model.selection("SOLID", "Extrusion_3_1")], [model.selection("SOLID", "ExtrusionCut_4_1")])
435 ExtrusionCut_5 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchCircle_8_2f")], model.selection(), 10, 0, [model.selection("SOLID", "Smash_1_1_1")])
436 ExtrusionCut_6 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchCircle_8_2f")], model.selection(), 10, 0, [model.selection("SOLID", "ExtrusionCut_5_1_1")])
437 Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
438 SketchProjection_7 = Sketch_4.addProjection(model.selection("EDGE", "PartSet/OY"))
439 SketchLine_28 = SketchProjection_7.createdFeature()
440 SketchLine_28.setName("SketchLine_17")
441 SketchLine_28.result().setName("SketchLine_17")
442 SketchProjection_8 = Sketch_4.addProjection(model.selection("EDGE", "PartSet/OX"))
443 SketchLine_29 = SketchProjection_8.createdFeature()
444 SketchLine_29.setName("SketchLine_18")
445 SketchLine_29.result().setName("SketchLine_18")
446 SketchLine_30 = Sketch_4.addLine(7.5, 0, -7.5, 0)
447 SketchLine_30.setName("SketchLine_19")
448 SketchLine_30.result().setName("SketchLine_19")
449 SketchConstraintCoincidence_45 = Sketch_4.setCoincident(SketchLine_30.startPoint(), SketchLine_29.result())
450 SketchConstraintCoincidence_45.setName("SketchConstraintCoincidence_22")
451 SketchLine_31 = Sketch_4.addLine(-7.5, 0, -7.5, -12)
452 SketchLine_31.setName("SketchLine_20")
453 SketchLine_31.result().setName("SketchLine_20")
454 SketchConstraintCoincidence_46 = Sketch_4.setCoincident(SketchLine_30.endPoint(), SketchLine_31.startPoint())
455 SketchConstraintCoincidence_46.setName("SketchConstraintCoincidence_23")
456 SketchLine_32 = Sketch_4.addLine(7.5, -12, 7.5, 0)
457 SketchLine_32.setName("SketchLine_24")
458 SketchLine_32.result().setName("SketchLine_24")
459 SketchConstraintCoincidence_47 = Sketch_4.setCoincident(SketchLine_30.startPoint(), SketchLine_32.endPoint())
460 SketchConstraintCoincidence_47.setName("SketchConstraintCoincidence_28")
461 SketchConstraintVertical_6 = Sketch_4.setVertical(SketchLine_31.result())
462 SketchConstraintVertical_6.setName("SketchConstraintVertical_3")
463 SketchConstraintVertical_7 = Sketch_4.setVertical(SketchLine_32.result())
464 SketchConstraintVertical_7.setName("SketchConstraintVertical_4")
465 SketchConstraintHorizontal_9 = Sketch_4.setHorizontal(SketchLine_30.result())
466 SketchConstraintEqual_7 = Sketch_4.setEqual(SketchLine_31.result(), SketchLine_32.result())
467 SketchConstraintEqual_7.setName("SketchConstraintEqual_5")
468 SketchConstraintMiddle_4 = Sketch_4.setMiddlePoint(SketchLine_30.result(), SketchAPI_Line(SketchLine_29).startPoint())
469 SketchConstraintMiddle_4.setName("SketchConstraintMiddle_1")
470 SketchLine_33 = Sketch_4.addLine(-7.5, -12, -5, -17)
471 SketchLine_33.setName("SketchLine_21")
472 SketchLine_33.result().setName("SketchLine_21")
473 SketchConstraintCoincidence_48 = Sketch_4.setCoincident(SketchLine_31.endPoint(), SketchLine_33.startPoint())
474 SketchConstraintCoincidence_48.setName("SketchConstraintCoincidence_24")
475 SketchLine_34 = Sketch_4.addLine(-5, -17, 5, -17)
476 SketchLine_34.setName("SketchLine_22")
477 SketchLine_34.result().setName("SketchLine_22")
478 SketchConstraintCoincidence_49 = Sketch_4.setCoincident(SketchLine_33.endPoint(), SketchLine_34.startPoint())
479 SketchConstraintCoincidence_49.setName("SketchConstraintCoincidence_25")
480 SketchLine_35 = Sketch_4.addLine(5, -17, 7.5, -12)
481 SketchLine_35.setName("SketchLine_23")
482 SketchLine_35.result().setName("SketchLine_23")
483 SketchConstraintCoincidence_50 = Sketch_4.setCoincident(SketchLine_34.endPoint(), SketchLine_35.startPoint())
484 SketchConstraintCoincidence_50.setName("SketchConstraintCoincidence_26")
485 SketchConstraintCoincidence_51 = Sketch_4.setCoincident(SketchLine_32.startPoint(), SketchLine_35.endPoint())
486 SketchConstraintCoincidence_51.setName("SketchConstraintCoincidence_27")
487 SketchConstraintEqual_8 = Sketch_4.setEqual(SketchLine_35.result(), SketchLine_33.result())
488 SketchConstraintEqual_8.setName("SketchConstraintEqual_6")
489 SketchConstraintHorizontal_10 = Sketch_4.setHorizontal(SketchLine_34.result())
490 SketchConstraintHorizontal_10.setName("SketchConstraintHorizontal_8")
491 SketchConstraintLength_7 = Sketch_4.setLength(SketchLine_30.result(), "15*coeff")
492 SketchConstraintLength_7.setName("SketchConstraintLength_4")
493 SketchConstraintLength_8 = Sketch_4.setLength(SketchLine_31.result(), "12*coeff")
494 SketchConstraintLength_8.setName("SketchConstraintLength_5")
495 SketchConstraintDistance_15 = Sketch_4.setDistance(SketchLine_30.result(), SketchLine_34.endPoint(), "17*coeff")
496 SketchConstraintDistance_15.setName("SketchConstraintDistance_9")
497 SketchConstraintLength_9 = Sketch_4.setLength(SketchLine_34.result(), "10*coeff")
498 SketchConstraintLength_9.setName("SketchConstraintLength_6")
499 SketchCircle_10 = Sketch_4.addCircle(0, -9, 4)
500 SketchCircle_10.setName("SketchCircle_9")
501 SketchCircle_10.result().setName("SketchCircle_9")
502 SketchCircle_10.results()[1].setName("SketchCircle_9_2")
503 SketchConstraintRadius_11 = Sketch_4.setRadius(SketchCircle_10.results()[1], "M8*coeff")
504 SketchConstraintRadius_11.setName("SketchConstraintRadius_8")
505 SketchLine_36 = Sketch_4.addLine(0, 0, 0, -12.97564207914519)
506 SketchLine_36.setName("SketchLine_25")
507 SketchLine_36.result().setName("SketchLine_25")
508 SketchLine_36.setAuxiliary(True)
509 SketchConstraintCoincidence_52 = Sketch_4.setCoincident(SketchAPI_Line(SketchLine_28).startPoint(), SketchLine_36.startPoint())
510 SketchConstraintCoincidence_52.setName("SketchConstraintCoincidence_29")
511 SketchConstraintVertical_8 = Sketch_4.setVertical(SketchLine_36.result())
512 SketchConstraintVertical_8.setName("SketchConstraintVertical_5")
513 SketchConstraintCoincidence_53 = Sketch_4.setCoincident(SketchCircle_10.center(), SketchLine_36.result())
514 SketchConstraintCoincidence_53.setName("SketchConstraintCoincidence_30")
515 SketchConstraintDistance_16 = Sketch_4.setDistance(SketchCircle_10.center(), SketchLine_30.result(), "dtrou*coeff")
516 SketchConstraintDistance_16.setName("SketchConstraintDistance_10")
517 SketchConstraintLength_10 = Sketch_4.setLength(SketchLine_36.result(), 12.975642079145)
518 SketchConstraintLength_10.setName("SketchConstraintLength_7")
520 Extrusion_4 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_4/Wire-SketchLine_19f-SketchLine_20f-SketchLine_24f-SketchLine_21f-SketchLine_22f-SketchLine_23f")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_1"), 0, model.selection(), 0)
521 Smash_2 = model.addSmash(Part_1_doc, [model.selection("SOLID", "ExtrusionCut_6_1_1"), model.selection("SOLID", "Extrusion_4_1")], [model.selection("SOLID", "ExtrusionCut_6_1_2")])
522 ExtrusionCut_7 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_4/Face-SketchCircle_9_2f")], model.selection(), 0, 10, [model.selection("SOLID", "Smash_2_1_1")])
523 ExtrusionCut_8 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_4/Face-SketchCircle_9_2f")], model.selection(), 0, 10, [model.selection("SOLID", "ExtrusionCut_7_1_1")])
524 Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "Smash_2_1_1/Modified_Face_1"))
525 SketchPoint_3 = Sketch_5.addPoint(model.selection("VERTEX", "PartSet/Origin"))
526 SketchPoint_3.setName("SketchPoint_2")
527 SketchPoint_3.result().setName("SketchPoint_2")
528 SketchLine_37 = Sketch_5.addLine(-13.96424004376894, -17, -32, -17)
529 SketchLine_37.setName("SketchLine_29")
530 SketchLine_37.result().setName("SketchLine_29")
531 SketchLine_38 = Sketch_5.addLine(-32, 17, -13.96424004376904, 17)
532 SketchLine_38.setName("SketchLine_30")
533 SketchLine_38.result().setName("SketchLine_30")
534 SketchConstraintHorizontal_11 = Sketch_5.setHorizontal(SketchLine_37.result())
535 SketchConstraintHorizontal_11.setName("SketchConstraintHorizontal_10")
536 SketchConstraintHorizontal_12 = Sketch_5.setHorizontal(SketchLine_38.result())
537 SketchConstraintHorizontal_12.setName("SketchConstraintHorizontal_11")
538 SketchLine_39 = Sketch_5.addLine(model.selection("EDGE", "PartSet/OX"))
539 SketchLine_39.setName("SketchLine_31")
540 SketchLine_39.result().setName("SketchLine_31")
541 SketchConstraintDistance_17 = Sketch_5.setDistance(SketchLine_37.result(), SketchLine_38.startPoint(), "epaisseur*coeff")
542 SketchConstraintDistance_17.setName("SketchConstraintDistance_13")
543 SketchArc_19 = Sketch_5.addArc(2.175718373563154e-31, -6.039735315912772e-31, -13.96424004376904, 17, -13.964240043769, -17, False)
544 SketchArc_19.setName("SketchArc_5")
545 SketchArc_19.result().setName("SketchArc_5")
546 SketchArc_19.results()[1].setName("SketchArc_5_2")
547 SketchConstraintCoincidence_54 = Sketch_5.setCoincident(SketchPoint_3.coordinates(), SketchArc_19.center())
548 SketchConstraintCoincidence_54.setName("SketchConstraintCoincidence_36")
549 SketchConstraintCoincidence_55 = Sketch_5.setCoincident(SketchLine_38.endPoint(), SketchArc_19.startPoint())
550 SketchConstraintCoincidence_55.setName("SketchConstraintCoincidence_37")
551 SketchConstraintCoincidence_56 = Sketch_5.setCoincident(SketchLine_37.result(), SketchArc_19.endPoint())
552 SketchConstraintCoincidence_56.setName("SketchConstraintCoincidence_39")
553 SketchConstraintRadius_12 = Sketch_5.setRadius(SketchArc_19.results()[1], "r2*coeff")
554 SketchConstraintRadius_12.setName("SketchConstraintRadius_11")
555 SketchLine_40 = Sketch_5.addLine(-32, -17, -32, 17)
556 SketchLine_40.setName("SketchLine_32")
557 SketchLine_40.result().setName("SketchLine_32")
558 SketchConstraintCoincidence_57 = Sketch_5.setCoincident(SketchLine_38.startPoint(), SketchLine_40.endPoint())
559 SketchConstraintCoincidence_57.setName("SketchConstraintCoincidence_35")
560 SketchConstraintCoincidence_58 = Sketch_5.setCoincident(SketchLine_40.startPoint(), SketchLine_37.endPoint())
561 SketchConstraintCoincidence_58.setName("SketchConstraintCoincidence_38")
562 SketchConstraintDistance_18 = Sketch_5.setDistance(SketchLine_40.result(), SketchArc_19.center(), "d1*coeff-entraxe*coeff")
563 SketchConstraintDistance_18.setName("SketchConstraintDistance_14")
564 SketchConstraintVertical_9 = Sketch_5.setVertical(SketchLine_40.result())
565 SketchConstraintVertical_9.setName("SketchConstraintVertical_6")
566 SketchConstraintDistance_19 = Sketch_5.setDistance(SketchLine_37.result(), SketchArc_19.center(), "epaisseur/2*coeff")
567 SketchConstraintDistance_19.setName("SketchConstraintDistance_15")
568 SketchConstraintCoincidence_59 = Sketch_5.setCoincident(SketchArc_19.endPoint(), SketchLine_37.startPoint())
569 SketchConstraintCoincidence_59.setName("SketchConstraintCoincidence_40")
571 Extrusion_5 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_5/Face-SketchLine_29r-SketchLine_30r-SketchArc_5_2r-SketchLine_32r")], model.selection(), 0, "22*coeff")
572 Sketch_6_origin = GeomAPI_Pnt(0, 0, 0)
573 Sketch_6_norm = GeomAPI_Dir(0, 1, 0)
574 Sketch_6_dirx = GeomAPI_Dir(1, 0, 0)
575 Sketch_6 = model.addSketch(Part_1_doc, GeomAPI_Ax3(Sketch_6_origin, Sketch_6_dirx, Sketch_6_norm))
576 SketchLine_41 = Sketch_6.addLine(-32, -17, -32, 17)
577 SketchLine_41.setName("SketchLine_33")
578 SketchLine_41.result().setName("SketchLine_33")
579 SketchPoint_4 = Sketch_6.addPoint(model.selection("VERTEX", "Sketch_5/Vertex-SketchLine_32s-SketchLine_29e"))
580 SketchPoint_4.setName("SketchPoint_3")
581 SketchPoint_4.result().setName("SketchPoint_3")
582 SketchConstraintCoincidence_60 = Sketch_6.setCoincident(SketchLine_41.startPoint(), SketchPoint_4.result())
583 SketchConstraintCoincidence_60.setName("SketchConstraintCoincidence_41")
584 SketchPoint_5 = Sketch_6.addPoint(model.selection("VERTEX", "Sketch_5/Vertex-SketchLine_30s-SketchLine_32e"))
585 SketchPoint_5.setName("SketchPoint_4")
586 SketchPoint_5.result().setName("SketchPoint_4")
587 SketchConstraintCoincidence_61 = Sketch_6.setCoincident(SketchLine_41.endPoint(), SketchPoint_5.result())
588 SketchConstraintCoincidence_61.setName("SketchConstraintCoincidence_42")
589 SketchPoint_6 = Sketch_6.addPoint(model.selection("VERTEX", "Sketch_5/Vertex-SketchPoint_2-SketchArc_5-SketchLine_31s"))
590 SketchPoint_6.setName("SketchPoint_5")
591 SketchPoint_6.result().setName("SketchPoint_5")
592 SketchLine_42 = Sketch_6.addLine(model.selection("EDGE", "Sketch_5/Edge-SketchLine_30"))
593 SketchLine_42.setName("SketchLine_34")
594 SketchLine_42.result().setName("SketchLine_34")
595 SketchLine_43 = Sketch_6.addLine(model.selection("EDGE", "Sketch_5/Edge-SketchLine_29"))
596 SketchLine_43.setName("SketchLine_35")
597 SketchLine_43.result().setName("SketchLine_35")
598 SketchArc_20 = Sketch_6.addArc(0, 0, -20.32855135026245, 17, -20.32855135026245, -17, False)
599 SketchArc_20.setName("SketchArc_6")
600 SketchArc_20.result().setName("SketchArc_6")
601 SketchArc_20.results()[1].setName("SketchArc_6_2")
602 SketchConstraintCoincidence_62 = Sketch_6.setCoincident(SketchPoint_6.result(), SketchArc_20.center())
603 SketchConstraintCoincidence_62.setName("SketchConstraintCoincidence_43")
604 SketchConstraintCoincidence_63 = Sketch_6.setCoincident(SketchLine_42.result(), SketchArc_20.startPoint())
605 SketchConstraintCoincidence_63.setName("SketchConstraintCoincidence_44")
606 SketchConstraintCoincidence_64 = Sketch_6.setCoincident(SketchLine_43.result(), SketchArc_20.endPoint())
607 SketchConstraintCoincidence_64.setName("SketchConstraintCoincidence_45")
608 SketchLine_44 = Sketch_6.addLine(-20.32855135026245, -17, -32, -17)
609 SketchLine_44.setName("SketchLine_36")
610 SketchLine_44.result().setName("SketchLine_36")
611 SketchConstraintCoincidence_65 = Sketch_6.setCoincident(SketchArc_20.endPoint(), SketchLine_44.startPoint())
612 SketchConstraintCoincidence_65.setName("SketchConstraintCoincidence_46")
613 SketchConstraintCoincidence_66 = Sketch_6.setCoincident(SketchLine_41.startPoint(), SketchLine_44.endPoint())
614 SketchConstraintCoincidence_66.setName("SketchConstraintCoincidence_47")
615 SketchLine_45 = Sketch_6.addLine(-20.32855135026245, 17, -32, 17)
616 SketchLine_45.setName("SketchLine_37")
617 SketchLine_45.result().setName("SketchLine_37")
618 SketchConstraintCoincidence_67 = Sketch_6.setCoincident(SketchArc_20.startPoint(), SketchLine_45.startPoint())
619 SketchConstraintCoincidence_67.setName("SketchConstraintCoincidence_48")
620 SketchConstraintCoincidence_68 = Sketch_6.setCoincident(SketchLine_41.endPoint(), SketchLine_45.endPoint())
621 SketchConstraintCoincidence_68.setName("SketchConstraintCoincidence_49")
622 SketchConstraintRadius_13 = Sketch_6.setRadius(SketchArc_20.results()[1], "r1*coeff")
623 SketchConstraintRadius_13.setName("SketchConstraintRadius_10")
625 Extrusion_6 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_6/Face-SketchLine_33r-SketchArc_6_2r-SketchLine_36r-SketchLine_37f")], model.selection(), "77*coeff-h_p*coeff", 0)
626 Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_6_1/Generated_Face_1"))
627 SketchLine_46 = Sketch_7.addLine(37, -8.881784197001252e-16, -22, 1.665334536937735e-15)
628 SketchLine_46.setName("SketchLine_38")
629 SketchLine_46.result().setName("SketchLine_38")
630 SketchLine_46.setAuxiliary(True)
631 SketchLine_47 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_6_1/Generated_Face_1&Extrusion_6_1/To_Face_1"))
632 SketchLine_47.setName("SketchLine_39")
633 SketchLine_47.result().setName("SketchLine_39")
634 SketchConstraintCoincidence_69 = Sketch_7.setCoincident(SketchLine_46.startPoint(), SketchLine_47.result())
635 SketchConstraintCoincidence_69.setName("SketchConstraintCoincidence_50")
636 SketchLine_48 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_5_1/Generated_Face_2&Extrusion_5_1/From_Face_1"))
637 SketchLine_48.setName("SketchLine_40")
638 SketchLine_48.result().setName("SketchLine_40")
639 SketchConstraintCoincidence_70 = Sketch_7.setCoincident(SketchLine_46.endPoint(), SketchLine_48.result())
640 SketchConstraintCoincidence_70.setName("SketchConstraintCoincidence_51")
641 SketchConstraintMiddle_5 = Sketch_7.setMiddlePoint(SketchLine_46.startPoint(), SketchLine_47.result())
642 SketchConstraintMiddle_5.setName("SketchConstraintMiddle_2")
643 SketchConstraintMiddle_6 = Sketch_7.setMiddlePoint(SketchLine_48.result(), SketchLine_46.endPoint())
644 SketchConstraintMiddle_6.setName("SketchConstraintMiddle_3")
645 SketchPoint_7 = Sketch_7.addPoint(17, -1.95597787542754e-16)
646 SketchPoint_7.setName("SketchPoint_6")
647 SketchPoint_7.result().setName("SketchPoint_6")
648 SketchConstraintCoincidence_71 = Sketch_7.setCoincident(SketchPoint_7.coordinates(), SketchLine_46.result())
649 SketchConstraintCoincidence_71.setName("SketchConstraintCoincidence_52")
650 SketchProjection_9 = Sketch_7.addProjection(model.selection("EDGE", "PartSet/OZ"))
651 SketchLine_49 = SketchProjection_9.createdFeature()
652 SketchLine_49.setName("SketchLine_41")
653 SketchLine_49.result().setName("SketchLine_41")
654 SketchConstraintDistance_20 = Sketch_7.setDistance(SketchLine_49.result(), SketchPoint_7.coordinates(), "(h_o-h_p)*coeff")
655 SketchConstraintDistance_20.setName("SketchConstraintDistance_16")
656 SketchCircle_11 = Sketch_7.addCircle(17, -1.95597787542754e-16, 2.5)
657 SketchCircle_11.setName("SketchCircle_10")
658 SketchCircle_11.result().setName("SketchCircle_10")
659 SketchCircle_11.results()[1].setName("SketchCircle_10_2")
660 SketchConstraintCoincidence_72 = Sketch_7.setCoincident(SketchPoint_7.coordinates(), SketchCircle_11.center())
661 SketchConstraintCoincidence_72.setName("SketchConstraintCoincidence_53")
662 SketchConstraintRadius_14 = Sketch_7.setRadius(SketchCircle_11.results()[1], "r3")
663 SketchConstraintRadius_14.setName("SketchConstraintRadius_12")
665 ExtrusionCut_9 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_7/Wire-SketchCircle_10_2f")], model.selection(), 0, "10*coeff", [model.selection("SOLID", "Extrusion_6_1")])
666 ExtrusionCut_10 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchArc_7_2r-SketchArc_10_2f-SketchLine_44r-SketchArc_12_2r-SketchArc_13_2r-SketchLine_48r-SketchLine_43f-SketchArc_14_2f"), model.selection("FACE", "Sketch_1/Face-SketchCircle_11_2f"), model.selection("WIRE", "Sketch_1/Wire-SketchLine_50f-SketchArc_15_2f-SketchArc_16_2r-SketchLine_51r-SketchArc_17_2r-SketchLine_52f"), model.selection("FACE", "Sketch_1/Face-SketchLine_53f-SketchArc_18_2r-SketchLine_54f-SketchArc_19_2r-SketchArc_20_2f-SketchLine_55r-SketchArc_21_2f-SketchArc_22_2r"), model.selection("FACE", "Sketch_1/Face-SketchArc_8_2r-SketchArc_9_2f-SketchLine_42r-SketchLine_45f-SketchLine_46r-SketchArc_11_2r")], model.selection(), model.selection("FACE", "ExtrusionCut_3_2/Modfied_1"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_8_1_2")])
667 Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_9_1/Modfied_1"))
668 SketchLine_50 = Sketch_8.addLine(37, 14.80042035331162, 37, -14)
669 SketchLine_50.setName("SketchLine_56")
670 SketchLine_50.result().setName("SketchLine_56")
671 SketchLine_50.setAuxiliary(True)
672 SketchLine_51 = Sketch_8.addLine(model.selection("EDGE", "ExtrusionCut_9_1/Modfied_1&Extrusion_6_1/To_Face_1"))
673 SketchLine_51.setName("SketchLine_57")
674 SketchLine_51.result().setName("SketchLine_57")
675 SketchConstraintCoincidence_73 = Sketch_8.setCoincident(SketchLine_50.startPoint(), SketchLine_51.result())
676 SketchConstraintCoincidence_73.setName("SketchConstraintCoincidence_81")
677 SketchConstraintCoincidence_74 = Sketch_8.setCoincident(SketchLine_50.endPoint(), SketchLine_51.result())
678 SketchConstraintCoincidence_74.setName("SketchConstraintCoincidence_82")
679 SketchLine_52 = Sketch_8.addLine(model.selection("EDGE", "Extrusion_6_1/Generated_Face_4&ExtrusionCut_9_1/Modfied_1"))
680 SketchLine_52.setName("SketchLine_58")
681 SketchLine_52.result().setName("SketchLine_58")
682 SketchArc_21 = Sketch_8.addArc(34, -14, 37, -14, 34.00000001126211, -17, True)
683 SketchArc_21.setName("SketchArc_23")
684 SketchArc_21.result().setName("SketchArc_23")
685 SketchArc_21.results()[1].setName("SketchArc_23_2")
686 SketchConstraintCoincidence_75 = Sketch_8.setCoincident(SketchLine_50.endPoint(), SketchArc_21.startPoint())
687 SketchConstraintCoincidence_75.setName("SketchConstraintCoincidence_83")
688 SketchConstraintTangent_6 = Sketch_8.setTangent(SketchLine_50.result(), SketchArc_21.results()[1])
689 SketchConstraintCoincidence_76 = Sketch_8.setCoincident(SketchLine_52.result(), SketchArc_21.endPoint())
690 SketchConstraintCoincidence_76.setName("SketchConstraintCoincidence_84")
691 SketchConstraintTangent_7 = Sketch_8.setTangent(SketchArc_21.results()[1], SketchLine_52.result())
692 SketchLine_53 = Sketch_8.addLine(34.00000002238511, -17, 37, -17)
693 SketchLine_53.setName("SketchLine_59")
694 SketchLine_53.result().setName("SketchLine_59")
695 SketchConstraintCoincidence_77 = Sketch_8.setCoincident(SketchArc_21.endPoint(), SketchLine_53.startPoint())
696 SketchConstraintCoincidence_77.setName("SketchConstraintCoincidence_85")
697 SketchConstraintCoincidence_78 = Sketch_8.setCoincident(SketchLine_51.startPoint(), SketchLine_53.endPoint())
698 SketchConstraintCoincidence_78.setName("SketchConstraintCoincidence_86")
699 SketchLine_54 = Sketch_8.addLine(37, -14, 37, -17)
700 SketchLine_54.setName("SketchLine_60")
701 SketchLine_54.result().setName("SketchLine_60")
702 SketchConstraintCoincidence_79 = Sketch_8.setCoincident(SketchLine_50.endPoint(), SketchLine_54.startPoint())
703 SketchConstraintCoincidence_79.setName("SketchConstraintCoincidence_87")
704 SketchConstraintCoincidence_80 = Sketch_8.setCoincident(SketchLine_51.startPoint(), SketchLine_54.endPoint())
705 SketchConstraintCoincidence_80.setName("SketchConstraintCoincidence_88")
706 SketchConstraintRadius_15 = Sketch_8.setRadius(SketchArc_21.results()[1], "3*coeff")
707 SketchConstraintRadius_15.setName("SketchConstraintRadius_16")
708 SketchLine_55 = Sketch_8.addLine(model.selection("EDGE", "Sketch_7/Edge-SketchLine_38"))
709 SketchLine_55.setName("SketchLine_61")
710 SketchLine_55.result().setName("SketchLine_61")
711 SketchConstraintMirror_2_objects = [SketchArc_21.results()[1], SketchLine_54.result(), SketchLine_53.result()]
712 SketchConstraintMirror_2 = Sketch_8.addMirror(SketchLine_55.result(), SketchConstraintMirror_2_objects)
713 [SketchArc_22, SketchLine_56, SketchLine_57] = SketchConstraintMirror_2.mirrored()
714 SketchLine_57.setName("SketchLine_63")
715 SketchLine_57.result().setName("SketchLine_63")
716 SketchLine_56.setName("SketchLine_62")
717 SketchLine_56.result().setName("SketchLine_62")
718 SketchArc_22.setName("SketchArc_24")
719 SketchArc_22.result().setName("SketchArc_24")
720 SketchArc_22.results()[1].setName("SketchArc_24_2")
722 ExtrusionCut_11 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_8/Face-SketchArc_23_2r-SketchLine_59f-SketchLine_60r"), model.selection("WIRE", "Sketch_8/Wire-SketchArc_24_2r-SketchLine_62f-SketchLine_63r")], model.selection(), 0, "100*coeff", [model.selection("SOLID", "ExtrusionCut_9_1")])
723 Sketch_9 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_5_1/Generated_Face_1"))
724 SketchLine_58 = Sketch_9.addLine(-32, -19, -32, -3.575047476349699)
725 SketchLine_58.setName("SketchLine_64")
726 SketchLine_58.result().setName("SketchLine_64")
727 SketchLine_58.setAuxiliary(True)
728 SketchLine_59 = Sketch_9.addLine(model.selection("EDGE", "Extrusion_5_1/Generated_Face_1&Extrusion_5_1/Generated_Face_2"))
729 SketchLine_59.setName("SketchLine_65")
730 SketchLine_59.result().setName("SketchLine_65")
731 SketchConstraintCoincidence_81 = Sketch_9.setCoincident(SketchLine_58.startPoint(), SketchLine_59.result())
732 SketchConstraintCoincidence_81.setName("SketchConstraintCoincidence_89")
733 SketchConstraintCoincidence_82 = Sketch_9.setCoincident(SketchLine_58.endPoint(), SketchLine_59.result())
734 SketchConstraintCoincidence_82.setName("SketchConstraintCoincidence_90")
735 SketchLine_60 = Sketch_9.addLine(model.selection("EDGE", "Extrusion_5_1/Generated_Face_1&Extrusion_5_1/From_Face_1"))
736 SketchLine_60.setName("SketchLine_66")
737 SketchLine_60.result().setName("SketchLine_66")
738 SketchArc_23 = Sketch_9.addArc(-29, -19, -32, -19, -29.00002201340376, -22, False)
739 SketchArc_23.setName("SketchArc_25")
740 SketchArc_23.result().setName("SketchArc_25")
741 SketchArc_23.results()[1].setName("SketchArc_25_2")
742 SketchConstraintCoincidence_83 = Sketch_9.setCoincident(SketchLine_58.startPoint(), SketchArc_23.startPoint())
743 SketchConstraintCoincidence_83.setName("SketchConstraintCoincidence_91")
744 SketchConstraintTangent_8 = Sketch_9.setTangent(SketchLine_58.result(), SketchArc_23.results()[1])
745 SketchConstraintCoincidence_84 = Sketch_9.setCoincident(SketchLine_60.result(), SketchArc_23.endPoint())
746 SketchConstraintCoincidence_84.setName("SketchConstraintCoincidence_92")
747 SketchConstraintTangent_9 = Sketch_9.setTangent(SketchArc_23.results()[1], SketchLine_60.result())
748 SketchLine_61 = Sketch_9.addLine(-32, -19, -32, -22)
749 SketchLine_61.setName("SketchLine_67")
750 SketchLine_61.result().setName("SketchLine_67")
751 SketchConstraintCoincidence_85 = Sketch_9.setCoincident(SketchLine_58.startPoint(), SketchLine_61.startPoint())
752 SketchConstraintCoincidence_85.setName("SketchConstraintCoincidence_93")
753 SketchConstraintCoincidence_86 = Sketch_9.setCoincident(SketchLine_59.startPoint(), SketchLine_61.endPoint())
754 SketchConstraintCoincidence_86.setName("SketchConstraintCoincidence_94")
755 SketchLine_62 = Sketch_9.addLine(-32, -22, -29.00002201340376, -22)
756 SketchLine_62.setName("SketchLine_68")
757 SketchLine_62.result().setName("SketchLine_68")
758 SketchConstraintCoincidence_87 = Sketch_9.setCoincident(SketchLine_59.startPoint(), SketchLine_62.startPoint())
759 SketchConstraintCoincidence_87.setName("SketchConstraintCoincidence_95")
760 SketchConstraintCoincidence_88 = Sketch_9.setCoincident(SketchArc_23.endPoint(), SketchLine_62.endPoint())
761 SketchConstraintCoincidence_88.setName("SketchConstraintCoincidence_96")
762 SketchConstraintRadius_16 = Sketch_9.setRadius(SketchArc_23.results()[1], "3*coeff")
763 SketchConstraintRadius_16.setName("SketchConstraintRadius_17")
765 ExtrusionCut_12 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_9/Face-SketchArc_25_2r-SketchLine_67f-SketchLine_68f")], model.selection(), 0, "100*coeff", [model.selection("SOLID", "Extrusion_5_1")])
768 from GeomAPI import GeomAPI_Shape
770 model.testNbResults(Part_1, 1)
771 model.testNbSubResults(Part_1, [0])
772 model.testNbSubShapes(Part_1, GeomAPI_Shape.SOLID, [6])
773 model.testNbSubShapes(Part_1, GeomAPI_Shape.FACE, [85])
774 model.testNbSubShapes(Part_1, GeomAPI_Shape.EDGE, [444])
775 model.testNbSubShapes(Part_1, GeomAPI_Shape.VERTEX, [888])
776 model.testResultsVolumes(Part_1, [118190.673218984])
778 # checking for parametric update
779 Parameter_Epaisseur.setValue(33.9)
781 model.testResultsVolumes(Part_1, [118105.9369682])
782 Parameter_Epaisseur.setValue(34)
785 assert(model.checkPythonDump())