1 # Copyright (C) 2014-2020 CEA/DEN, EDF R&D
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 from SketchAPI import *
22 from salome.shaper import model
25 partSet = model.moduleDocument()
26 Part_1 = model.addPart(partSet)
27 Part_1_doc = Part_1.document()
28 model.addParameter(Part_1_doc, "languette", "20")
29 model.addParameter(Part_1_doc, "d1", "70")
30 model.addParameter(Part_1_doc, "d2", "77.5")
31 model.addParameter(Part_1_doc, "d3", "32.5")
32 model.addParameter(Part_1_doc, "h1", "10")
33 model.addParameter(Part_1_doc, "r_trou", "3.125")
34 model.addParameter(Part_1_doc, "r1", "7.5")
35 model.addParameter(Part_1_doc, "r_trou2", "5")
36 model.addParameter(Part_1_doc, "d4", "110")
37 model.addParameter(Part_1_doc, "d5", "21.25")
38 model.addParameter(Part_1_doc, "d6", "31.25")
39 model.addParameter(Part_1_doc, "angle", "30")
40 model.addParameter(Part_1_doc, "h2", "15")
41 model.addParameter(Part_1_doc, "h3", "7.5")
42 model.addParameter(Part_1_doc, "r2", "3.75")
43 model.addParameter(Part_1_doc, "r3", "1.25")
44 model.addParameter(Part_1_doc, "epaisseur", "2.5")
45 model.addParameter(Part_1_doc, "e1", "6.2")
46 model.addParameter(Part_1_doc, "e2", "15")
47 model.addParameter(Part_1_doc, "d7", "11.2")
48 model.addParameter(Part_1_doc, "h4", "40")
49 model.addParameter(Part_1_doc, "d_diff", "5")
50 model.addParameter(Part_1_doc, "e3", "35")
51 model.addParameter(Part_1_doc, "d8", "23.75")
52 model.addParameter(Part_1_doc, "d9", "6.25")
53 model.addParameter(Part_1_doc, "d_trou", "17.5")
54 model.addParameter(Part_1_doc, "coeff", "1")
55 model.addParameter(Part_1_doc, "epaisseur_plat", "25")
56 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
57 SketchLine_1 = Sketch_1.addLine(0, 0, 13.23223304703355, -2.874692731756102e-26)
58 SketchPoint_1 = Sketch_1.addPoint(model.selection("VERTEX", "PartSet/Origin"))
59 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchPoint_1.result())
60 SketchLine_2 = Sketch_1.addLine(model.selection("EDGE", "PartSet/OX"))
61 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.result())
62 SketchArc_1 = Sketch_1.addArc(13.23223304703355, 5.51776695296637, 13.23223304703355, -2.874692731756102e-26, 18.74999999999991, 5.51776695296637, False)
63 SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchArc_1.startPoint())
64 SketchConstraintTangent_1 = Sketch_1.setTangent(SketchLine_1.result(), SketchArc_1.results()[1])
65 SketchLine_3 = Sketch_1.addLine(18.74999999999991, 5.51776695296637, 18.74999999999991, 29.48223304703358)
66 SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_3.startPoint())
67 SketchArc_2 = Sketch_1.addArc(21.76776695296633, 29.48223304703358, 18.74999999999991, 29.48223304703358, 21.76776695296638, 32.50000000000001, True)
68 SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchArc_2.startPoint())
69 SketchConstraintTangent_2 = Sketch_1.setTangent(SketchLine_3.result(), SketchArc_2.results()[1])
70 SketchLine_4 = Sketch_1.addLine(21.76776695296638, 32.50000000000001, 88.23223304703366, 32.50000000000001)
71 SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchArc_2.endPoint(), SketchLine_4.startPoint())
72 SketchArc_3 = Sketch_1.addArc(88.23223304703366, 29.48223304703358, 88.23223304703366, 32.50000000000001, 91.25000000000009, 29.48223304703358, True)
73 SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchArc_3.startPoint())
74 SketchConstraintTangent_3 = Sketch_1.setTangent(SketchLine_4.result(), SketchArc_3.results()[1])
75 SketchLine_5 = Sketch_1.addLine(91.25000000000009, 29.48223304703358, 91.25000000000009, 5.51776695296637)
76 SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchArc_3.endPoint(), SketchLine_5.startPoint())
77 SketchArc_4 = Sketch_1.addArc(96.76776695296645, 5.51776695296637, 91.25000000000009, 5.51776695296637, 96.76776695296645, 0, False)
78 SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchArc_4.startPoint())
79 SketchConstraintTangent_4 = Sketch_1.setTangent(SketchLine_5.result(), SketchArc_4.results()[1])
80 SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_2.result(), SketchArc_4.endPoint())
81 SketchLine_6 = Sketch_1.addLine(96.76776695296645, 0, 110, 0)
82 SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchArc_4.endPoint(), SketchLine_6.startPoint())
83 SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_2.result())
84 SketchLine_7 = Sketch_1.addLine(0, 0, 0, 2.5)
85 SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_7.startPoint())
86 SketchLine_8 = Sketch_1.addLine(0, 2.5, 14.99999999999991, 2.5)
87 SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint())
88 SketchArc_5 = Sketch_1.addArc(14.99999999999991, 3.75, 14.99999999999991, 2.5, 16.24999999999991, 3.75, False)
89 SketchConstraintCoincidence_15 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchArc_5.startPoint())
90 SketchConstraintTangent_5 = Sketch_1.setTangent(SketchLine_8.result(), SketchArc_5.results()[1])
91 SketchLine_9 = Sketch_1.addLine(16.24999999999991, 3.75, 16.24999999999991, 31.24999999999991)
92 SketchConstraintCoincidence_16 = Sketch_1.setCoincident(SketchArc_5.endPoint(), SketchLine_9.startPoint())
93 SketchArc_6 = Sketch_1.addArc(19.99999999999991, 31.24999999999991, 16.24999999999991, 31.24999999999991, 19.99999999999996, 35, True)
94 SketchConstraintCoincidence_17 = Sketch_1.setCoincident(SketchLine_9.endPoint(), SketchArc_6.startPoint())
95 SketchConstraintTangent_6 = Sketch_1.setTangent(SketchLine_9.result(), SketchArc_6.results()[1])
96 SketchLine_10 = Sketch_1.addLine(19.99999999999996, 35, 89.99999999999997, 35)
97 SketchConstraintCoincidence_18 = Sketch_1.setCoincident(SketchArc_6.endPoint(), SketchLine_10.startPoint())
98 SketchArc_7 = Sketch_1.addArc(90.00000000000009, 31.24999999999977, 89.99999999999997, 35, 93.75000000000009, 31.24999999999977, True)
99 SketchConstraintCoincidence_19 = Sketch_1.setCoincident(SketchLine_10.endPoint(), SketchArc_7.startPoint())
100 SketchConstraintTangent_7 = Sketch_1.setTangent(SketchLine_10.result(), SketchArc_7.results()[1])
101 SketchLine_11 = Sketch_1.addLine(93.75000000000009, 31.24999999999977, 93.75000000000009, 3.75)
102 SketchConstraintCoincidence_20 = Sketch_1.setCoincident(SketchArc_7.endPoint(), SketchLine_11.startPoint())
103 SketchArc_8 = Sketch_1.addArc(95.00000000000009, 3.75, 93.75000000000009, 3.75, 95.00000000000009, 2.5, False)
104 SketchConstraintCoincidence_21 = Sketch_1.setCoincident(SketchLine_11.endPoint(), SketchArc_8.startPoint())
105 SketchConstraintTangent_8 = Sketch_1.setTangent(SketchLine_11.result(), SketchArc_8.results()[1])
106 SketchLine_12 = Sketch_1.addLine(95.00000000000009, 2.5, 110, 2.5)
107 SketchConstraintCoincidence_22 = Sketch_1.setCoincident(SketchArc_8.endPoint(), SketchLine_12.startPoint())
108 SketchLine_13 = Sketch_1.addLine(110, 2.5, 110, 0)
109 SketchConstraintCoincidence_23 = Sketch_1.setCoincident(SketchLine_12.endPoint(), SketchLine_13.startPoint())
110 SketchConstraintCoincidence_24 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_13.endPoint())
111 SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_7.result())
112 SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_3.result())
113 SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_9.result())
114 SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_5.result())
115 SketchConstraintVertical_5 = Sketch_1.setVertical(SketchLine_11.result())
116 SketchConstraintVertical_6 = Sketch_1.setVertical(SketchLine_13.result())
117 SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_10.result())
118 SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_4.result())
119 SketchConstraintHorizontal_3 = Sketch_1.setHorizontal(SketchLine_12.result())
120 SketchConstraintTangent_9 = Sketch_1.setTangent(SketchArc_6.results()[1], SketchLine_10.result())
121 SketchConstraintTangent_10 = Sketch_1.setTangent(SketchArc_7.results()[1], SketchLine_11.result())
122 SketchConstraintTangent_11 = Sketch_1.setTangent(SketchArc_8.results()[1], SketchLine_12.result())
123 SketchConstraintTangent_12 = Sketch_1.setTangent(SketchArc_5.results()[1], SketchLine_9.result())
124 SketchConstraintTangent_13 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchLine_3.result())
125 SketchConstraintHorizontal_4 = Sketch_1.setHorizontal(SketchLine_8.result())
126 SketchConstraintTangent_14 = Sketch_1.setTangent(SketchArc_4.results()[1], SketchLine_6.result())
127 SketchConstraintTangent_15 = Sketch_1.setTangent(SketchArc_2.results()[1], SketchLine_4.result())
128 SketchConstraintTangent_16 = Sketch_1.setTangent(SketchArc_3.results()[1], SketchLine_5.result())
129 SketchConstraintEqual_1 = Sketch_1.setEqual(SketchArc_5.results()[1], SketchArc_8.results()[1])
130 SketchConstraintEqual_2 = Sketch_1.setEqual(SketchLine_8.result(), SketchLine_12.result())
131 SketchConstraintEqual_3 = Sketch_1.setEqual(SketchLine_1.result(), SketchLine_6.result())
132 SketchConstraintEqual_4 = Sketch_1.setEqual(SketchArc_1.results()[1], SketchArc_4.results()[1])
133 SketchConstraintEqual_5 = Sketch_1.setEqual(SketchLine_3.result(), SketchLine_5.result())
134 SketchConstraintEqual_6 = Sketch_1.setEqual(SketchLine_9.result(), SketchLine_11.result())
135 SketchConstraintEqual_7 = Sketch_1.setEqual(SketchLine_7.result(), SketchLine_13.result())
136 SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_7.result(), "epaisseur*coeff")
137 SketchConstraintDistance_1 = Sketch_1.setDistance(SketchArc_5.endPoint(), SketchLine_3.result(), "epaisseur*coeff")
138 SketchConstraintDistance_2 = Sketch_1.setDistance(SketchArc_6.endPoint(), SketchLine_4.result(), "epaisseur*coeff")
139 SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_5.results()[1], "r3*coeff")
140 SketchConstraintRadius_2 = Sketch_1.setRadius(SketchArc_6.results()[1], "r2*coeff")
141 SketchConstraintDistance_3 = Sketch_1.setDistance(SketchLine_12.endPoint(), SketchLine_7.result(), "d4*coeff")
142 SketchConstraintDistance_4 = Sketch_1.setDistance(SketchArc_5.center(), SketchArc_1.center(), "epaisseur*coeff")
143 SketchConstraintDistance_5 = Sketch_1.setDistance(SketchArc_2.center(), SketchArc_6.center(), "epaisseur*coeff")
144 SketchConstraintDistance_6 = Sketch_1.setDistance(SketchLine_1.result(), SketchArc_6.endPoint(), "(h4-d_diff)*coeff")
145 SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_10.result(), "d1*coeff")
147 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_1/Face-SketchLine_1r-SketchArc_1_2f-SketchLine_3f-SketchArc_2_2r-SketchLine_4f-SketchArc_3_2r-SketchLine_5f-SketchArc_4_2f-SketchLine_6f-SketchLine_13r-SketchLine_12r-SketchArc_8_2r-SketchLine_11r-SketchArc_7_2f-SketchLine_10r-SketchArc_6_2f-SketchLine_9r-SketchArc_5_2r-SketchLine_8r-SketchLine_7r_wire")], model.selection(), "epaisseur_plat*coeff", 0)
148 Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_7"), "d2*coeff", True)
149 Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
150 SketchProjection_1 = Sketch_2.addProjection(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchArc_7_2][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_10]"), False)
151 SketchLine_14 = SketchProjection_1.createdFeature()
152 SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_11][Extrusion_1_1/To_Face]"), False)
153 SketchLine_15 = SketchProjection_2.createdFeature()
154 SketchLine_16 = Sketch_2.addLine(-24.99999999999999, -35.00000000000001, -31.24999999999999, -35.00000000000001)
155 SketchConstraintCoincidence_25 = Sketch_2.setCoincident(SketchAPI_Line(SketchLine_14).endPoint(), SketchLine_16.startPoint())
156 SketchArc_9 = Sketch_2.addArc(-31.24999999999999, -31.25000000000001, -31.24999999999999, -35.00000000000001, -34.99999999999999, -31.25000000000001, True)
157 SketchConstraintCoincidence_26 = Sketch_2.setCoincident(SketchLine_16.endPoint(), SketchArc_9.startPoint())
158 SketchConstraintTangent_17 = Sketch_2.setTangent(SketchLine_16.result(), SketchArc_9.results()[1])
159 SketchLine_17 = Sketch_2.addLine(-35, -31.24999999999999, -35, 1.250000000000009)
160 SketchConstraintCoincidence_27 = Sketch_2.setCoincident(SketchArc_9.endPoint(), SketchLine_17.startPoint())
161 SketchArc_10 = Sketch_2.addArc(-31.25, 1.249999999999998, -35, 1.249999999999998, -31.25, 4.999999999999998, True)
162 SketchConstraintCoincidence_28 = Sketch_2.setCoincident(SketchLine_17.endPoint(), SketchArc_10.startPoint())
163 SketchConstraintTangent_18 = Sketch_2.setTangent(SketchLine_17.result(), SketchArc_10.results()[1])
164 SketchLine_18 = Sketch_2.addLine(-31.25, 4.999999999999999, -11.25, 4.999999999999999)
165 SketchConstraintCoincidence_29 = Sketch_2.setCoincident(SketchArc_10.endPoint(), SketchLine_18.startPoint())
166 SketchLine_19 = Sketch_2.addLine(-11.25, 5.000000000000009, -11.25, 2.500000000000009)
167 SketchConstraintCoincidence_30 = Sketch_2.setCoincident(SketchLine_18.endPoint(), SketchLine_19.startPoint())
168 SketchLine_20 = Sketch_2.addLine(-11.25, 2.500000000000002, -31.24999999999999, 2.500000000000017)
169 SketchConstraintCoincidence_31 = Sketch_2.setCoincident(SketchLine_19.endPoint(), SketchLine_20.startPoint())
170 SketchArc_11 = Sketch_2.addArc(-31.25, 1.25, -31.25, 2.500000000000002, -32.5, 1.250000000000808, False)
171 SketchConstraintCoincidence_32 = Sketch_2.setCoincident(SketchLine_20.endPoint(), SketchArc_11.startPoint())
172 SketchConstraintTangent_19 = Sketch_2.setTangent(SketchLine_20.result(), SketchArc_11.results()[1])
173 SketchLine_21 = Sketch_2.addLine(-32.5, 1.249999999999992, -32.5, -31.24999999999999)
174 SketchConstraintCoincidence_33 = Sketch_2.setCoincident(SketchArc_11.endPoint(), SketchLine_21.startPoint())
175 SketchArc_12 = Sketch_2.addArc(-31.25, -31.25, -32.5, -31.25, -31.25, -32.5, False)
176 SketchConstraintCoincidence_34 = Sketch_2.setCoincident(SketchLine_21.endPoint(), SketchArc_12.startPoint())
177 SketchConstraintTangent_20 = Sketch_2.setTangent(SketchLine_21.result(), SketchArc_12.results()[1])
178 SketchLine_22 = Sketch_2.addLine(-31.25, -32.50000000000001, -25.00000000000001, -32.50000000000001)
179 SketchConstraintCoincidence_35 = Sketch_2.setCoincident(SketchArc_12.endPoint(), SketchLine_22.startPoint())
180 SketchLine_23 = Sketch_2.addLine(-24.99999999999999, -35.00000000000001, -24.99999999999999, -32.50000000000002)
181 SketchConstraintCoincidence_36 = Sketch_2.setCoincident(SketchAPI_Line(SketchLine_14).endPoint(), SketchLine_23.startPoint())
182 SketchConstraintCoincidence_37 = Sketch_2.setCoincident(SketchLine_22.endPoint(), SketchLine_23.endPoint())
183 SketchConstraintHorizontal_5 = Sketch_2.setHorizontal(SketchLine_16.result())
184 SketchConstraintHorizontal_6 = Sketch_2.setHorizontal(SketchLine_22.result())
185 SketchConstraintHorizontal_7 = Sketch_2.setHorizontal(SketchLine_20.result())
186 SketchConstraintHorizontal_8 = Sketch_2.setHorizontal(SketchLine_18.result())
187 SketchConstraintVertical_7 = Sketch_2.setVertical(SketchLine_17.result())
188 SketchConstraintVertical_8 = Sketch_2.setVertical(SketchLine_21.result())
189 SketchConstraintVertical_9 = Sketch_2.setVertical(SketchLine_23.result())
190 SketchConstraintVertical_10 = Sketch_2.setVertical(SketchLine_19.result())
191 SketchConstraintTangent_21 = Sketch_2.setTangent(SketchArc_9.results()[1], SketchLine_17.result())
192 SketchConstraintTangent_22 = Sketch_2.setTangent(SketchArc_10.results()[1], SketchLine_18.result())
193 SketchConstraintTangent_23 = Sketch_2.setTangent(SketchArc_11.results()[1], SketchLine_21.result())
194 SketchConstraintTangent_24 = Sketch_2.setTangent(SketchArc_12.results()[1], SketchLine_22.result())
195 SketchConstraintDistance_7 = Sketch_2.setDistance(SketchLine_23.startPoint(), SketchLine_18.result(), "h4*coeff")
196 SketchConstraintDistance_8 = Sketch_2.setDistance(SketchLine_16.startPoint(), SketchLine_22.result(), "epaisseur*coeff")
197 SketchConstraintDistance_9 = Sketch_2.setDistance(SketchLine_21.endPoint(), SketchLine_17.result(), "epaisseur*coeff")
198 SketchConstraintDistance_10 = Sketch_2.setDistance(SketchArc_11.startPoint(), SketchLine_18.result(), "epaisseur*coeff")
199 SketchConstraintCoincidence_39 = Sketch_2.setCoincident(SketchLine_16.startPoint(), SketchAPI_Line(SketchLine_14).endPoint())
200 SketchPoint_2 = Sketch_2.addPoint(model.selection("VERTEX", "PartSet/Origin"))
201 SketchConstraintDistance_11 = Sketch_2.setDistance(SketchPoint_2.coordinates(), SketchLine_17.result(), "e3*coeff", False)
202 SketchConstraintRadius_3 = Sketch_2.setRadius(SketchArc_9.results()[1], "r2*coeff")
203 SketchConstraintEqual_9 = Sketch_2.setEqual(SketchArc_9.results()[1], SketchArc_10.results()[1])
204 SketchConstraintEqual_10 = Sketch_2.setEqual(SketchArc_11.results()[1], SketchArc_12.results()[1])
205 SketchConstraintRadius_4 = Sketch_2.setRadius(SketchArc_12.results()[1], "r3*coeff")
206 SketchConstraintDistance_13 = Sketch_2.setDistance(SketchArc_10.startPoint(), SketchLine_19.result(), "d8*coeff")
208 Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_2/Face-SketchLine_23f-SketchLine_22r-SketchArc_12_2r-SketchLine_21r-SketchArc_11_2r-SketchLine_20r-SketchLine_19r-SketchLine_18r-SketchArc_10_2f-SketchLine_17r-SketchArc_9_2f-SketchLine_16r_wire")], model.selection(), "d6*coeff", 0)
209 Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_2_1/Generated_Face&Sketch_2/SketchLine_17"))
210 SketchLine_24 = Sketch_3.addLine(46.25, 22.91561885925604, 51.3, 20.00000000000001)
211 SketchLine_25 = Sketch_3.addLine(model.selection("EDGE", "[Extrusion_2_1/Generated_Face&Sketch_2/SketchLine_17][Extrusion_2_1/To_Face]"))
212 SketchLine_26 = Sketch_3.addLine(51.3, 20.00000000000001, 62.50000000000001, 20.00000000000001)
213 SketchConstraintCoincidence_42 = Sketch_3.setCoincident(SketchLine_24.endPoint(), SketchLine_26.startPoint())
214 SketchLine_27 = Sketch_3.addLine(62.50000000000001, 20.00000000000001, 62.5, -4.999999999999999)
215 SketchConstraintCoincidence_43 = Sketch_3.setCoincident(SketchLine_26.endPoint(), SketchLine_27.startPoint())
216 SketchLine_28 = Sketch_3.addLine(62.5, -4.999999999999999, 46.25, -4.999999999999999)
217 SketchConstraintCoincidence_44 = Sketch_3.setCoincident(SketchLine_27.endPoint(), SketchLine_28.startPoint())
218 SketchLine_29 = Sketch_3.addLine(46.25, -4.999999999999999, 46.25, 22.91561885925604)
219 SketchConstraintCoincidence_45 = Sketch_3.setCoincident(SketchLine_28.endPoint(), SketchLine_29.startPoint())
220 SketchLine_30 = Sketch_3.addLine(46.25, 35.00000000000001, 56.25000000000002, 35.00000000000001)
221 SketchLine_31 = Sketch_3.addLine(56.25000000000002, 35.00000000000001, 56.25000000000002, 27.50000000000001)
222 SketchConstraintCoincidence_46 = Sketch_3.setCoincident(SketchLine_30.endPoint(), SketchLine_31.startPoint())
223 SketchLine_32 = Sketch_3.addLine(56.25000000000002, 27.50000000000001, 46.25, 27.50000000000001)
224 SketchConstraintCoincidence_47 = Sketch_3.setCoincident(SketchLine_31.endPoint(), SketchLine_32.startPoint())
225 SketchConstraintCoincidence_48 = Sketch_3.setCoincident(SketchLine_32.endPoint(), SketchLine_25.result())
226 SketchLine_33 = Sketch_3.addLine(46.25, 27.50000000000001, 46.25, 35.00000000000001)
227 SketchConstraintCoincidence_49 = Sketch_3.setCoincident(SketchLine_32.endPoint(), SketchLine_33.startPoint())
228 SketchConstraintCoincidence_50 = Sketch_3.setCoincident(SketchLine_30.startPoint(), SketchLine_33.endPoint())
229 SketchConstraintHorizontal_9 = Sketch_3.setHorizontal(SketchLine_28.result())
230 SketchConstraintHorizontal_10 = Sketch_3.setHorizontal(SketchLine_26.result())
231 SketchConstraintHorizontal_11 = Sketch_3.setHorizontal(SketchLine_32.result())
232 SketchConstraintHorizontal_12 = Sketch_3.setHorizontal(SketchLine_30.result())
233 SketchConstraintVertical_11 = Sketch_3.setVertical(SketchLine_29.result())
234 SketchConstraintVertical_12 = Sketch_3.setVertical(SketchLine_27.result())
235 SketchConstraintVertical_13 = Sketch_3.setVertical(SketchLine_33.result())
236 SketchConstraintVertical_14 = Sketch_3.setVertical(SketchLine_31.result())
237 SketchConstraintAngle_1 = Sketch_3.setAngleComplementary(SketchLine_26.result(), SketchLine_24.result(), "angle")
238 SketchProjection_3 = Sketch_3.addProjection(model.selection("EDGE", "[Extrusion_2_1/Generated_Face&Sketch_2/SketchLine_18][Extrusion_2_1/Generated_Face&Sketch_2/SketchArc_10_2]"), False)
239 SketchLine_34 = SketchProjection_3.createdFeature()
240 SketchProjection_4 = Sketch_3.addProjection(model.selection("EDGE", "[Extrusion_2_1/Generated_Face&Sketch_2/SketchArc_9_2][Extrusion_2_1/Generated_Face&Sketch_2/SketchLine_16]"), False)
241 SketchLine_35 = SketchProjection_4.createdFeature()
242 SketchConstraintCoincidence_51 = Sketch_3.setCoincident(SketchLine_28.endPoint(), SketchLine_34.result())
243 SketchConstraintDistance_15 = Sketch_3.setDistance(SketchLine_31.result(), SketchLine_33.endPoint(), "(d6-d5)*coeff")
244 SketchConstraintLength_3 = Sketch_3.setLength(SketchLine_33.result(), "h3*coeff")
245 SketchConstraintCoincidence_52 = Sketch_3.setCoincident(SketchLine_30.endPoint(), SketchLine_35.result())
246 SketchConstraintDistance_16 = Sketch_3.setDistance(SketchLine_27.result(), SketchLine_28.endPoint(), "(d6-e2)*coeff")
247 SketchConstraintCoincidence_53 = Sketch_3.setCoincident(SketchLine_28.endPoint(), SketchLine_25.result())
248 SketchConstraintCoincidence_54 = Sketch_3.setCoincident(SketchLine_29.endPoint(), SketchLine_24.startPoint())
249 SketchConstraintDistance_17 = Sketch_3.setDistance(SketchLine_26.result(), SketchAPI_Line(SketchLine_35).startPoint(), "h2*coeff")
250 SketchConstraintLength_4 = Sketch_3.setLength(SketchLine_26.result(), "d7*coeff")
252 ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchLine_29r-SketchLine_28r-SketchLine_27r-SketchLine_26r-SketchLine_24r")], model.selection(), model.selection("FACE", "Extrusion_2_1/Generated_Face&Sketch_2/SketchLine_19"), 0, model.selection(), 0, [model.selection("SOLID", "Extrusion_2_1")])
253 ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchLine_33r-SketchLine_32r-SketchLine_31r-SketchLine_30r")], model.selection(), model.selection("FACE", "Extrusion_1_1/To_Face"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
254 Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_7"), "d3*coeff", True)
255 Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_2"))
256 SketchProjection_5 = Sketch_4.addProjection(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_9][Extrusion_1_1/To_Face]"), False)
257 SketchLine_36 = SketchProjection_5.createdFeature()
258 SketchProjection_6 = Sketch_4.addProjection(model.selection("EDGE", "[ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchLine_23][ExtrusionCut_2_1/Generated_Face&Sketch_3/SketchLine_31]"), False)
259 SketchLine_37 = SketchProjection_6.createdFeature()
260 SketchProjection_7 = Sketch_4.addProjection(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_10][Extrusion_1_1/Generated_Face&Sketch_1/SketchArc_6_2]"), False)
261 SketchLine_38 = SketchProjection_7.createdFeature()
262 SketchLine_39 = Sketch_4.addLine(-25, -35.00000000000001, -31.24999999999999, -35.00000000000001)
263 SketchConstraintCoincidence_55 = Sketch_4.setCoincident(SketchAPI_Line(SketchLine_37).startPoint(), SketchLine_39.startPoint())
264 SketchArc_13 = Sketch_4.addArc(-31.25, -31.25000000000001, -31.24999999999999, -35.00000000000001, -34.99999999999999, -31.25000000000001, True)
265 SketchConstraintCoincidence_56 = Sketch_4.setCoincident(SketchLine_39.endPoint(), SketchArc_13.startPoint())
266 SketchConstraintTangent_25 = Sketch_4.setTangent(SketchLine_39.result(), SketchArc_13.results()[1])
267 SketchLine_40 = Sketch_4.addLine(-34.99999999999999, -31.25000000000001, -34.99999999999999, -20)
268 SketchConstraintCoincidence_57 = Sketch_4.setCoincident(SketchArc_13.endPoint(), SketchLine_40.startPoint())
269 SketchLine_41 = Sketch_4.addLine(-34.99999999999999, -20, -32.49999999999999, -20)
270 SketchConstraintCoincidence_58 = Sketch_4.setCoincident(SketchLine_40.endPoint(), SketchLine_41.startPoint())
271 SketchLine_42 = Sketch_4.addLine(-32.49999999999999, -20, -32.49999999999999, -31.24999999999389)
272 SketchConstraintCoincidence_59 = Sketch_4.setCoincident(SketchLine_41.endPoint(), SketchLine_42.startPoint())
273 SketchArc_14 = Sketch_4.addArc(-31.24999999999999, -31.24999999999393, -32.49999999999999, -31.24999999999389, -31.25000000000371, -32.50000000000001, False)
274 SketchConstraintCoincidence_60 = Sketch_4.setCoincident(SketchLine_42.endPoint(), SketchArc_14.startPoint())
275 SketchConstraintTangent_26 = Sketch_4.setTangent(SketchLine_42.result(), SketchArc_14.results()[1])
276 SketchLine_43 = Sketch_4.addLine(-31.25000000000371, -32.50000000000001, -25, -32.50000000000001)
277 SketchConstraintCoincidence_61 = Sketch_4.setCoincident(SketchArc_14.endPoint(), SketchLine_43.startPoint())
278 SketchConstraintCoincidence_62 = Sketch_4.setCoincident(SketchAPI_Line(SketchLine_37).endPoint(), SketchLine_43.endPoint())
279 SketchLine_44 = Sketch_4.addLine(-25, -35.00000000000001, -25, -32.50000000000001)
280 SketchConstraintCoincidence_63 = Sketch_4.setCoincident(SketchAPI_Line(SketchLine_37).startPoint(), SketchLine_44.startPoint())
281 SketchConstraintCoincidence_64 = Sketch_4.setCoincident(SketchAPI_Line(SketchLine_37).endPoint(), SketchLine_44.endPoint())
282 SketchConstraintHorizontal_13 = Sketch_4.setHorizontal(SketchLine_41.result())
283 SketchConstraintHorizontal_14 = Sketch_4.setHorizontal(SketchLine_43.result())
284 SketchConstraintHorizontal_15 = Sketch_4.setHorizontal(SketchLine_39.result())
285 SketchConstraintVertical_15 = Sketch_4.setVertical(SketchLine_42.result())
286 SketchConstraintVertical_16 = Sketch_4.setVertical(SketchLine_40.result())
287 SketchConstraintTangent_27 = Sketch_4.setTangent(SketchArc_13.results()[1], SketchLine_40.result())
288 SketchConstraintTangent_28 = Sketch_4.setTangent(SketchArc_14.results()[1], SketchLine_43.result())
289 SketchConstraintDistance_18 = Sketch_4.setDistance(SketchLine_40.result(), SketchLine_44.startPoint(), "h1*coeff")
290 SketchConstraintRadius_5 = Sketch_4.setRadius(SketchArc_13.results()[1], "r2*coeff")
291 SketchConstraintRadius_6 = Sketch_4.setRadius(SketchArc_14.results()[1], "r3*coeff")
292 SketchConstraintDistance_19 = Sketch_4.setDistance(SketchLine_41.endPoint(), SketchLine_40.result(), "epaisseur*coeff")
293 SketchConstraintDistance_20 = Sketch_4.setDistance(SketchLine_41.startPoint(), SketchLine_39.result(), "h2")
295 Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_4/Face-SketchLine_44f-SketchLine_43r-SketchArc_14_2r-SketchLine_42r-SketchLine_41r-SketchLine_40r-SketchArc_13_2f-SketchLine_39r_wire")], model.selection(), 0, "e1*coeff")
296 Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modified_Face&Sketch_2/SketchLine_18"))
297 SketchCircle_1 = Sketch_5.addCircle(70, 17.5, 3.125)
298 SketchLine_45 = Sketch_5.addLine(model.selection("EDGE", "[ExtrusionCut_1_1/Modified_Face&Sketch_2/SketchLine_19][ExtrusionCut_1_1/Modified_Face&Sketch_2/SketchLine_18]"))
299 SketchConstraintDistance_21 = Sketch_5.setDistance(SketchCircle_1.center(), SketchLine_45.result(), "d9*coeff")
300 SketchProjection_8 = Sketch_5.addProjection(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_6][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_13]"))
301 SketchLine_46 = SketchProjection_8.createdFeature()
302 SketchProjection_9 = Sketch_5.addProjection(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_1][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_7]"), False)
303 SketchLine_47 = SketchProjection_9.createdFeature()
304 SketchConstraintDistance_22 = Sketch_5.setDistance(SketchCircle_1.center(), SketchLine_47.result(), "d1*coeff")
305 SketchConstraintRadius_7 = Sketch_5.setRadius(SketchCircle_1.results()[1], "r_trou")
307 ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_5/Face-SketchCircle_1_2r")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modified_Face&Sketch_2/SketchLine_20"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
308 Sketch_6 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_10"))
309 SketchCircle_2 = Sketch_6.addCircle(70, -17.5, 5)
310 SketchLine_48 = Sketch_6.addLine(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_10][Extrusion_1_1/To_Face]"))
311 SketchProjection_10 = Sketch_6.addProjection(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_8][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_7]"), False)
312 SketchLine_49 = SketchProjection_10.createdFeature()
313 SketchConstraintDistance_23 = Sketch_6.setDistance(SketchCircle_2.center(), SketchLine_49.result(), "d1*coeff")
314 SketchConstraintDistance_23.setName("SketchConstraintDistance_24")
315 SketchConstraintRadius_8 = Sketch_6.setRadius(SketchCircle_2.results()[1], "r_trou2")
316 SketchLine_50 = Sketch_6.addLine(model.selection("EDGE", "Sketch_1/SketchLine_10"))
317 SketchConstraintDistance_24 = Sketch_6.setDistance(SketchCircle_2.center(), SketchLine_50.result(), "d_trou")
318 SketchConstraintDistance_24.setName("SketchConstraintDistance_25")
320 ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_6/Face-SketchCircle_2_2r")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_4"), 0, model.selection(), 0, [model.selection("SOLID", "Extrusion_1_1")])
321 Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_6"))
322 SketchLine_51 = Sketch_7.addLine(110, 21.46600893000899, 110, 7.22841614740048)
323 SketchLine_51.setAuxiliary(True)
324 SketchLine_52 = Sketch_7.addLine(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_6][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_13]"))
325 SketchConstraintCoincidence_65 = Sketch_7.setCoincident(SketchLine_51.startPoint(), SketchLine_52.result())
326 SketchConstraintCoincidence_66 = Sketch_7.setCoincident(SketchLine_51.endPoint(), SketchLine_52.result())
327 SketchLine_53 = Sketch_7.addLine(model.selection("EDGE", "[Extrusion_1_1/From_Face][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_6]"))
328 SketchArc_15 = Sketch_7.addArc(102.5, 7.22841614740048, 110, 7.22841614740048, 104.5, 0, True)
329 SketchConstraintCoincidence_67 = Sketch_7.setCoincident(SketchLine_51.endPoint(), SketchArc_15.startPoint())
330 SketchConstraintTangent_29 = Sketch_7.setTangent(SketchLine_51.result(), SketchArc_15.results()[1])
331 SketchConstraintCoincidence_68 = Sketch_7.setCoincident(SketchLine_53.result(), SketchArc_15.endPoint())
332 SketchConstraintRadius_9 = Sketch_7.setRadius(SketchArc_15.results()[1], "r1")
333 SketchLine_54 = Sketch_7.addLine(104.5, 0, 110, 0)
334 SketchConstraintCoincidence_69 = Sketch_7.setCoincident(SketchArc_15.endPoint(), SketchLine_54.startPoint())
335 SketchConstraintCoincidence_70 = Sketch_7.setCoincident(SketchLine_52.startPoint(), SketchLine_54.endPoint())
336 SketchPoint_3 = Sketch_7.addPoint(0, 0)
337 SketchLine_55 = Sketch_7.addLine(110, 7.22841614740048, 110, 0)
338 SketchConstraintCoincidence_71 = Sketch_7.setCoincident(SketchLine_51.endPoint(), SketchLine_55.startPoint())
339 SketchConstraintCoincidence_72 = Sketch_7.setCoincident(SketchLine_52.startPoint(), SketchLine_55.endPoint())
340 SketchConstraintLength_5 = Sketch_7.setLength(SketchLine_54.result(), "5.5*coeff")
341 SketchLine_56 = Sketch_7.addLine(110, 12.5, 0, 12.5)
342 SketchLine_56.setAuxiliary(True)
343 SketchConstraintCoincidence_73 = Sketch_7.setCoincident(SketchLine_56.startPoint(), SketchLine_52.result())
344 SketchLine_57 = Sketch_7.addLine(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_1][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_7]"))
345 SketchConstraintCoincidence_74 = Sketch_7.setCoincident(SketchLine_56.endPoint(), SketchLine_57.result())
346 SketchConstraintMiddle_1 = Sketch_7.setMiddlePoint(SketchLine_56.endPoint(), SketchLine_57.result())
347 SketchConstraintMiddle_2 = Sketch_7.setMiddlePoint(SketchLine_56.startPoint(), SketchLine_52.result())
348 SketchProjection_11 = Sketch_7.addProjection(model.selection("EDGE", "[Extrusion_1_1/To_Face][ExtrusionCut_4_1/Modified_Face&Sketch_1/SketchLine_4]"), False)
349 SketchLine_58 = SketchProjection_11.createdFeature()
350 SketchLine_59 = Sketch_7.addLine(55.00000000000002, 0, 55.00000000000002, 25)
351 SketchLine_59.setAuxiliary(True)
352 SketchLine_60 = Sketch_7.addLine(model.selection("EDGE", "PartSet/OX"))
353 SketchConstraintCoincidence_75 = Sketch_7.setCoincident(SketchLine_59.startPoint(), SketchLine_60.result())
354 SketchConstraintCoincidence_76 = Sketch_7.setCoincident(SketchLine_59.endPoint(), SketchLine_58.result())
355 SketchConstraintMiddle_3 = Sketch_7.setMiddlePoint(SketchLine_59.endPoint(), SketchLine_58.result())
356 SketchConstraintVertical_17 = Sketch_7.setVertical(SketchLine_59.result())
357 SketchConstraintMirror_1_objects = [SketchArc_15.results()[1], SketchLine_55.result(), SketchLine_54.result()]
358 SketchConstraintMirror_1 = Sketch_7.addMirror(SketchLine_56.result(), SketchConstraintMirror_1_objects)
359 [SketchArc_16, SketchLine_61, SketchLine_62] = SketchConstraintMirror_1.mirrored()
360 SketchConstraintMirror_2_objects = [SketchArc_15.results()[1], SketchLine_55.result(), SketchLine_54.result(), SketchArc_16.results()[1], SketchLine_62.result(), SketchLine_52.result()]
361 SketchConstraintMirror_2 = Sketch_7.addMirror(SketchLine_59.result(), SketchConstraintMirror_2_objects)
362 [SketchArc_17, SketchLine_63, SketchLine_64, SketchArc_18, SketchLine_65, SketchLine_66] = SketchConstraintMirror_2.mirrored()
364 ExtrusionCut_5 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_7/Face-SketchLine_61f-SketchLine_62r-SketchArc_16_2r_wire"), model.selection("FACE", "Sketch_7/Face-SketchLine_65f-SketchLine_66r-SketchArc_18_2r"), model.selection("FACE", "Sketch_7/Face-SketchLine_63f-SketchLine_64r-SketchArc_17_2r"), model.selection("WIRE", "Sketch_7/Face-SketchLine_54f-SketchLine_55r-SketchArc_15_2r_wire")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_12"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_4_1")])
365 Boolean_1 = model.addFuse(Part_1_doc, [model.selection("SOLID", "ExtrusionCut_5_1")], [model.selection("SOLID", "Extrusion_3_1"), model.selection("SOLID", "ExtrusionCut_3_1")])
368 from GeomAPI import GeomAPI_Shape
370 model.testNbResults(Part_1, 1)
371 model.testNbSubResults(Part_1, [0])
372 model.testNbSubShapes(Part_1, GeomAPI_Shape.SOLID, [1])
373 model.testNbSubShapes(Part_1, GeomAPI_Shape.FACE, [57])
374 model.testNbSubShapes(Part_1, GeomAPI_Shape.EDGE, [314])
375 model.testNbSubShapes(Part_1, GeomAPI_Shape.VERTEX, [628])
376 model.testResultsVolumes(Part_1, [13531.037990141923728515394])
379 assert(model.checkPythonDump())