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