Salome HOME
Merge remote-tracking branch 'origin/cbr/export_to_geom_via_xao'
[modules/shaper.git] / test.models / CSWA.py
1 ## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
2 ##
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.
7 ##
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.
12 ##
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
16 ##
17 ## See http:##www.salome-platform.org/ or
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 ##
20
21 from SketchAPI import *
22
23 from salome.shaper import model
24
25 model.begin()
26 partSet = model.moduleDocument()
27 Part_1 = model.addPart(partSet)
28 Part_1_doc = Part_1.document()
29 Parameter_A = model.addParameter(Part_1_doc, "a", "63")
30 model.addParameter(Part_1_doc, "b", "50")
31 model.addParameter(Part_1_doc, "c", "100")
32 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
33 SketchLine_1 = Sketch_1.addLine(-45, 0, 0, 0)
34 SketchLine_2 = Sketch_1.addLine(0, 0, 23.33965093306752, 8.494938217797719)
35 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
36 SketchLine_3 = Sketch_1.addLine(33.83092017818969, 6.16907982180411, 40, 0)
37 SketchLine_4 = Sketch_1.addLine(40, 0, 55, 0)
38 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
39 SketchConstraintCoincidence_2.setName("SketchConstraintCoincidence_3")
40 SketchLine_5 = Sketch_1.addLine(55, 0, 55, 48)
41 SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint())
42 SketchConstraintCoincidence_3.setName("SketchConstraintCoincidence_4")
43 SketchLine_6 = Sketch_1.addLine(55, 48, 15, 48)
44 SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
45 SketchConstraintCoincidence_4.setName("SketchConstraintCoincidence_5")
46 SketchLine_7 = Sketch_1.addLine(15, 48, 15, 63)
47 SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint())
48 SketchConstraintCoincidence_5.setName("SketchConstraintCoincidence_6")
49 SketchLine_8 = Sketch_1.addLine(15, 63, -15, 63)
50 SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint())
51 SketchConstraintCoincidence_6.setName("SketchConstraintCoincidence_7")
52 SketchLine_9 = Sketch_1.addLine(-15, 63, -15, 35.00000000000001)
53 SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_9.startPoint())
54 SketchConstraintCoincidence_7.setName("SketchConstraintCoincidence_8")
55 SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result())
56 SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_6.result())
57 SketchConstraintHorizontal_3 = Sketch_1.setHorizontal(SketchLine_8.result())
58 SketchConstraintCollinear_1 = Sketch_1.setCollinear(SketchLine_1.result(), SketchLine_4.result())
59 SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_5.result())
60 SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_9.result())
61 SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_7.result())
62 SketchConstraintDistance_1 = Sketch_1.setDistance(SketchLine_3.endPoint(), SketchLine_4.endPoint(), 15)
63 SketchConstraintDistance_2 = Sketch_1.setDistance(SketchLine_3.endPoint(), SketchLine_1.endPoint(), 40)
64 SketchConstraintDistance_3 = Sketch_1.setDistance(SketchLine_1.startPoint(), SketchLine_4.endPoint(), "c")
65 SketchConstraintDistance_4 = Sketch_1.setDistance(SketchLine_8.startPoint(), SketchLine_6.result(), 15)
66 SketchConstraintDistance_5 = Sketch_1.setDistance(SketchLine_8.startPoint(), SketchLine_5.result(), 40)
67 SketchLine_10 = Sketch_1.addLine(-45, 4.999999999999999, -45, 0)
68 SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_10.endPoint())
69 SketchConstraintCoincidence_8.setName("SketchConstraintCoincidence_9")
70 SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_10.result())
71 SketchConstraintDistance_6 = Sketch_1.setDistance(SketchLine_9.startPoint(), SketchLine_1.result(), "a")
72 SketchArc_1 = Sketch_1.addArc(-45, 35, -45, 4.999999999999999, -15, 35.00000000000001, False)
73 SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchArc_1.center(), SketchLine_10.result())
74 SketchConstraintCoincidence_9.setName("SketchConstraintCoincidence_10")
75 SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchArc_1.startPoint(), SketchLine_10.startPoint())
76 SketchConstraintCoincidence_10.setName("SketchConstraintCoincidence_11")
77 SketchConstraintAngle_1 = Sketch_1.setAngle(SketchLine_3.result(), SketchLine_1.result(), 45)
78 SketchConstraintAngle_2 = Sketch_1.setAngleBackward(SketchLine_2.result(), SketchLine_4.result(), 20)
79 SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_9.endPoint())
80 SketchConstraintCoincidence_11.setName("SketchConstraintCoincidence_12")
81 SketchConstraintTangent_1 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchLine_9.result())
82 SketchConstraintDistance_7 = Sketch_1.setDistance(SketchArc_1.center(), SketchLine_1.result(), 35)
83 SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_1.results()[1], 30)
84 SketchArc_2 = Sketch_1.addArc(26.75985236632421, -0.9019879900613652, 33.83092017818969, 6.16907982180411, 23.33965093306752, 8.494938217797719, False)
85 SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchArc_2.startPoint(), SketchLine_3.startPoint())
86 SketchConstraintCoincidence_12.setName("SketchConstraintCoincidence_13")
87 SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchArc_2.endPoint(), SketchLine_2.endPoint())
88 SketchConstraintCoincidence_13.setName("SketchConstraintCoincidence_14")
89 SketchConstraintTangent_2 = Sketch_1.setTangent(SketchArc_2.results()[1], SketchLine_2.result())
90 SketchConstraintTangent_3 = Sketch_1.setTangent(SketchArc_2.results()[1], SketchLine_3.result())
91 SketchConstraintRadius_2 = Sketch_1.setRadius(SketchArc_2.results()[1], 10)
92 SketchPoint_1 = Sketch_1.addPoint(model.selection("VERTEX", "PartSet/Origin"))
93 SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchPoint_1.coordinates())
94 SketchConstraintCoincidence_14.setName("SketchConstraintCoincidence_15")
95 model.do()
96 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_8f-SketchLine_9f-SketchLine_10f-SketchArc_1_2r-SketchArc_2_2r")], model.selection(), "b/2", "b/2")
97 Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/To_Face_1"))
98 SketchPoint_2 = Sketch_2.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_1"))
99 SketchCircle_1 = Sketch_2.addCircle(-15, 35.00000000000001, 25)
100 SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchPoint_2.result(), SketchCircle_1.center())
101 SketchConstraintCoincidence_15.setName("SketchConstraintCoincidence_16")
102 SketchConstraintRadius_3 = Sketch_2.setRadius(SketchCircle_1.results()[1], "50/2")
103 model.do()
104 ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_2/Wire-SketchCircle_1_2f")], model.selection(), 0, 13, [model.selection("SOLID", "Extrusion_1_1")])
105 ExtrusionCut_1.result().setName("ExtrusionCut_1_1")
106 Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_4"))
107 SketchPoint_3 = Sketch_3.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_2&ExtrusionCut_1_1/Modfied_3&ExtrusionCut_1_1/Modfied_4"))
108 SketchLine_11 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_3&ExtrusionCut_1_1/Modfied_4"))
109 SketchArc_3 = Sketch_3.addArc(-15, 35.00000000000001, -15, 46.0103340429751, -17.02045759563166, 24.17663606626138, True)
110 SketchConstraintCoincidence_16 = Sketch_3.setCoincident(SketchPoint_3.result(), SketchArc_3.center())
111 SketchConstraintCoincidence_16.setName("SketchConstraintCoincidence_17")
112 SketchConstraintCoincidence_17 = Sketch_3.setCoincident(SketchLine_11.result(), SketchArc_3.startPoint())
113 SketchConstraintCoincidence_17.setName("SketchConstraintCoincidence_18")
114 SketchArc_4 = Sketch_3.addArc(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_2&ExtrusionCut_1_1/Modfied_4"))
115 SketchConstraintCoincidence_18 = Sketch_3.setCoincident(SketchArc_3.endPoint(), SketchArc_4.results()[1])
116 SketchConstraintCoincidence_18.setName("SketchConstraintCoincidence_19")
117 SketchLine_12 = Sketch_3.addLine(-15, 46.0103340429751, -15, 35.00000000000001)
118 SketchConstraintCoincidence_19 = Sketch_3.setCoincident(SketchArc_3.startPoint(), SketchLine_12.startPoint())
119 SketchConstraintCoincidence_19.setName("SketchConstraintCoincidence_20")
120 SketchConstraintCoincidence_20 = Sketch_3.setCoincident(SketchPoint_3.coordinates(), SketchLine_12.endPoint())
121 SketchConstraintCoincidence_20.setName("SketchConstraintCoincidence_21")
122 SketchArc_5 = Sketch_3.addArc(-45, 35, -15, 35.00000000000001, -17.02045759563121, 24.17663606626137, True)
123 SketchConstraintCoincidence_21 = Sketch_3.setCoincident(SketchArc_4.result(), SketchArc_5.center())
124 SketchConstraintCoincidence_21.setName("SketchConstraintCoincidence_22")
125 SketchConstraintCoincidence_22 = Sketch_3.setCoincident(SketchPoint_3.coordinates(), SketchArc_5.startPoint())
126 SketchConstraintCoincidence_22.setName("SketchConstraintCoincidence_23")
127 SketchConstraintCoincidence_23 = Sketch_3.setCoincident(SketchArc_3.results()[1], SketchArc_5.endPoint())
128 SketchConstraintCoincidence_23.setName("SketchConstraintCoincidence_24")
129 model.do()
130 ExtrusionFuse_1 = model.addExtrusionFuse(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchArc_3_2f-SketchLine_12f-SketchArc_5_2r")], model.selection(), 5, 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
131 ExtrusionFuse_1.result().setName("ExtrusionFuse_1_1")
132 Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionFuse_1_1/To_Face_1"))
133 SketchPoint_4 = Sketch_4.addPoint(model.selection("VERTEX", "ExtrusionFuse_1_1/Modfied_4&ExtrusionFuse_1_1/Modfied_5&ExtrusionFuse_1_1/To_Face_1"))
134 SketchCircle_2 = Sketch_4.addCircle(-15, 35.00000000000001, 5)
135 SketchConstraintCoincidence_24 = Sketch_4.setCoincident(SketchPoint_4.result(), SketchCircle_2.center())
136 SketchConstraintCoincidence_24.setName("SketchConstraintCoincidence_25")
137 SketchConstraintRadius_4 = Sketch_4.setRadius(SketchCircle_2.results()[1], "10/2")
138 model.do()
139 ExtrusionFuse_2 = model.addExtrusionFuse(Part_1_doc, [model.selection("FACE", "Sketch_4/Face-SketchCircle_2_2f")], model.selection(), 8, 0, [model.selection("SOLID", "ExtrusionFuse_1_1")])
140 ExtrusionFuse_2.result().setName("ExtrusionFuse_2_1")
141 Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_1"))
142 SketchArc_6 = Sketch_5.addArc(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_1&ExtrusionFuse_1_1/Modfied_3"))
143 SketchArc_7 = Sketch_5.addArc(-45, 35, -45, 5, -25.41666666666737, 12.27351642784166, False)
144 SketchConstraintCoincidence_25 = Sketch_5.setCoincident(SketchArc_6.result(), SketchArc_7.center())
145 SketchConstraintCoincidence_25.setName("SketchConstraintCoincidence_26")
146 SketchCircle_3 = Sketch_5.addCircle(model.selection("EDGE", "ExtrusionFuse_2_1/Modfied_5&ExtrusionFuse_2_1/To_Face_1"))
147 SketchArc_8 = Sketch_5.addArc(-15, 35.00000000000001, -25.41666666666737, 12.27351642784166, -30.00000000000075, 14.99999999999944, True)
148 SketchConstraintCoincidence_26 = Sketch_5.setCoincident(SketchCircle_3.result(), SketchArc_8.center())
149 SketchConstraintCoincidence_26.setName("SketchConstraintCoincidence_27")
150 SketchConstraintCoincidence_27 = Sketch_5.setCoincident(SketchArc_6.endPoint(), SketchArc_8.startPoint())
151 SketchConstraintCoincidence_27.setName("SketchConstraintCoincidence_28")
152 SketchConstraintCoincidence_28 = Sketch_5.setCoincident(SketchArc_7.endPoint(), SketchArc_8.results()[1])
153 SketchConstraintCoincidence_28.setName("SketchConstraintCoincidence_29")
154 SketchConstraintCoincidence_29 = Sketch_5.setCoincident(SketchArc_7.startPoint(), SketchArc_6.startPoint())
155 SketchConstraintCoincidence_29.setName("SketchConstraintCoincidence_30")
156 SketchLine_13 = Sketch_5.addLine(-45, 5, -45, 10)
157 SketchConstraintCoincidence_30 = Sketch_5.setCoincident(SketchArc_6.startPoint(), SketchLine_13.startPoint())
158 SketchConstraintCoincidence_30.setName("SketchConstraintCoincidence_31")
159 SketchConstraintVertical_5 = Sketch_5.setVertical(SketchLine_13.result())
160 SketchConstraintLength_1 = Sketch_5.setLength(SketchLine_13.result(), 5)
161 SketchArc_9 = Sketch_5.addArc(-45, 35, -45, 10, -30.00000000000075, 14.99999999999944, False)
162 SketchConstraintCoincidence_31 = Sketch_5.setCoincident(SketchArc_6.center(), SketchArc_9.center())
163 SketchConstraintCoincidence_31.setName("SketchConstraintCoincidence_32")
164 SketchConstraintCoincidence_32 = Sketch_5.setCoincident(SketchArc_8.endPoint(), SketchArc_9.endPoint())
165 SketchConstraintCoincidence_32.setName("SketchConstraintCoincidence_33")
166 SketchConstraintCoincidence_33 = Sketch_5.setCoincident(SketchArc_9.startPoint(), SketchLine_13.endPoint())
167 SketchConstraintCoincidence_33.setName("SketchConstraintCoincidence_34")
168 model.do()
169 ExtrusionFuse_3 = model.addExtrusionFuse(Part_1_doc, [model.selection("FACE", "Sketch_5/Face-SketchArc_7_2f-SketchArc_8_2r-SketchLine_13r-SketchArc_9_2r")], model.selection(), 0, 8, [model.selection("SOLID", "ExtrusionFuse_2_1")])
170 ExtrusionFuse_3.result().setName("ExtrusionFuse_3_1")
171 Sketch_6 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionFuse_3_1/Modfied_3"))
172 SketchLine_14 = Sketch_6.addLine(model.selection("EDGE", "ExtrusionFuse_3_1/Modfied_3&Extrusion_1_1/Generated_Face_7"))
173 SketchArc_10 = Sketch_6.addArc(55, 35, 55, 15, 35, 35, True)
174 SketchConstraintCoincidence_34 = Sketch_6.setCoincident(SketchLine_14.result(), SketchArc_10.center())
175 SketchConstraintCoincidence_34.setName("SketchConstraintCoincidence_35")
176 SketchConstraintCoincidence_35 = Sketch_6.setCoincident(SketchLine_14.result(), SketchArc_10.startPoint())
177 SketchConstraintCoincidence_35.setName("SketchConstraintCoincidence_36")
178 SketchLine_15 = Sketch_6.addLine(model.selection("EDGE", "ExtrusionFuse_3_1/Modfied_3&Extrusion_1_1/Generated_Face_8"))
179 SketchConstraintDistance_8 = Sketch_6.setDistance(SketchArc_10.center(), SketchLine_15.result(), 35)
180 SketchLine_16 = Sketch_6.addLine(35, 35, 35, 48)
181 SketchConstraintCoincidence_36 = Sketch_6.setCoincident(SketchArc_10.endPoint(), SketchLine_16.startPoint())
182 SketchConstraintCoincidence_36.setName("SketchConstraintCoincidence_37")
183 SketchLine_17 = Sketch_6.addLine(model.selection("EDGE", "ExtrusionFuse_3_1/Modfied_3&Extrusion_1_1/Generated_Face_6"))
184 SketchConstraintCoincidence_37 = Sketch_6.setCoincident(SketchLine_16.endPoint(), SketchLine_17.result())
185 SketchConstraintCoincidence_37.setName("SketchConstraintCoincidence_38")
186 SketchConstraintVertical_6 = Sketch_6.setVertical(SketchLine_16.result())
187 SketchConstraintTangent_4 = Sketch_6.setTangent(SketchLine_16.result(), SketchArc_10.results()[1])
188 SketchConstraintRadius_5 = Sketch_6.setRadius(SketchArc_10.results()[1], 20)
189 SketchLine_18 = Sketch_6.addLine(55, 15, 55, 48)
190 SketchConstraintCoincidence_38 = Sketch_6.setCoincident(SketchArc_10.startPoint(), SketchLine_18.startPoint())
191 SketchConstraintCoincidence_38.setName("SketchConstraintCoincidence_39")
192 SketchConstraintCoincidence_39 = Sketch_6.setCoincident(SketchLine_14.endPoint(), SketchLine_18.endPoint())
193 SketchConstraintCoincidence_39.setName("SketchConstraintCoincidence_40")
194 SketchLine_19 = Sketch_6.addLine(35, 48, 55, 48)
195 SketchConstraintCoincidence_40 = Sketch_6.setCoincident(SketchLine_16.endPoint(), SketchLine_19.startPoint())
196 SketchConstraintCoincidence_40.setName("SketchConstraintCoincidence_41")
197 SketchConstraintCoincidence_41 = Sketch_6.setCoincident(SketchLine_14.endPoint(), SketchLine_19.endPoint())
198 SketchConstraintCoincidence_41.setName("SketchConstraintCoincidence_42")
199 model.do()
200 ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_6/Wire-SketchArc_10_2f-SketchLine_16r-SketchLine_18f-SketchLine_19r")], model.selection(), 0, 9, [model.selection("SOLID", "ExtrusionFuse_3_1")])
201 ExtrusionCut_2.result().setName("ExtrusionCut_2_1")
202 Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_2_1/Modfied_4"))
203 SketchCircle_4 = Sketch_7.addCircle(45, 35, 5)
204 SketchLine_20 = Sketch_7.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_2_1/Modfied_4"))
205 SketchConstraintDistance_9 = Sketch_7.setDistance(SketchCircle_4.center(), SketchLine_20.result(), 10)
206 SketchConstraintRadius_6 = Sketch_7.setRadius(SketchCircle_4.results()[1], "10/2")
207 SketchLine_21 = Sketch_7.addLine(35, 35, 45, 35)
208 SketchLine_21.setAuxiliary(True)
209 SketchPoint_5 = Sketch_7.addPoint(model.selection("VERTEX", "ExtrusionCut_2_1/Modfied_5&ExtrusionCut_2_1/Modfied_6&ExtrusionCut_2_1/Modfied_4"))
210 SketchConstraintCoincidence_42 = Sketch_7.setCoincident(SketchLine_21.startPoint(), SketchPoint_5.result())
211 SketchConstraintCoincidence_42.setName("SketchConstraintCoincidence_43")
212 SketchConstraintCoincidence_43 = Sketch_7.setCoincident(SketchCircle_4.center(), SketchLine_21.endPoint())
213 SketchConstraintCoincidence_43.setName("SketchConstraintCoincidence_44")
214 SketchConstraintHorizontal_4 = Sketch_7.setHorizontal(SketchLine_21.result())
215 model.do()
216 ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_7/Face-SketchCircle_4_2f")], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/From_Face_1"), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
217 ExtrusionCut_3.result().setName("ExtrusionCut_3_1")
218 Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_4"))
219 SketchLine_22 = Sketch_8.addLine(55, 25, 5.000000000000002, 25)
220 SketchLine_23 = Sketch_8.addLine(5.000000000000002, 25, 5.000000000000002, 13)
221 SketchLine_24 = Sketch_8.addLine(5.000000000000002, 13, 55, 13)
222 SketchLine_25 = Sketch_8.addLine(55, 13, 55, 25)
223 SketchConstraintCoincidence_44 = Sketch_8.setCoincident(SketchLine_25.endPoint(), SketchLine_22.startPoint())
224 SketchConstraintCoincidence_44.setName("SketchConstraintCoincidence_45")
225 SketchConstraintCoincidence_45 = Sketch_8.setCoincident(SketchLine_22.endPoint(), SketchLine_23.startPoint())
226 SketchConstraintCoincidence_45.setName("SketchConstraintCoincidence_46")
227 SketchConstraintCoincidence_46 = Sketch_8.setCoincident(SketchLine_23.endPoint(), SketchLine_24.startPoint())
228 SketchConstraintCoincidence_46.setName("SketchConstraintCoincidence_47")
229 SketchConstraintCoincidence_47 = Sketch_8.setCoincident(SketchLine_24.endPoint(), SketchLine_25.startPoint())
230 SketchConstraintCoincidence_47.setName("SketchConstraintCoincidence_48")
231 SketchConstraintHorizontal_5 = Sketch_8.setHorizontal(SketchLine_22.result())
232 SketchConstraintVertical_7 = Sketch_8.setVertical(SketchLine_23.result())
233 SketchConstraintHorizontal_6 = Sketch_8.setHorizontal(SketchLine_24.result())
234 SketchConstraintVertical_8 = Sketch_8.setVertical(SketchLine_25.result())
235 SketchConstraintLength_2 = Sketch_8.setLength(SketchLine_22.result(), 50)
236 SketchConstraintLength_3 = Sketch_8.setLength(SketchLine_25.result(), 12)
237 SketchProjection_1 = Sketch_8.addProjection(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_2_1/Modfied_1"))
238 SketchLine_26 = SketchProjection_1.createdFeature()
239 SketchConstraintCoincidence_48 = Sketch_8.setCoincident(SketchLine_22.startPoint(), SketchLine_26.result())
240 SketchConstraintCoincidence_48.setName("SketchConstraintCoincidence_49")
241 SketchLine_27 = Sketch_8.addLine(model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&Extrusion_1_1/Generated_Face_4"))
242 SketchConstraintCoincidence_49 = Sketch_8.setCoincident(SketchLine_22.startPoint(), SketchLine_27.result())
243 SketchConstraintCoincidence_49.setName("SketchConstraintCoincidence_50")
244 model.do()
245 ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_8/Face-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchLine_25f")], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/Generated_Face_8"), 0, [model.selection("SOLID", "ExtrusionCut_3_1")])
246 ExtrusionCut_4.result().setName("ExtrusionCut_4_1")
247 Sketch_9 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionFuse_1_1/Modfied_2"))
248 SketchLine_28 = Sketch_9.addLine(25, -45, 18.44853578320836, -63)
249 SketchLine_29 = Sketch_9.addLine(model.selection("EDGE", "ExtrusionFuse_1_1/Modfied_2&ExtrusionCut_4_1/Modfied_6"))
250 SketchConstraintCoincidence_50 = Sketch_9.setCoincident(SketchLine_28.endPoint(), SketchLine_29.result())
251 SketchConstraintCoincidence_50.setName("SketchConstraintCoincidence_51")
252 SketchLine_30 = Sketch_9.addLine(model.selection("EDGE", "ExtrusionCut_4_1/Modfied_9&ExtrusionFuse_1_1/Modfied_2"))
253 SketchConstraintCoincidence_51 = Sketch_9.setCoincident(SketchLine_28.startPoint(), SketchLine_30.result())
254 SketchConstraintCoincidence_51.setName("SketchConstraintCoincidence_52")
255 SketchConstraintAngle_3 = Sketch_9.setAngle(SketchLine_28.result(), SketchLine_30.result(), 20)
256 SketchConstraintDistance_10 = Sketch_9.setDistance(SketchLine_28.startPoint(), SketchLine_29.result(), 18)
257 SketchLine_31 = Sketch_9.addLine(18.44853578320836, -63, 25, -63)
258 SketchConstraintCoincidence_52 = Sketch_9.setCoincident(SketchLine_28.endPoint(), SketchLine_31.startPoint())
259 SketchConstraintCoincidence_52.setName("SketchConstraintCoincidence_53")
260 SketchConstraintCoincidence_53 = Sketch_9.setCoincident(SketchLine_29.startPoint(), SketchLine_31.endPoint())
261 SketchConstraintCoincidence_53.setName("SketchConstraintCoincidence_54")
262 SketchLine_32 = Sketch_9.addLine(25, -63, 25, -45)
263 SketchConstraintCoincidence_54 = Sketch_9.setCoincident(SketchLine_29.startPoint(), SketchLine_32.startPoint())
264 SketchConstraintCoincidence_54.setName("SketchConstraintCoincidence_55")
265 SketchConstraintCoincidence_55 = Sketch_9.setCoincident(SketchLine_28.startPoint(), SketchLine_32.endPoint())
266 SketchConstraintCoincidence_55.setName("SketchConstraintCoincidence_56")
267 model.do()
268 ExtrusionCut_5 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_9/Face-SketchLine_28f-SketchLine_31f-SketchLine_32f")], model.selection(), model.selection(), 0, model.selection("FACE", "ExtrusionCut_4_1/Modfied_3"), 0, [model.selection("SOLID", "ExtrusionCut_4_1")])
269 ExtrusionCut_5.result().setName("ExtrusionCut_5_1")
270 Sketch_10 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_5_1/Modfied_1"))
271 SketchCircle_5 = Sketch_10.addCircle(-6.000000000000002, 4.999999999999997, 5)
272 SketchLine_33 = Sketch_10.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_3&ExtrusionCut_5_1/Modfied_1"))
273 SketchConstraintDistance_11 = Sketch_10.setDistance(SketchCircle_5.center(), SketchLine_33.result(), 30)
274 SketchLine_34 = Sketch_10.addLine(model.selection("EDGE", "ExtrusionCut_5_1/Modfied_2&ExtrusionCut_5_1/Modfied_1"))
275 SketchConstraintDistance_12 = Sketch_10.setDistance(SketchCircle_5.result(), SketchLine_34.result(), 9)
276 SketchConstraintRadius_7 = Sketch_10.setRadius(SketchCircle_5.results()[1], "10/2")
277 model.do()
278 ExtrusionCut_6 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_10/Face-SketchCircle_5_2f")], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/Generated_Face_12"), 0, [model.selection("SOLID", "ExtrusionCut_5_1")])
279 ExtrusionCut_6.result().setName("ExtrusionCut_6_1")
280 model.do()
281
282 # Test reexecution after parameter change
283 Parameter_A.setValue(62)
284 model.do()
285 model.testResultsVolumes(ExtrusionCut_6, [141392.1882461419])
286 Parameter_A.setValue(63)
287 model.do()
288
289 from GeomAPI import GeomAPI_Shape
290
291 model.testNbResults(ExtrusionCut_6, 1)
292 model.testNbSubResults(ExtrusionCut_6, [0])
293 model.testNbSubShapes(ExtrusionCut_6, GeomAPI_Shape.SOLID, [1])
294 model.testNbSubShapes(ExtrusionCut_6, GeomAPI_Shape.FACE, [37])
295 model.testNbSubShapes(ExtrusionCut_6, GeomAPI_Shape.EDGE, [192])
296 model.testNbSubShapes(ExtrusionCut_6, GeomAPI_Shape.VERTEX, [384])
297 model.testResultsVolumes(ExtrusionCut_6, [144033.64842978157685])
298
299 model.end()
300
301 assert(model.checkPythonDump)