Salome HOME
updated copyright message
[modules/shaper.git] / src / FeaturesPlugin / Test / TestPipe_DoNotMovePath.py
1 # Copyright (C) 2018-2023  CEA, EDF
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 email : webmaster.salome@opencascade.com
18 #
19
20 from SketchAPI import *
21 from salome.shaper import model
22
23 model.begin()
24 partSet = model.moduleDocument()
25
26 ### Create Part
27 Part_1 = model.addPart(partSet)
28 Part_1_doc = Part_1.document()
29
30 ### Create Sketch
31 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
32
33 ### Create SketchLine
34 SketchLine_1 = Sketch_1.addLine(-592.0852359208525, -262.5570776255708, -625.5707762557078, -186.4535768645358)
35 SketchLine_1.setAuxiliary(True)
36
37 ### Create SketchLine
38 SketchLine_2 = Sketch_1.addLine(-625.5707762557078, -186.4535768645358, -639.2694063926941, -108.8280060882801)
39 SketchLine_2.setAuxiliary(True)
40 Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
41
42 ### Create SketchLine
43 SketchLine_3 = Sketch_1.addLine(-639.2694063926941, -108.8280060882801, -637.7473363774735, -9.893455098934579)
44 SketchLine_3.setAuxiliary(True)
45 Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
46
47 ### Create SketchLine
48 SketchLine_4 = Sketch_1.addLine(-637.7473363774735, -9.893455098934579, -614.9162861491628, 101.2176560121766)
49 SketchLine_4.setAuxiliary(True)
50 Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
51
52 ### Create SketchLine
53 SketchLine_5 = Sketch_1.addLine(-614.9162861491628, 101.2176560121766, -573.8203957382038, 200.1522070015221)
54 SketchLine_5.setAuxiliary(True)
55 Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint())
56
57 ### Create SketchLine
58 SketchLine_6 = Sketch_1.addLine(-573.8203957382038, 200.1522070015221, -532.724505327245, 200.1522070015221)
59 SketchLine_6.setAuxiliary(True)
60 Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
61
62 ### Create SketchLine
63 SketchLine_7 = Sketch_1.addLine(-532.724505327245, 200.1522070015221, 80.66971080669715, 200.1522070015221)
64 SketchLine_7.setAuxiliary(True)
65 Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint())
66 Sketch_1.setHorizontal(SketchLine_7.result())
67
68 ### Create SketchLine
69 SketchLine_8 = Sketch_1.addLine(80.66971080669715, 200.1522070015221, 68.49315068493158, 101.2176560121766)
70 SketchLine_8.setAuxiliary(True)
71 Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint())
72
73 ### Create SketchLine
74 SketchLine_9 = Sketch_1.addLine(68.49315068493158, 101.2176560121766, 54.79452054794545, -9.893455098934579)
75 SketchLine_9.setAuxiliary(True)
76 Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_9.startPoint())
77
78 ### Create SketchLine
79 SketchLine_10 = Sketch_1.addLine(54.79452054794545, -9.893455098934579, 63.92694063926946, -108.8280060882801)
80 SketchLine_10.setAuxiliary(True)
81 Sketch_1.setCoincident(SketchLine_9.endPoint(), SketchLine_10.startPoint())
82
83 ### Create SketchLine
84 SketchLine_11 = Sketch_1.addLine(63.92694063926946, -108.8280060882801, 66.97108066971103, -186.4535768645358)
85 SketchLine_11.setAuxiliary(True)
86 Sketch_1.setCoincident(SketchLine_10.endPoint(), SketchLine_11.startPoint())
87
88 ### Create SketchLine
89 SketchLine_12 = Sketch_1.addLine(66.97108066971103, -186.4535768645358, 92.84627092846273, -262.5570776255708)
90 SketchLine_12.setAuxiliary(True)
91 Sketch_1.setCoincident(SketchLine_11.endPoint(), SketchLine_12.startPoint())
92
93 ### Create SketchLine
94 SketchLine_13 = Sketch_1.addLine(92.84627092846273, -262.5570776255708, -546.4231354642313, -262.5570776255708)
95 SketchLine_13.setAuxiliary(True)
96 Sketch_1.setCoincident(SketchLine_12.endPoint(), SketchLine_13.startPoint())
97 Sketch_1.setHorizontal(SketchLine_13.result())
98
99 ### Create SketchLine
100 SketchLine_14 = Sketch_1.addLine(-546.4231354642313, -262.5570776255708, -584.4748858447489, -186.4535768645358)
101 SketchLine_14.setAuxiliary(True)
102 Sketch_1.setCoincident(SketchLine_13.endPoint(), SketchLine_14.startPoint())
103
104 ### Create SketchLine
105 SketchLine_15 = Sketch_1.addLine(-584.4748858447489, -186.4535768645358, -593.6073059360729, -108.8280060882801)
106 SketchLine_15.setAuxiliary(True)
107 Sketch_1.setCoincident(SketchLine_14.endPoint(), SketchLine_15.startPoint())
108
109 ### Create SketchLine
110 SketchLine_16 = Sketch_1.addLine(-593.6073059360729, -108.8280060882801, -573.8203957382038, -9.893455098934577)
111 SketchLine_16.setAuxiliary(True)
112 Sketch_1.setCoincident(SketchLine_15.endPoint(), SketchLine_16.startPoint())
113
114 ### Create SketchLine
115 SketchLine_17 = Sketch_1.addLine(-573.8203957382038, -9.893455098934577, -558.599695585997, 101.2176560121766)
116 SketchLine_17.setAuxiliary(True)
117 Sketch_1.setCoincident(SketchLine_16.endPoint(), SketchLine_17.startPoint())
118
119 ### Create SketchLine
120 SketchLine_18 = Sketch_1.addLine(-558.599695585997, 101.2176560121766, -532.724505327245, 200.1522070015221)
121 SketchLine_18.setAuxiliary(True)
122 Sketch_1.setCoincident(SketchLine_17.endPoint(), SketchLine_18.startPoint())
123 Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_18.endPoint())
124
125 ### Create SketchLine
126 SketchLine_19 = Sketch_1.addLine(-592.0852359208525, -262.5570776255708, -546.4231354642313, -262.5570776255708)
127 SketchLine_19.setAuxiliary(True)
128 Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_19.startPoint())
129 Sketch_1.setCoincident(SketchLine_13.endPoint(), SketchLine_19.endPoint())
130
131 ### Create SketchLine
132 SketchLine_20 = Sketch_1.addLine(-625.5707762557078, -186.4535768645358, -584.4748858447489, -186.4535768645358)
133 SketchLine_20.setAuxiliary(True)
134 Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_20.startPoint())
135 Sketch_1.setCoincident(SketchLine_14.endPoint(), SketchLine_20.endPoint())
136
137 ### Create SketchLine
138 SketchLine_21 = Sketch_1.addLine(-639.2694063926941, -108.8280060882801, -593.6073059360729, -108.8280060882801)
139 SketchLine_21.setAuxiliary(True)
140 Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_21.startPoint())
141 Sketch_1.setCoincident(SketchLine_15.endPoint(), SketchLine_21.endPoint())
142
143 ### Create SketchLine
144 SketchLine_22 = Sketch_1.addLine(-637.7473363774735, -9.893455098934579, -573.8203957382038, -9.893455098934577)
145 SketchLine_22.setAuxiliary(True)
146 Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_22.startPoint())
147 Sketch_1.setCoincident(SketchLine_16.endPoint(), SketchLine_22.endPoint())
148 Sketch_1.setHorizontal(SketchLine_22.result())
149
150 ### Create SketchLine
151 SketchLine_23 = Sketch_1.addLine(-614.9162861491628, 101.2176560121766, -558.599695585997, 101.2176560121766)
152 SketchLine_23.setAuxiliary(True)
153 Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_23.startPoint())
154 Sketch_1.setCoincident(SketchLine_17.endPoint(), SketchLine_23.endPoint())
155
156 ### Create SketchLine
157 SketchLine_24 = Sketch_1.addLine(-558.599695585997, 101.2176560121766, 68.49315068493158, 101.2176560121766)
158 SketchLine_24.setAuxiliary(True)
159 Sketch_1.setCoincident(SketchLine_17.endPoint(), SketchLine_24.startPoint())
160 Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_24.endPoint())
161
162 ### Create SketchLine
163 SketchLine_25 = Sketch_1.addLine(-573.8203957382038, -9.893455098934577, 54.79452054794545, -9.893455098934579)
164 SketchLine_25.setAuxiliary(True)
165 Sketch_1.setCoincident(SketchLine_16.endPoint(), SketchLine_25.startPoint())
166 Sketch_1.setCoincident(SketchLine_9.endPoint(), SketchLine_25.endPoint())
167 Sketch_1.setHorizontal(SketchLine_25.result())
168
169 ### Create SketchLine
170 SketchLine_26 = Sketch_1.addLine(-593.6073059360729, -108.8280060882801, 63.92694063926946, -108.8280060882801)
171 SketchLine_26.setAuxiliary(True)
172 Sketch_1.setCoincident(SketchLine_15.endPoint(), SketchLine_26.startPoint())
173 Sketch_1.setCoincident(SketchLine_10.endPoint(), SketchLine_26.endPoint())
174 Sketch_1.setHorizontal(SketchLine_26.result())
175
176 ### Create SketchLine
177 SketchLine_27 = Sketch_1.addLine(-584.4748858447489, -186.4535768645358, 66.97108066971103, -186.4535768645358)
178 SketchLine_27.setAuxiliary(True)
179 Sketch_1.setCoincident(SketchLine_14.endPoint(), SketchLine_27.startPoint())
180 Sketch_1.setCoincident(SketchLine_11.endPoint(), SketchLine_27.endPoint())
181 Sketch_1.setHorizontal(SketchLine_27.result())
182 Sketch_1.setHorizontal(SketchLine_6.result())
183 Sketch_1.setHorizontal(SketchLine_23.result())
184 Sketch_1.setHorizontal(SketchLine_24.result())
185 Sketch_1.setHorizontal(SketchLine_21.result())
186 Sketch_1.setHorizontal(SketchLine_20.result())
187 Sketch_1.setHorizontal(SketchLine_19.result())
188 model.do()
189
190 ### Create Plane
191 Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), model.selection("VERTEX", "Sketch_1/SketchLine_13_StartVertex"))
192
193 ### Create Plane
194 Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), model.selection("VERTEX", "Sketch_1/SketchLine_11_EndVertex"))
195
196 ### Create Plane
197 Plane_6 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), model.selection("VERTEX", "Sketch_1/SketchLine_11_StartVertex"))
198
199 ### Create Plane
200 Plane_7 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), model.selection("VERTEX", "Sketch_1/SketchLine_10_StartVertex"))
201
202 ### Create Plane
203 Plane_8 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), model.selection("VERTEX", "Sketch_1/SketchLine_24_EndVertex"))
204
205 ### Create Plane
206 Plane_9 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"))
207
208 ### Create Sketch
209 Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "all-in-Plane_1"))
210
211 ### Create SketchProjection
212 SketchProjection_1 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_13_StartVertex"), False)
213 SketchPoint_1 = SketchProjection_1.createdFeature()
214
215 ### Create SketchProjection
216 SketchProjection_2 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_19_EndVertex"), False)
217 SketchPoint_2 = SketchProjection_2.createdFeature()
218
219 ### Create SketchCircle
220 SketchCircle_1 = Sketch_2.addCircle(92.84627092846273, 0, 639.269406392694)
221 Sketch_2.setCoincident(SketchPoint_1.result(), SketchCircle_1.center())
222 Sketch_2.setCoincident(SketchPoint_2.result(), SketchCircle_1.results()[1])
223
224 ### Create SketchProjection
225 SketchProjection_3 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_1_StartVertex"), False)
226 SketchPoint_3 = SketchProjection_3.createdFeature()
227
228 ### Create SketchCircle
229 SketchCircle_2 = Sketch_2.addCircle(96.29157651318411, -4.925446150925168, 688.3944333858536)
230 Sketch_2.setCoincident(SketchPoint_3.result(), SketchCircle_2.results()[1])
231 model.do()
232
233 ### Create Sketch
234 Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "all-in-Plane_2"))
235
236 ### Create SketchProjection
237 SketchProjection_4 = Sketch_3.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_11_EndVertex"), False)
238 SketchPoint_4 = SketchProjection_4.createdFeature()
239
240 ### Create SketchProjection
241 SketchProjection_5 = Sketch_3.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_20_EndVertex"), False)
242 SketchPoint_5 = SketchProjection_5.createdFeature()
243
244 ### Create SketchCircle
245 SketchCircle_3 = Sketch_3.addCircle(66.97108066971103, 0, 651.4459665144599)
246 Sketch_3.setCoincident(SketchPoint_4.result(), SketchCircle_3.center())
247 Sketch_3.setCoincident(SketchPoint_5.result(), SketchCircle_3.results()[1])
248
249 ### Create SketchProjection
250 SketchProjection_6 = Sketch_3.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_1_EndVertex"), False)
251 SketchPoint_6 = SketchProjection_6.createdFeature()
252
253 ### Create SketchCircle
254 SketchCircle_4 = Sketch_3.addCircle(66.97108066971103, 0, 692.5418569254188)
255 Sketch_3.setCoincident(SketchAPI_Point(SketchPoint_4).coordinates(), SketchCircle_4.center())
256 Sketch_3.setCoincident(SketchPoint_6.result(), SketchCircle_4.results()[1])
257 model.do()
258
259 ### Create Sketch
260 Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "all-in-Plane_3"))
261
262 ### Create SketchProjection
263 SketchProjection_7 = Sketch_4.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_11_StartVertex"), False)
264 SketchPoint_7 = SketchProjection_7.createdFeature()
265
266 ### Create SketchProjection
267 SketchProjection_8 = Sketch_4.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_15_EndVertex"), False)
268 SketchPoint_8 = SketchProjection_8.createdFeature()
269
270 ### Create SketchCircle
271 SketchCircle_5 = Sketch_4.addCircle(63.92694063926946, 0, 657.5342465753423)
272 Sketch_4.setCoincident(SketchPoint_7.result(), SketchCircle_5.center())
273 Sketch_4.setCoincident(SketchPoint_8.result(), SketchCircle_5.results()[1])
274
275 ### Create SketchProjection
276 SketchProjection_9 = Sketch_4.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_21_StartVertex"), False)
277 SketchPoint_9 = SketchProjection_9.createdFeature()
278
279 ### Create SketchCircle
280 SketchCircle_6 = Sketch_4.addCircle(63.92694063926946, 0, 703.1963470319636)
281 Sketch_4.setCoincident(SketchAPI_Point(SketchPoint_7).coordinates(), SketchCircle_6.center())
282 Sketch_4.setCoincident(SketchPoint_9.result(), SketchCircle_6.results()[1])
283 model.do()
284
285 ### Create Sketch
286 Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "all-in-Plane_4"))
287
288 ### Create SketchProjection
289 SketchProjection_10 = Sketch_5.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_10_StartVertex"), False)
290 SketchPoint_10 = SketchProjection_10.createdFeature()
291
292 ### Create SketchProjection
293 SketchProjection_11 = Sketch_5.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_22_EndVertex"), False)
294 SketchPoint_11 = SketchProjection_11.createdFeature()
295
296 ### Create SketchCircle
297 SketchCircle_7 = Sketch_5.addCircle(54.79452054794545, 0, 628.6149162861493)
298 Sketch_5.setCoincident(SketchPoint_10.result(), SketchCircle_7.center())
299 Sketch_5.setCoincident(SketchPoint_11.result(), SketchCircle_7.results()[1])
300
301 ### Create SketchProjection
302 SketchProjection_12 = Sketch_5.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_4_StartVertex"), False)
303 SketchPoint_12 = SketchProjection_12.createdFeature()
304
305 ### Create SketchCircle
306 SketchCircle_8 = Sketch_5.addCircle(54.79452054794545, 0, 692.541856925419)
307 Sketch_5.setCoincident(SketchAPI_Point(SketchPoint_10).coordinates(), SketchCircle_8.center())
308 Sketch_5.setCoincident(SketchPoint_12.result(), SketchCircle_8.results()[1])
309 model.do()
310
311 ### Create Sketch
312 Sketch_6 = model.addSketch(Part_1_doc, model.selection("FACE", "all-in-Plane_5"))
313
314 ### Create SketchProjection
315 SketchProjection_13 = Sketch_6.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_24_EndVertex"), False)
316 SketchPoint_13 = SketchProjection_13.createdFeature()
317
318 ### Create SketchProjection
319 SketchProjection_14 = Sketch_6.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_18_StartVertex"), False)
320 SketchPoint_14 = SketchProjection_14.createdFeature()
321
322 ### Create SketchCircle
323 SketchCircle_9 = Sketch_6.addCircle(68.49315068493158, 0, 627.0928462709286)
324 Sketch_6.setCoincident(SketchPoint_13.result(), SketchCircle_9.center())
325 Sketch_6.setCoincident(SketchPoint_14.result(), SketchCircle_9.results()[1])
326
327 ### Create SketchProjection
328 SketchProjection_15 = Sketch_6.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_23_StartVertex"), False)
329 SketchPoint_15 = SketchProjection_15.createdFeature()
330
331 ### Create SketchCircle
332 SketchCircle_10 = Sketch_6.addCircle(68.49315068493158, 0, 683.4094368340944)
333 Sketch_6.setCoincident(SketchAPI_Point(SketchPoint_13).coordinates(), SketchCircle_10.center())
334 Sketch_6.setCoincident(SketchPoint_15.result(), SketchCircle_10.results()[1])
335 model.do()
336
337 ### Create Sketch
338 Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "all-in-Plane_6"))
339
340 ### Create SketchProjection
341 SketchProjection_16 = Sketch_7.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"), False)
342 SketchPoint_16 = SketchProjection_16.createdFeature()
343
344 ### Create SketchProjection
345 SketchProjection_17 = Sketch_7.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_18_EndVertex"), False)
346 SketchPoint_17 = SketchProjection_17.createdFeature()
347
348 ### Create SketchCircle
349 SketchCircle_11 = Sketch_7.addCircle(80.66971080669715, 0, 613.3942161339421)
350 Sketch_7.setCoincident(SketchPoint_16.result(), SketchCircle_11.center())
351 Sketch_7.setCoincident(SketchPoint_17.result(), SketchCircle_11.results()[1])
352
353 ### Create SketchProjection
354 SketchProjection_18 = Sketch_7.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_6_StartVertex"), False)
355 SketchPoint_18 = SketchProjection_18.createdFeature()
356
357 ### Create SketchCircle
358 SketchCircle_12 = Sketch_7.addCircle(80.66971080669715, 0, 654.490106544901)
359 Sketch_7.setCoincident(SketchAPI_Point(SketchPoint_16).coordinates(), SketchCircle_12.center())
360 Sketch_7.setCoincident(SketchPoint_18.result(), SketchCircle_12.results()[1])
361 model.do()
362
363 ### Create Wire
364 Wire_1_objects = [model.selection("EDGE", "Sketch_1/SketchLine_8"),
365                   model.selection("EDGE", "Sketch_1/SketchLine_9"),
366                   model.selection("EDGE", "Sketch_1/SketchLine_10"),
367                   model.selection("EDGE", "Sketch_1/SketchLine_11"),
368                   model.selection("EDGE", "Sketch_1/SketchLine_12")]
369 Wire_1 = model.addWire(Part_1_doc, Wire_1_objects, False)
370
371 ### Create Pipe
372 Pipe_1_objects_1 = [model.selection("FACE", "Sketch_2/Face-SketchCircle_1_2f"),
373                     model.selection("FACE", "Sketch_3/Face-SketchCircle_3_2f"),
374                     model.selection("FACE", "Sketch_4/Face-SketchCircle_5_2f"),
375                     model.selection("FACE", "Sketch_5/Face-SketchCircle_7_2f"),
376                     model.selection("FACE", "Sketch_6/Face-SketchCircle_9_2f"),
377                     model.selection("FACE", "Sketch_7/Face-SketchCircle_11_2f")]
378 Pipe_1 = model.addPipe(Part_1_doc, Pipe_1_objects_1, model.selection("WIRE", "Wire_1_1"), [])
379
380 ### Create Wire
381 Wire_2_objects = [model.selection("EDGE", "Sketch_1/SketchLine_8"),
382                   model.selection("EDGE", "Sketch_1/SketchLine_9"),
383                   model.selection("EDGE", "Sketch_1/SketchLine_10"),
384                   model.selection("EDGE", "Sketch_1/SketchLine_11"),
385                   model.selection("EDGE", "Sketch_1/SketchLine_12")]
386 Wire_2 = model.addWire(Part_1_doc, Wire_2_objects)
387
388 ### Create Pipe
389 Pipe_2_objects_1 = [model.selection("EDGE", "Sketch_2/SketchCircle_2_2"),
390                     model.selection("EDGE", "Sketch_3/SketchCircle_4_2"),
391                     model.selection("EDGE", "Sketch_4/SketchCircle_6_2"),
392                     model.selection("EDGE", "Sketch_5/SketchCircle_8_2"),
393                     model.selection("EDGE", "Sketch_6/SketchCircle_10_2"),
394                     model.selection("EDGE", "Sketch_7/SketchCircle_12_2")]
395 Pipe_2 = model.addPipe(Part_1_doc, Pipe_2_objects_1, model.selection("WIRE", "Wire_2_1"), [])
396
397 model.end()
398
399 # Check results
400 from GeomAPI import GeomAPI_Shape
401
402 model.testNbResults(Pipe_1, 1)
403 model.testNbSubShapes(Pipe_1, GeomAPI_Shape.SOLID, [1])
404 model.testNbSubShapes(Pipe_1, GeomAPI_Shape.FACE, [7])
405 model.testResultsAreas(Pipe_1, [4399065.64794281])
406
407 model.testNbResults(Pipe_2, 1)
408 model.testNbSubShapes(Pipe_2, GeomAPI_Shape.SOLID, [0])
409 model.testNbSubShapes(Pipe_2, GeomAPI_Shape.FACE, [5])
410 model.testResultsAreas(Pipe_2, [2063250.44226183])