1 ## Copyright (C) 2014-2017 CEA/DEN, EDF R&D
3 ## This library is free software; you can redistribute it and/or
4 ## modify it under the terms of the GNU Lesser General Public
5 ## License as published by the Free Software Foundation; either
6 ## version 2.1 of the License, or (at your option) any later version.
8 ## This library is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 ## Lesser General Public License for more details.
13 ## You should have received a copy of the GNU Lesser General Public
14 ## License along with this library; if not, write to the Free Software
15 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 ## See http:##www.salome-platform.org/ or
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 # -*- coding: utf-8 -*-
23 from SketchAPI import *
25 from salome.shaper import model
28 partSet = model.moduleDocument()
29 Part_1 = model.addPart(partSet)
30 Part_1_doc = Part_1.document()
31 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
32 SketchLine_1 = Sketch_1.addLine(1.31, 2.37, 1.31, 0)
33 SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_1.result())
34 SketchLine_2 = Sketch_1.addLine(1.29, 2.37, 1.29, 0)
35 SketchLine_3 = Sketch_1.addLine(1.29, 2.37, 1.31, 2.37)
36 SketchLine_3.setAuxiliary(True)
37 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchLine_3.startPoint())
38 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_3.endPoint())
39 SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_3.result())
40 SketchArc_1 = Sketch_1.addArc(2.429999974807509, 2.369762445228637, 1.32, 2.475237825900849, 2.499428733897898, 3.48259875277915, True)
41 SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_1.results()[1], 1.115)
42 SketchLine_4 = Sketch_1.addLine(1.31, 2.37, 1.32, 2.475237825900849)
43 SketchLine_4.setName("SketchLine_5")
44 SketchLine_4.result().setName("SketchLine_5")
45 SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_4.startPoint())
46 SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchArc_1.startPoint(), SketchLine_4.endPoint())
47 SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_2.result())
48 SketchPoint_1 = Sketch_1.addPoint(1.29, 0)
49 SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchLine_2.result())
50 SketchProjection_1 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OX"), False)
51 SketchLine_5 = SketchProjection_1.createdFeature()
52 SketchLine_5.setName("SketchLine_6")
53 SketchLine_5.result().setName("SketchLine_6")
54 SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchLine_5.result())
55 SketchProjection_2 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OZ"), False)
56 SketchLine_6 = SketchProjection_2.createdFeature()
57 SketchLine_6.setName("SketchLine_7")
58 SketchLine_6.result().setName("SketchLine_7")
59 SketchConstraintDistance_1 = Sketch_1.setDistance(SketchPoint_1.coordinates(), SketchLine_6.result(), 1.29, True)
60 SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_3.result(), 0.02)
61 SketchConstraintDistanceHorizontal_1 = Sketch_1.setHorizontalDistance(SketchLine_1.startPoint(), SketchLine_4.endPoint(), 0.01)
62 SketchConstraintTangent_1 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchLine_4.result())
63 SketchConstraintDistance_2 = Sketch_1.setDistance(SketchLine_1.startPoint(), SketchArc_1.center(), 1.12, True)
64 SketchLine_7 = Sketch_1.addLine(2.499428733897898, 3.48259875277915, 2.429999974807509, 2.369762445228637)
65 SketchLine_7.setName("SketchLine_8")
66 SketchLine_7.result().setName("SketchLine_8")
67 SketchLine_7.setAuxiliary(True)
68 SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_7.startPoint())
69 SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchArc_1.center(), SketchLine_7.endPoint())
70 SketchConstraintAngle_1 = Sketch_1.setAngle(SketchLine_7.result(), SketchLine_3.result(), 93.56999999998719)
71 SketchArc_2 = Sketch_1.addArc(2.349985665002739, 1.087256027998574, 2.499428733897898, 3.48259875277915, 3.77688682869805, 3.017010693505298, True)
72 SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchArc_2.startPoint())
73 SketchConstraintTangent_2 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchArc_2.results()[1])
74 SketchArc_3 = Sketch_1.addArc(1.546759218272587, 0.0009649642070809712, 3.77688682869805, 3.017010693505298, 4.166514953924199, 2.685528408329715, True)
75 SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchArc_2.endPoint(), SketchArc_3.startPoint())
76 SketchConstraintTangent_3 = Sketch_1.setTangent(SketchArc_2.results()[1], SketchArc_3.results()[1])
77 SketchConstraintRadius_2 = Sketch_1.setRadius(SketchArc_3.results()[1], 3.751)
78 SketchConstraintRadius_3 = Sketch_1.setRadius(SketchArc_2.results()[1], 2.4)
79 SketchLine_8 = Sketch_1.addLine(2.349985665002739, 1.087256027998574, 3.77688682869805, 3.017010693505298)
80 SketchLine_8.setName("SketchLine_9")
81 SketchLine_8.result().setName("SketchLine_9")
82 SketchLine_8.setAuxiliary(True)
83 SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchArc_2.endPoint(), SketchLine_8.endPoint())
84 SketchConstraintAngle_2 = Sketch_1.setAngle(SketchLine_8.result(), SketchLine_7.result(), 32.91000000001281)
85 SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchLine_8.startPoint(), SketchArc_2.center())
86 SketchLine_9 = Sketch_1.addLine(1.546759218272496, 0.000964964207000808, 4.166514953924199, 2.685528408329715)
87 SketchLine_9.setName("SketchLine_10")
88 SketchLine_9.result().setName("SketchLine_10")
89 SketchLine_9.setAuxiliary(True)
90 SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchArc_3.endPoint(), SketchLine_9.endPoint())
91 SketchConstraintAngle_3 = Sketch_1.setAngle(SketchLine_9.result(), SketchLine_8.result(), 7.820000000000003)
92 SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchLine_9.startPoint(), SketchArc_3.center())
93 SketchLine_10 = Sketch_1.addLine(4.166514953924199, 2.685528408329715, 4.411514953924289, 2.446442922550623)
94 SketchLine_10.setName("SketchLine_11")
95 SketchLine_10.result().setName("SketchLine_11")
96 SketchConstraintCoincidence_15 = Sketch_1.setCoincident(SketchArc_3.endPoint(), SketchLine_10.startPoint())
97 SketchArc_4 = Sketch_1.addArc(3.489606777155361, 1.501728514028915, 4.411514953924289, 2.446442922550623, 4.534275383417573, 2.308616054576027, True)
98 SketchConstraintCoincidence_16 = Sketch_1.setCoincident(SketchLine_10.endPoint(), SketchArc_4.startPoint())
99 SketchConstraintTangent_4 = Sketch_1.setTangent(SketchLine_10.result(), SketchArc_4.results()[1])
100 SketchConstraintDistanceHorizontal_2 = Sketch_1.setHorizontalDistance(SketchArc_3.endPoint(), SketchArc_4.startPoint(), 0.245)
101 SketchConstraintTangent_5 = Sketch_1.setTangent(SketchArc_3.results()[1], SketchLine_10.result())
102 SketchLine_11 = Sketch_1.addLine(3.489606777155361, 1.501728514028915, 4.411514953924289, 2.446442922550623)
103 SketchLine_11.setName("SketchLine_12")
104 SketchLine_11.result().setName("SketchLine_12")
105 SketchLine_11.setAuxiliary(True)
106 SketchConstraintCoincidence_17 = Sketch_1.setCoincident(SketchArc_4.center(), SketchLine_11.startPoint())
107 SketchConstraintCoincidence_18 = Sketch_1.setCoincident(SketchLine_10.endPoint(), SketchLine_11.endPoint())
108 SketchLine_12 = Sketch_1.addLine(3.489606777155361, 1.501728514028915, 4.534275383417573, 2.308616054576027)
109 SketchLine_12.setName("SketchLine_13")
110 SketchLine_12.result().setName("SketchLine_13")
111 SketchLine_12.setAuxiliary(True)
112 SketchConstraintCoincidence_19 = Sketch_1.setCoincident(SketchArc_4.center(), SketchLine_12.startPoint())
113 SketchConstraintCoincidence_20 = Sketch_1.setCoincident(SketchArc_4.endPoint(), SketchLine_12.endPoint())
114 SketchConstraintAngle_4 = Sketch_1.setAngleBackward(SketchLine_11.result(), SketchLine_12.result(), 8.018000000993595)
115 SketchConstraintRadius_4 = Sketch_1.setRadius(SketchArc_4.results()[1], 1.32)
116 SketchArc_5 = Sketch_1.addArc(1.545335047953034, 0, 4.534275383417573, 2.308616054576027, 3.791202568545627, -3.03637143583555, True)
117 SketchConstraintCoincidence_21 = Sketch_1.setCoincident(SketchArc_4.endPoint(), SketchArc_5.startPoint())
118 SketchConstraintTangent_6 = Sketch_1.setTangent(SketchArc_4.results()[1], SketchArc_5.results()[1])
119 SketchConstraintCoincidence_22 = Sketch_1.setCoincident(SketchArc_5.center(), SketchLine_5.result())
120 SketchConstraintDistance_3 = Sketch_1.setDistance(SketchPoint_1.coordinates(), SketchLine_3.result(), "4.74/2", True)
121 SketchConstraintCoincidence_23 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_5.result())
122 SketchConstraintCoincidence_24 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_5.result())
123 SketchArc_6 = Sketch_1.addArc(2.43, 2.369999999999995, 1.29, 2.37, 2.429999974807022, 3.510000000000007, True)
124 SketchArc_6.setName("SketchArc_11")
125 SketchArc_6.result().setName("SketchArc_11")
126 SketchArc_6.results()[1].setName("SketchArc_11_2")
127 SketchConstraintCoincidence_25 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchArc_6.startPoint())
128 SketchConstraintTangent_7 = Sketch_1.setTangent(SketchLine_2.result(), SketchArc_6.results()[1])
129 SketchArc_7 = Sketch_1.addArc(2.430000026076943, 1.189999999999999, 2.429999974807022, 3.510000000000007, 3.806722385037566, 3.05736058283826, True)
130 SketchArc_7.setName("SketchArc_12")
131 SketchArc_7.result().setName("SketchArc_12")
132 SketchArc_7.results()[1].setName("SketchArc_12_2")
133 SketchConstraintCoincidence_26 = Sketch_1.setCoincident(SketchArc_6.endPoint(), SketchArc_7.startPoint())
134 SketchConstraintTangent_8 = Sketch_1.setTangent(SketchArc_6.results()[1], SketchArc_7.results()[1])
135 SketchConstraintRadius_5 = Sketch_1.setRadius(SketchArc_6.results()[1], 1.14)
136 SketchLine_13 = Sketch_1.addLine(2.429999974807509, 2.369762445228637, 2.429999974807022, 3.510000000000007)
137 SketchLine_13.setName("SketchLine_17")
138 SketchLine_13.result().setName("SketchLine_17")
139 SketchLine_13.setAuxiliary(True)
140 SketchConstraintCoincidence_27 = Sketch_1.setCoincident(SketchArc_1.center(), SketchLine_13.startPoint())
141 SketchConstraintCoincidence_28 = Sketch_1.setCoincident(SketchArc_6.endPoint(), SketchLine_13.endPoint())
142 SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_13.result())
143 SketchConstraintRadius_6 = Sketch_1.setRadius(SketchArc_7.results()[1], 2.32)
144 SketchConstraintCoincidence_29 = Sketch_1.setCoincident(SketchArc_7.endPoint(), SketchLine_8.result())
145 SketchArc_8 = Sketch_1.addArc(1.552665663222913, 0, 3.806722385037566, 3.05736058283826, 5.35111606287941, 0, True)
146 SketchArc_8.setName("SketchArc_13")
147 SketchArc_8.result().setName("SketchArc_13")
148 SketchArc_8.results()[1].setName("SketchArc_13_2")
149 SketchConstraintMirror_1_objects = [SketchLine_2.result(), SketchLine_1.result(), SketchLine_4.result(), SketchArc_6.results()[1], SketchArc_7.results()[1], SketchArc_8.results()[1], SketchLine_13.result(), SketchLine_8.result()]
150 SketchConstraintMirror_1 = Sketch_1.addMirror(SketchLine_5.result(), SketchConstraintMirror_1_objects)
151 [SketchLine_14, SketchLine_15, SketchLine_16, SketchArc_9, SketchArc_10, SketchArc_11, SketchLine_17, SketchLine_18] = SketchConstraintMirror_1.mirrored()
152 SketchLine_18.setName("SketchLine_19")
153 SketchLine_18.result().setName("SketchLine_19")
154 SketchLine_17.setName("SketchLine_18")
155 SketchLine_17.result().setName("SketchLine_18")
156 SketchArc_11.setName("SketchArc_14")
157 SketchArc_11.result().setName("SketchArc_14")
158 SketchArc_11.results()[1].setName("SketchArc_14_2")
159 SketchArc_10.setName("SketchArc_10")
160 SketchArc_10.result().setName("SketchArc_10")
161 SketchArc_10.results()[1].setName("SketchArc_10_2")
162 SketchArc_9.setName("SketchArc_9")
163 SketchArc_9.result().setName("SketchArc_9")
164 SketchArc_9.results()[1].setName("SketchArc_9_2")
165 SketchLine_16.setName("SketchLine_16")
166 SketchLine_16.result().setName("SketchLine_16")
167 SketchLine_15.setName("SketchLine_15")
168 SketchLine_15.result().setName("SketchLine_15")
169 SketchLine_14.setName("SketchLine_14")
170 SketchLine_14.result().setName("SketchLine_14")
171 SketchConstraintCoincidence_30 = Sketch_1.setCoincident(SketchArc_7.endPoint(), SketchArc_8.startPoint())
172 SketchConstraintTangent_9 = Sketch_1.setTangent(SketchArc_7.results()[1], SketchArc_8.results()[1])
173 SketchConstraintCoincidence_31 = Sketch_1.setCoincident(SketchLine_5.result(), SketchArc_8.endPoint())
174 SketchConstraintCoincidence_32 = Sketch_1.setCoincident(SketchArc_8.center(), SketchLine_5.result())
175 SketchArc_12 = Sketch_1.addArc(2.429999974807509, -2.369762445228637, 1.32, -2.475237825900849, 2.429999974807509, -3.484762445228914, False)
176 SketchArc_12.setName("SketchArc_15")
177 SketchArc_12.result().setName("SketchArc_15")
178 SketchArc_12.results()[1].setName("SketchArc_15_2")
179 SketchConstraintCoincidence_33 = Sketch_1.setCoincident(SketchAPI_Line(SketchLine_17).startPoint(), SketchArc_12.center())
180 SketchConstraintCoincidence_34 = Sketch_1.setCoincident(SketchAPI_Line(SketchLine_16).endPoint(), SketchArc_12.startPoint())
181 SketchConstraintCoincidence_35 = Sketch_1.setCoincident(SketchLine_17.result(), SketchArc_12.endPoint())
182 SketchConstraintCoincidence_36 = Sketch_1.setCoincident(SketchArc_5.endPoint(), SketchLine_18.result())
183 SketchArc_13 = Sketch_1.addArc(2.430961195591607, -1.197350205596287, 3.791202568545627, -3.03637143583555, 2.429999974807033, -3.484762445228914, True)
184 SketchArc_13.setName("SketchArc_16")
185 SketchArc_13.result().setName("SketchArc_16")
186 SketchArc_13.results()[1].setName("SketchArc_16_2")
187 SketchConstraintCoincidence_37 = Sketch_1.setCoincident(SketchArc_5.endPoint(), SketchArc_13.startPoint())
188 SketchConstraintTangent_10 = Sketch_1.setTangent(SketchArc_5.results()[1], SketchArc_13.results()[1])
189 SketchConstraintCoincidence_38 = Sketch_1.setCoincident(SketchArc_13.endPoint(), SketchArc_12.endPoint())
190 SketchLine_19 = Sketch_1.addLine(1.125, 0, 1.125, 2.370000000000003)
191 SketchLine_19.setName("SketchLine_20")
192 SketchLine_19.result().setName("SketchLine_20")
193 SketchConstraintCoincidence_39 = Sketch_1.setCoincident(SketchLine_19.startPoint(), SketchLine_5.result())
194 SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_19.result())
195 SketchConstraintCoincidence_40 = Sketch_1.setCoincident(SketchLine_19.endPoint(), SketchLine_3.result())
196 SketchConstraintDistance_4 = Sketch_1.setDistance(SketchLine_19.endPoint(), SketchLine_2.result(), 0.165, True)
197 SketchArc_14 = Sketch_1.addArc(2.43, 2.369999999999994, 1.125, 2.370000000000003, 2.429999974807022, 3.674999999999994, True)
198 SketchArc_14.setName("SketchArc_17")
199 SketchArc_14.result().setName("SketchArc_17")
200 SketchArc_14.results()[1].setName("SketchArc_17_2")
201 SketchConstraintCoincidence_41 = Sketch_1.setCoincident(SketchLine_19.endPoint(), SketchArc_14.startPoint())
202 SketchArc_15 = Sketch_1.addArc(2.43000002278185, 1.189896770657599, 2.429999974807022, 3.674999999999994, 3.904833906055851, 3.190047534283911, True)
203 SketchArc_15.setName("SketchArc_18")
204 SketchArc_15.result().setName("SketchArc_18")
205 SketchArc_15.results()[1].setName("SketchArc_18_2")
206 SketchConstraintCoincidence_42 = Sketch_1.setCoincident(SketchArc_14.endPoint(), SketchArc_15.startPoint())
207 SketchConstraintTangent_11 = Sketch_1.setTangent(SketchArc_14.results()[1], SketchArc_15.results()[1])
208 SketchArc_16 = Sketch_1.addArc(1.552616124088898, 0, 3.904833906055851, 3.190047534283911, 5.51611606287941, 0, True)
209 SketchArc_16.setName("SketchArc_19")
210 SketchArc_16.result().setName("SketchArc_19")
211 SketchArc_16.results()[1].setName("SketchArc_19_2")
212 SketchConstraintCoincidence_43 = Sketch_1.setCoincident(SketchArc_15.endPoint(), SketchArc_16.startPoint())
213 SketchConstraintTangent_12 = Sketch_1.setTangent(SketchArc_15.results()[1], SketchArc_16.results()[1])
214 SketchConstraintCoincidence_44 = Sketch_1.setCoincident(SketchLine_5.result(), SketchArc_16.endPoint())
215 SketchConstraintCoincidence_45 = Sketch_1.setCoincident(SketchArc_14.endPoint(), SketchLine_13.result())
216 SketchConstraintCoincidence_46 = Sketch_1.setCoincident(SketchArc_14.center(), SketchArc_6.center())
217 SketchConstraintCoincidence_47 = Sketch_1.setCoincident(SketchArc_16.center(), SketchLine_5.result())
218 SketchConstraintCoincidence_48 = Sketch_1.setCoincident(SketchArc_16.startPoint(), SketchLine_8.result())
219 SketchConstraintDistance_5 = Sketch_1.setDistance(SketchAPI_Arc(SketchArc_11).endPoint(), SketchArc_16.endPoint(), 0.165, True)
220 SketchLine_20 = Sketch_1.addLine(1.05, 0, 1.05, 2.199861545438666)
221 SketchLine_20.setName("SketchLine_22")
222 SketchLine_20.result().setName("SketchLine_22")
223 SketchConstraintCoincidence_49 = Sketch_1.setCoincident(SketchLine_20.startPoint(), SketchLine_5.result())
224 SketchLine_21 = Sketch_1.addLine(1.05, 2.199861545438666, 1.08, 2.370000000000011)
225 SketchLine_21.setName("SketchLine_23")
226 SketchLine_21.result().setName("SketchLine_23")
227 SketchConstraintCoincidence_50 = Sketch_1.setCoincident(SketchLine_20.endPoint(), SketchLine_21.startPoint())
228 SketchConstraintCoincidence_51 = Sketch_1.setCoincident(SketchLine_21.endPoint(), SketchLine_3.result())
229 SketchConstraintVertical_5 = Sketch_1.setVertical(SketchLine_20.result())
230 SketchConstraintDistance_6 = Sketch_1.setDistance(SketchLine_21.endPoint(), SketchLine_20.result(), 0.03, True)
231 SketchConstraintAngle_5 = Sketch_1.setAngle(SketchLine_20.result(), SketchLine_21.result(), 169.9999999984344)
232 SketchConstraintDistance_7 = Sketch_1.setDistance(SketchLine_21.endPoint(), SketchLine_19.result(), 0.045, True)
233 SketchArc_17 = Sketch_1.addArc(2.429999974807022, 2.369762445224826, 1.08, 2.370000000000011, 2.429999974807022, 3.719762440932702, True)
234 SketchArc_17.setName("SketchArc_23")
235 SketchArc_17.result().setName("SketchArc_23")
236 SketchArc_17.results()[1].setName("SketchArc_23_2")
237 SketchConstraintCoincidence_52 = Sketch_1.setCoincident(SketchLine_21.endPoint(), SketchArc_17.startPoint())
238 SketchConstraintCoincidence_53 = Sketch_1.setCoincident(SketchArc_17.center(), SketchLine_13.startPoint())
239 SketchConstraintCoincidence_54 = Sketch_1.setCoincident(SketchArc_17.endPoint(), SketchLine_13.result())
240 SketchArc_18 = Sketch_1.addArc(2.43000002278185, 1.189896770657599, 2.429999974807022, 3.719762440932702, 3.93144708721947, 3.226039452870244, True)
241 SketchArc_18.setName("SketchArc_24")
242 SketchArc_18.result().setName("SketchArc_24")
243 SketchArc_18.results()[1].setName("SketchArc_24_2")
244 SketchConstraintCoincidence_55 = Sketch_1.setCoincident(SketchArc_15.center(), SketchArc_18.center())
245 SketchConstraintCoincidence_56 = Sketch_1.setCoincident(SketchArc_17.endPoint(), SketchArc_18.startPoint())
246 SketchConstraintCoincidence_57 = Sketch_1.setCoincident(SketchArc_18.endPoint(), SketchLine_8.result())
247 SketchArc_19 = Sketch_1.addArc(1.552616124088887, 0, 3.93144708721947, 3.226039452870244, 5.560878503552593, 0, True)
248 SketchArc_19.setName("SketchArc_25")
249 SketchArc_19.result().setName("SketchArc_25")
250 SketchArc_19.results()[1].setName("SketchArc_25_2")
251 SketchConstraintMirror_2_objects = [SketchLine_19.result(), SketchArc_14.results()[1], SketchArc_15.results()[1], SketchArc_16.results()[1], SketchLine_20.result(), SketchArc_19.results()[1], SketchArc_17.results()[1], SketchLine_21.result(), SketchArc_18.results()[1]]
252 SketchConstraintMirror_2 = Sketch_1.addMirror(SketchLine_5.result(), SketchConstraintMirror_2_objects)
253 [SketchLine_22, SketchArc_20, SketchArc_21, SketchArc_22, SketchLine_23, SketchArc_23, SketchArc_24, SketchLine_24, SketchArc_25] = SketchConstraintMirror_2.mirrored()
254 SketchArc_25.setName("SketchArc_28")
255 SketchArc_25.result().setName("SketchArc_28")
256 SketchArc_25.results()[1].setName("SketchArc_28_2")
257 SketchLine_24.setName("SketchLine_25")
258 SketchLine_24.result().setName("SketchLine_25")
259 SketchArc_24.setName("SketchArc_27")
260 SketchArc_24.result().setName("SketchArc_27")
261 SketchArc_24.results()[1].setName("SketchArc_27_2")
262 SketchArc_23.setName("SketchArc_26")
263 SketchArc_23.result().setName("SketchArc_26")
264 SketchArc_23.results()[1].setName("SketchArc_26_2")
265 SketchLine_23.setName("SketchLine_24")
266 SketchLine_23.result().setName("SketchLine_24")
267 SketchArc_22.setName("SketchArc_22")
268 SketchArc_22.result().setName("SketchArc_22")
269 SketchArc_22.results()[1].setName("SketchArc_22_2")
270 SketchArc_21.setName("SketchArc_21")
271 SketchArc_21.result().setName("SketchArc_21")
272 SketchArc_21.results()[1].setName("SketchArc_21_2")
273 SketchArc_20.setName("SketchArc_20")
274 SketchArc_20.result().setName("SketchArc_20")
275 SketchArc_20.results()[1].setName("SketchArc_20_2")
276 SketchLine_22.setName("SketchLine_21")
277 SketchLine_22.result().setName("SketchLine_21")
278 SketchConstraintCoincidence_58 = Sketch_1.setCoincident(SketchArc_18.endPoint(), SketchArc_19.startPoint())
279 SketchConstraintCoincidence_59 = Sketch_1.setCoincident(SketchArc_19.endPoint(), SketchLine_5.result())
280 SketchConstraintCoincidence_60 = Sketch_1.setCoincident(SketchArc_19.center(), SketchLine_5.result())
281 SketchConstraintCoincidence_61 = Sketch_1.setCoincident(SketchArc_19.center(), SketchArc_16.center())
282 SketchLine_25 = Sketch_1.addLine(2.429999974807022, -3.509999999999994, 2.429999974807022, -3.674999999999994)
283 SketchLine_25.setName("SketchLine_26")
284 SketchLine_25.result().setName("SketchLine_26")
285 SketchConstraintCoincidence_62 = Sketch_1.setCoincident(SketchAPI_Arc(SketchArc_9).endPoint(), SketchLine_25.startPoint())
286 SketchConstraintCoincidence_63 = Sketch_1.setCoincident(SketchAPI_Arc(SketchArc_20).endPoint(), SketchLine_25.endPoint())
287 SketchLine_26 = Sketch_1.addLine(2.429999974807022, 3.510000000000007, 2.429999974807022, 3.674999999999994)
288 SketchLine_26.setName("SketchLine_27")
289 SketchLine_26.result().setName("SketchLine_27")
290 SketchConstraintCoincidence_64 = Sketch_1.setCoincident(SketchArc_6.endPoint(), SketchLine_26.startPoint())
291 SketchConstraintCoincidence_65 = Sketch_1.setCoincident(SketchArc_14.endPoint(), SketchLine_26.endPoint())
292 SketchLine_27 = Sketch_1.addLine(2.429999974807022, 3.719762440932702, 2.429999974807022, 3.674999999999994)
293 SketchLine_27.setName("SketchLine_28")
294 SketchLine_27.result().setName("SketchLine_28")
295 SketchConstraintCoincidence_66 = Sketch_1.setCoincident(SketchArc_17.endPoint(), SketchLine_27.startPoint())
296 SketchConstraintCoincidence_67 = Sketch_1.setCoincident(SketchArc_14.endPoint(), SketchLine_27.endPoint())
297 SketchLine_28 = Sketch_1.addLine(2.429999974807022, 3.510000000000032, 2.429999974807022, 3.484762445224835)
298 SketchLine_28.setName("SketchLine_29")
299 SketchLine_28.result().setName("SketchLine_29")
300 SketchConstraintCoincidence_68 = Sketch_1.setCoincident(SketchArc_6.endPoint(), SketchLine_28.startPoint())
301 SketchConstraintCoincidence_69 = Sketch_1.setCoincident(SketchLine_28.endPoint(), SketchArc_1.results()[1])
302 SketchConstraintCoincidence_70 = Sketch_1.setCoincident(SketchLine_28.endPoint(), SketchLine_13.result())
303 SketchLine_29 = Sketch_1.addLine(2.429999974807022, -3.509999999999994, 2.429999974807033, -3.484762445228914)
304 SketchLine_29.setName("SketchLine_30")
305 SketchLine_29.result().setName("SketchLine_30")
306 SketchConstraintCoincidence_71 = Sketch_1.setCoincident(SketchAPI_Arc(SketchArc_9).endPoint(), SketchLine_29.startPoint())
307 SketchConstraintCoincidence_72 = Sketch_1.setCoincident(SketchArc_12.endPoint(), SketchLine_29.endPoint())
308 SketchLine_30 = Sketch_1.addLine(2.429999974807022, -3.674999999999994, 2.429999974807022, -3.71976244093269)
309 SketchLine_30.setName("SketchLine_31")
310 SketchLine_30.result().setName("SketchLine_31")
311 SketchConstraintCoincidence_73 = Sketch_1.setCoincident(SketchAPI_Arc(SketchArc_20).endPoint(), SketchLine_30.startPoint())
312 SketchConstraintCoincidence_74 = Sketch_1.setCoincident(SketchAPI_Arc(SketchArc_24).endPoint(), SketchLine_30.endPoint())
313 SketchLine_31 = Sketch_1.addLine(2.429999974807509, 2.369762445228637, 1.871489087529827, 3.334796428456965)
314 SketchLine_31.setName("SketchLine_32")
315 SketchLine_31.result().setName("SketchLine_32")
316 SketchLine_31.setAuxiliary(True)
317 SketchConstraintCoincidence_75 = Sketch_1.setCoincident(SketchArc_1.center(), SketchLine_31.startPoint())
318 SketchConstraintCoincidence_76 = Sketch_1.setCoincident(SketchLine_31.endPoint(), SketchArc_1.results()[1])
319 SketchConstraintAngle_6 = Sketch_1.setAngle(SketchLine_31.result(), SketchLine_3.result(), 59.93999999988066)
320 SketchLine_32 = Sketch_1.addLine(1.871489087529827, 3.334796428456965, 1.871489087529827, 3.598813126524882)
321 SketchLine_32.setName("SketchLine_33")
322 SketchLine_32.result().setName("SketchLine_33")
323 SketchConstraintCoincidence_77 = Sketch_1.setCoincident(SketchLine_31.endPoint(), SketchLine_32.startPoint())
324 SketchConstraintCoincidence_78 = Sketch_1.setCoincident(SketchLine_32.endPoint(), SketchArc_17.results()[1])
325 SketchConstraintVertical_6 = Sketch_1.setVertical(SketchLine_32.result())
326 SketchLine_33 = Sketch_1.addLine(1.871489087529829, -3.334796428460793, 1.871489087529829, -3.598813126524861)
327 SketchLine_33.setName("SketchLine_34")
328 SketchLine_33.result().setName("SketchLine_34")
329 SketchConstraintCoincidence_79 = Sketch_1.setCoincident(SketchLine_33.startPoint(), SketchArc_12.results()[1])
330 SketchConstraintCoincidence_80 = Sketch_1.setCoincident(SketchLine_33.endPoint(), SketchArc_24.results()[1])
331 SketchConstraintCoincidence_81 = Sketch_1.setCoincident(SketchLine_33.startPoint(), SketchLine_32.result())
332 SketchConstraintVertical_7 = Sketch_1.setVertical(SketchLine_33.result())
334 Extrusion_1_objects = [model.selection("WIRE", "Sketch_1/Face-SketchLine_5f-SketchArc_1_2r-SketchLine_33f-SketchArc_11_2f-SketchLine_2f-SketchLine_14r-SketchArc_9_2f-SketchLine_34r-SketchArc_15_2r-SketchLine_16r-SketchLine_15f-SketchLine_1r_wire"), model.selection("WIRE", "Sketch_1/Face-SketchArc_2_2r-SketchArc_3_2r-SketchLine_11f-SketchArc_4_2r-SketchArc_5_2r-SketchArc_16_2r-SketchLine_30r-SketchArc_10_2f-SketchArc_14_2f-SketchArc_13_2f-SketchArc_12_2f-SketchLine_29f-SketchArc_1_2r_wire"), model.selection("WIRE", "Sketch_1/Face-SketchLine_20f-SketchArc_17_2r-SketchLine_33f-SketchArc_23_2f-SketchLine_23r-SketchLine_22r-SketchLine_24f-SketchLine_25f-SketchArc_27_2f-SketchLine_34r-SketchArc_20_2r-SketchLine_21r_wire"), model.selection("WIRE", "Sketch_1/Face-SketchArc_19_2r-SketchArc_22_2r-SketchArc_21_2r-SketchLine_31f-SketchArc_28_2f-SketchArc_26_2f-SketchArc_25_2f-SketchArc_24_2f-SketchLine_28f-SketchArc_18_2r_wire"), model.selection("WIRE", "Sketch_1/Face-SketchLine_28r-SketchArc_23_2f-SketchLine_33r-SketchArc_17_2r_wire"), model.selection("WIRE", "Sketch_1/Face-SketchLine_29r-SketchArc_11_2f-SketchLine_33r-SketchArc_1_2r_wire"), model.selection("FACE", "Sketch_1/Face-SketchArc_9_2f-SketchLine_30f-SketchArc_15_2r-SketchLine_34f"), model.selection("WIRE", "Sketch_1/Face-SketchLine_34f-SketchArc_27_2f-SketchLine_31r-SketchArc_20_2r_wire")]
335 Extrusion_1 = model.addExtrusion(Part_1_doc, Extrusion_1_objects, model.selection(), 0.1785, 0.1785)
336 Extrusion_2_objects = [model.selection("WIRE", "Sketch_1/Face-SketchArc_13_2r-SketchArc_14_2r-SketchArc_10_2r-SketchLine_26f-SketchArc_21_2f-SketchArc_22_2f-SketchArc_19_2f-SketchArc_18_2f-SketchLine_27r-SketchArc_12_2r_wire"), model.selection("WIRE", "Sketch_1/Face-SketchArc_2_2r-SketchArc_3_2r-SketchLine_11f-SketchArc_4_2r-SketchArc_5_2r-SketchArc_16_2r-SketchLine_30r-SketchArc_10_2f-SketchArc_14_2f-SketchArc_13_2f-SketchArc_12_2f-SketchLine_29f-SketchArc_1_2r_wire"), model.selection("FACE", "Sketch_1/Face-SketchArc_19_2r-SketchArc_22_2r-SketchArc_21_2r-SketchLine_31f-SketchArc_28_2f-SketchArc_26_2f-SketchArc_25_2f-SketchArc_24_2f-SketchLine_28f-SketchArc_18_2r")]
337 Extrusion_2 = model.addExtrusion(Part_1_doc, Extrusion_2_objects, model.selection(), model.selection("FACE", "Extrusion_1_2_2/From_Face"), -0.05, model.selection("FACE", "Extrusion_1_2_2/From_Face"), 0)
338 Extrusion_3_objects = [model.selection("FACE", "Sketch_1/Face-SketchArc_13_2r-SketchArc_14_2r-SketchArc_10_2r-SketchLine_26f-SketchArc_21_2f-SketchArc_22_2f-SketchArc_19_2f-SketchArc_18_2f-SketchLine_27r-SketchArc_12_2r"), model.selection("FACE", "Sketch_1/Face-SketchArc_19_2r-SketchArc_22_2r-SketchArc_21_2r-SketchLine_31f-SketchArc_28_2f-SketchArc_26_2f-SketchArc_25_2f-SketchArc_24_2f-SketchLine_28f-SketchArc_18_2r"), model.selection("WIRE", "Sketch_1/Face-SketchArc_2_2r-SketchArc_3_2r-SketchLine_11f-SketchArc_4_2r-SketchArc_5_2r-SketchArc_16_2r-SketchLine_30r-SketchArc_10_2f-SketchArc_14_2f-SketchArc_13_2f-SketchArc_12_2f-SketchLine_29f-SketchArc_1_2r_wire")]
339 Extrusion_3 = model.addExtrusion(Part_1_doc, Extrusion_3_objects, model.selection(), model.selection("FACE", "Extrusion_1_1_1/To_Face"), 0.05, model.selection("FACE", "Extrusion_1_2_1/To_Face"), 0)
340 Extrusion_4_objects = [model.selection("FACE", "Sketch_1/Face-SketchLine_28r-SketchArc_23_2f-SketchLine_33r-SketchArc_17_2r"), model.selection("WIRE", "Sketch_1/Face-SketchLine_29r-SketchArc_11_2f-SketchLine_33r-SketchArc_1_2r_wire"), model.selection("WIRE", "Sketch_1/Face-SketchLine_27f-SketchArc_17_2f-SketchLine_33r-SketchArc_11_2r_wire"), model.selection("FACE", "Sketch_1/Face-SketchLine_34f-SketchArc_27_2f-SketchLine_31r-SketchArc_20_2r"), model.selection("FACE", "Sketch_1/Face-SketchLine_34f-SketchArc_20_2f-SketchLine_26r-SketchArc_9_2r"), model.selection("WIRE", "Sketch_1/Face-SketchArc_9_2f-SketchLine_30f-SketchArc_15_2r-SketchLine_34f_wire")]
341 Extrusion_4 = model.addExtrusion(Part_1_doc, Extrusion_4_objects, model.selection(), model.selection("FACE", "Extrusion_1_1_2/To_Face"), 0.15, model.selection("FACE", "Extrusion_1_1_2/To_Face"), 0)
342 Extrusion_4.setName("Extrusion_6")
343 Extrusion_4.result().setName("Extrusion_6_1")
344 Extrusion_4.result().subResult(0).setName("Extrusion_6_1_1")
345 Extrusion_4.result().subResult(1).setName("Extrusion_6_1_2")
346 Extrusion_4.result().subResult(2).setName("Extrusion_6_1_3")
347 Extrusion_4.results()[1].setName("Extrusion_6_2")
348 Extrusion_4.results()[1].subResult(0).setName("Extrusion_6_2_1")
349 Extrusion_4.results()[1].subResult(1).setName("Extrusion_6_2_2")
350 Extrusion_4.results()[1].subResult(2).setName("Extrusion_6_2_3")
351 Axis_4 = model.addAxis(Part_1_doc, model.selection("VERTEX", "[Extrusion_3_1_3/To_Face][Extrusion_3_1_3/Generated_Face&Sketch_1/SketchLine_28][Extrusion_3_1_3/Generated_Face&Sketch_1/SketchArc_24_2]"), model.selection("VERTEX", "[Extrusion_6_1_1/To_Face][Extrusion_6_1_1/Generated_Face&Sketch_1/SketchArc_23_2][Extrusion_6_1_1/Generated_Face&Sketch_1/SketchLine_33]"))
352 Plane_4 = model.addPlane(Part_1_doc, model.selection("EDGE", "Axis_1"), model.selection("VERTEX", "[Extrusion_6_1_3/Generated_Face&Sketch_1/SketchArc_1_2][Extrusion_6_1_3/To_Face][Extrusion_6_1_3/Generated_Face&Sketch_1/SketchLine_33]"), False)
353 Partition_1_objects = [model.selection("COMPSOLID", "Extrusion_6_1"), model.selection("FACE", "Plane_1"), model.selection("COMPSOLID", "Extrusion_6_2")]
354 Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects)
357 # check names of partition results
358 assert(Partition_1.name() + "_1" == Partition_1.result().name())
359 assert(Partition_1.name() + "_2" == Partition_1.results()[1].name())
363 assert(model.checkPythonDump())