]> SALOME platform Git repositories - modules/shaper.git/blob - src/BuildPlugin/Test/Test20469.py
Salome HOME
Issue #20469: crash when creating wire
[modules/shaper.git] / src / BuildPlugin / Test / Test20469.py
1 # Copyright (C) 2020  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 email : webmaster.salome@opencascade.com
18 #
19
20 from salome.shaper import model
21
22 model.begin()
23 partSet = model.moduleDocument()
24
25 ### Create Part
26 Part_1 = model.addPart(partSet)
27 Part_1_doc = Part_1.document()
28 model.addParameter(Part_1_doc, "ep", "0.055")
29
30 ### Create Plane
31 Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), 2.8667, False)
32
33 ### Create Sketch
34 Sketch_1 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
35
36 ### Create SketchCircle
37 SketchCircle_1 = Sketch_1.addCircle(1.771, 0, 1.771)
38
39 ### Create SketchCircle
40 SketchCircle_2 = Sketch_1.addCircle(1.771, 0, 1.826)
41 model.do()
42
43 ### Create Plane
44 Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), 5.6, False)
45
46 ### Create Sketch
47 Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_2"))
48
49 ### Create SketchPoint
50 SketchPoint_1 = Sketch_2.addPoint(0, 0)
51
52 ### Create SketchPoint
53 SketchPoint_2 = Sketch_2.addPoint(0.03453184, 0.15311942)
54 SketchPoint_3 = Sketch_2.addPoint(0.11839488, 0.28145762)
55 SketchPoint_4 = Sketch_2.addPoint(0.20229646, 0.3653592)
56 SketchPoint_5 = Sketch_2.addPoint(0.325663, 0.44425058)
57 SketchPoint_6 = Sketch_2.addPoint(0.44409642, 0.5083426)
58 SketchPoint_7 = Sketch_2.addPoint(0.5625298400000001, 0.5526636)
59 SketchPoint_8 = Sketch_2.addPoint(0.70069574, 0.5969460600000001)
60 SketchPoint_9 = Sketch_2.addPoint(0.8684989, 0.63132374)
61 SketchPoint_10 = Sketch_2.addPoint(1.02146416, 0.6509020600000001)
62 SketchPoint_11 = Sketch_2.addPoint(1.22873228, 0.65063228)
63 SketchPoint_12 = Sketch_2.addPoint(1.41129626, 0.6454293800000001)
64 SketchPoint_13 = Sketch_2.addPoint(1.58403254, 0.6205325399999999)
65 SketchPoint_14 = Sketch_2.addPoint(1.7369978, 0.60550194)
66 SketchPoint_15 = Sketch_2.addPoint(1.9244949, 0.5632621)
67 SketchPoint_16 = Sketch_2.addPoint(2.10709742, 0.5160891400000001)
68 SketchPoint_17 = Sketch_2.addPoint(2.27486204, 0.4763544)
69 SketchPoint_18 = Sketch_2.addPoint(2.4179996, 0.43661966)
70 SketchPoint_19 = Sketch_2.addPoint(2.55123238, 0.39692346)
71 SketchPoint_20 = Sketch_2.addPoint(2.70913076, 0.3522556)
72 SketchPoint_21 = Sketch_2.addPoint(2.89173328, 0.29768296)
73 SketchPoint_22 = Sketch_2.addPoint(3.04469854, 0.2530151)
74 SketchPoint_23 = Sketch_2.addPoint(3.19273068, 0.20341412)
75 SketchPoint_24 = Sketch_2.addPoint(3.35556218, 0.1537746)
76 SketchPoint_25 = Sketch_2.addPoint(3.50363286, 0.10914528)
77 SketchPoint_26 = Sketch_2.addPoint(3.63686564, 0.06944908000000001)
78 SketchPoint_27 = Sketch_2.addPoint(3.7404997, 0.03965766)
79 SketchPoint_28 = Sketch_2.addPoint(3.838584, 0.004933120000000001)
80 SketchPoint_29 = Sketch_2.addPoint(3.854, -0.009866240000000002)
81 SketchPoint_30 = Sketch_2.addPoint(3.77009842, -0.004817500000000001)
82 SketchPoint_31 = Sketch_2.addPoint(3.56040228, 0.01025164)
83 SketchPoint_32 = Sketch_2.addPoint(3.43946376, 0.00300612)
84 SketchPoint_33 = Sketch_2.addPoint(3.31609722, -0.02154386)
85 SketchPoint_34 = Sketch_2.addPoint(3.18779756, -0.05349352)
86 SketchPoint_35 = Sketch_2.addPoint(3.04963166, -0.09777598)
87 SketchPoint_36 = Sketch_2.addPoint(2.89173328, -0.15192468)
88 SketchPoint_37 = Sketch_2.addPoint(2.70913076, -0.22580586)
89 SketchPoint_38 = Sketch_2.addPoint(2.54629926, -0.2947539200000001)
90 SketchPoint_39 = Sketch_2.addPoint(2.39822858, -0.3588074)
91 SketchPoint_40 = Sketch_2.addPoint(2.26992892, -0.41299464)
92 SketchPoint_41 = Sketch_2.addPoint(2.12189678, -0.47704812)
93 SketchPoint_42 = Sketch_2.addPoint(1.8998293, -0.5558238799999999)
94 SketchPoint_43 = Sketch_2.addPoint(1.70246596, -0.6247334)
95 SketchPoint_44 = Sketch_2.addPoint(1.52479656, -0.6640442000000001)
96 SketchPoint_45 = Sketch_2.addPoint(1.33236634, -0.68847856)
97 SketchPoint_46 = Sketch_2.addPoint(1.15223038, -0.7006186600000001)
98 SketchPoint_47 = Sketch_2.addPoint(0.9819992000000001, -0.69792086)
99 SketchPoint_48 = Sketch_2.addPoint(0.83392852, -0.6730240200000001)
100 SketchPoint_49 = Sketch_2.addPoint(0.68589638, -0.63826094)
101 SketchPoint_50 = Sketch_2.addPoint(0.5403308, -0.59359308)
102 SketchPoint_51 = Sketch_2.addPoint(0.4144977, -0.52425962)
103 SketchPoint_52 = Sketch_2.addPoint(0.30593052, -0.4549647)
104 SketchPoint_53 = Sketch_2.addPoint(0.19243022, -0.37079334)
105 SketchPoint_54 = Sketch_2.addPoint(0.09866240000000001, -0.26199492)
106 SketchPoint_55 = Sketch_2.addPoint(0.04439808000000001, -0.17296752)
107 SketchPoint_56 = Sketch_2.addPoint(0.009866240000000002, -0.08397866)
108
109 ### Create SketchBSpline
110 SketchBSpline_1_poles = [(0, 0),
111                          (9.014752251795682e-05, 0.05451214529317949),
112                          (0.02532271171862411, 0.15579971775632),
113                          (0.1083431350565314, 0.2748971692083296),
114                          (0.2055162110916063, 0.3762476714704591),
115                          (0.3226869043516477, 0.4417758873955893),
116                          (0.4396106030030269, 0.5114950821406695),
117                          (0.5686113665746824, 0.5543315380381274),
118                          (0.7080109281378321, 0.6032643908580265),
119                          (0.8627418437966349, 0.6310529967664337),
120                          (1.038760710497959, 0.658153841986185),
121                          (1.22044861142381, 0.6481760900098785),
122                          (1.409221724680022, 0.652722089409154),
123                          (1.576578009046891, 0.6165884029638471),
124                          (1.750622207371201, 0.6101568179490738),
125                          (1.923498511038718, 0.5633997285939256),
126                          (2.101468637706691, 0.5160168977121142),
127                          (2.26756869845679, 0.4799182653430439),
128                          (2.415109663038519, 0.4380247760586003),
129                          (2.559003214216268, 0.3937264274604114),
130                          (2.717970834232034, 0.3510185960290838),
131                          (2.881379255194576, 0.2994130045705585),
132                          (3.044331614256414, 0.2554589350745441),
133                          (3.196663224032949, 0.2002205281261157),
134                          (3.35069087314937, 0.1557508658621287),
135                          (3.498630901739528, 0.1100749985226144),
136                          (3.626758629069007, 0.07354615416618171),
137                          (3.739427723854896, 0.03597634464461345),
138                          (3.813716543275791, 0.02837078095396758),
139                          (3.876876038873482, -0.02879298081488075),
140                          (3.682323148493558, 0.01775150116288641),
141                          (3.59938700895519, 0.01042701260276317),
142                          (3.435447203044759, 0.007149079513330234),
143                          (3.314513764134776, -0.02220772128681932),
144                          (3.18286942455218, -0.05232760411385905),
145                          (3.042896269666392, -0.1005145549495807),
146                          (2.881422363667546, -0.1529357624091193),
147                          (2.715356347244343, -0.2233467064370982),
148                          (2.550824101050534, -0.2921770145750037),
149                          (2.405271709687024, -0.3565989754466209),
150                          (2.262755596022538, -0.4148284616351946),
151                          (2.100460548562433, -0.4902544331640812),
152                          (1.907228846399618, -0.5500679945393977),
153                          (1.712805296024295, -0.6276431801884527),
154                          (1.52116538281023, -0.6672841271228219),
155                          (1.336949021174942, -0.6896647034143828),
156                          (1.155869430538025, -0.7022133885319179),
157                          (0.9881819820589015, -0.7038770986545503),
158                          (0.8328846107160076, -0.6739914241952796),
159                          (0.6860347780845882, -0.6386140063120748),
160                          (0.5400707121799601, -0.6015647674456689),
161                          (0.4182774376387844, -0.5270750025520176),
162                          (0.3022771427307028, -0.4533773192679936),
163                          (0.1872763782990937, -0.3753721045244912),
164                          (0.1041307066426412, -0.2741285283554168),
165                          (0.04291862690830676, -0.177004007658222),
166                          (0.0185030859727657, -0.1148400743684852),
167                          (0.009866240000000002, -0.08397866)
168                         ]
169 SketchBSpline_1 = Sketch_2.addSpline(degree = 3, poles = SketchBSpline_1_poles, weights = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], knots = [0, 0.01860336163521267, 0.03677344027717935, 0.0508363049754388, 0.0681916392804011, 0.08415184938325194, 0.09913917386834825, 0.1163349772413292, 0.1366359422890603, 0.1549131538674821, 0.1794784236049427, 0.2011245430557611, 0.2218086624397829, 0.2400252925906828, 0.2628042259083713, 0.2851566328948674, 0.3055900477586722, 0.3231961160252453, 0.3396727392234426, 0.359121125995382, 0.3817088598254108, 0.4005953257674918, 0.4190986615685892, 0.4392741570447567, 0.4576031798532225, 0.4740798030514198, 0.4868598578148062, 0.4991917342048151, 0.5017244814860118, 0.5116864156093297, 0.5366035207975692, 0.5509627564215326, 0.5658707575129726, 0.5815411201190975, 0.5987369234920785, 0.6185207473608354, 0.641866954108396, 0.6628243946707135, 0.6819452440086935, 0.6984518054499047, 0.7175684625877018, 0.7454946578808465, 0.7702707840614231, 0.7918372885014108, 0.8148270864302183, 0.836225083387823, 0.8564032777714525, 0.8741988374599583, 0.8922207646184928, 0.910267059554588, 0.9272947229425885, 0.9425596161747006, 0.9593069836005957, 0.9763298627094416, 0.9886868701731323, 1], multiplicities = [4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4])
170 Sketch_2.setCoincident(SketchPoint_1.coordinates(), SketchBSpline_1.startPoint())
171 Sketch_2.setCoincident(SketchPoint_2.coordinates(), SketchBSpline_1.result())
172 Sketch_2.setCoincident(SketchPoint_3.coordinates(), SketchBSpline_1.result())
173 Sketch_2.setCoincident(SketchPoint_4.coordinates(), SketchBSpline_1.result())
174 Sketch_2.setCoincident(SketchPoint_5.coordinates(), SketchBSpline_1.result())
175 Sketch_2.setCoincident(SketchPoint_6.coordinates(), SketchBSpline_1.result())
176 Sketch_2.setCoincident(SketchPoint_7.coordinates(), SketchBSpline_1.result())
177 Sketch_2.setCoincident(SketchPoint_8.coordinates(), SketchBSpline_1.result())
178 Sketch_2.setCoincident(SketchPoint_9.coordinates(), SketchBSpline_1.result())
179 Sketch_2.setCoincident(SketchPoint_10.coordinates(), SketchBSpline_1.result())
180 Sketch_2.setCoincident(SketchPoint_11.coordinates(), SketchBSpline_1.result())
181 Sketch_2.setCoincident(SketchPoint_12.coordinates(), SketchBSpline_1.result())
182 Sketch_2.setCoincident(SketchPoint_13.coordinates(), SketchBSpline_1.result())
183 Sketch_2.setCoincident(SketchPoint_14.coordinates(), SketchBSpline_1.result())
184 Sketch_2.setCoincident(SketchPoint_15.coordinates(), SketchBSpline_1.result())
185 Sketch_2.setCoincident(SketchPoint_16.coordinates(), SketchBSpline_1.result())
186 Sketch_2.setCoincident(SketchPoint_17.coordinates(), SketchBSpline_1.result())
187 Sketch_2.setCoincident(SketchPoint_18.coordinates(), SketchBSpline_1.result())
188 Sketch_2.setCoincident(SketchPoint_19.coordinates(), SketchBSpline_1.result())
189 Sketch_2.setCoincident(SketchPoint_20.coordinates(), SketchBSpline_1.result())
190 Sketch_2.setCoincident(SketchPoint_21.coordinates(), SketchBSpline_1.result())
191 Sketch_2.setCoincident(SketchPoint_22.coordinates(), SketchBSpline_1.result())
192 Sketch_2.setCoincident(SketchPoint_23.coordinates(), SketchBSpline_1.result())
193 Sketch_2.setCoincident(SketchPoint_24.coordinates(), SketchBSpline_1.result())
194 Sketch_2.setCoincident(SketchPoint_25.coordinates(), SketchBSpline_1.result())
195 Sketch_2.setCoincident(SketchPoint_26.coordinates(), SketchBSpline_1.result())
196 Sketch_2.setCoincident(SketchPoint_27.coordinates(), SketchBSpline_1.result())
197 Sketch_2.setCoincident(SketchPoint_28.coordinates(), SketchBSpline_1.result())
198 Sketch_2.setCoincident(SketchPoint_29.coordinates(), SketchBSpline_1.result())
199 Sketch_2.setCoincident(SketchPoint_30.coordinates(), SketchBSpline_1.result())
200 Sketch_2.setCoincident(SketchPoint_31.coordinates(), SketchBSpline_1.result())
201 Sketch_2.setCoincident(SketchPoint_32.coordinates(), SketchBSpline_1.result())
202 Sketch_2.setCoincident(SketchPoint_33.coordinates(), SketchBSpline_1.result())
203 Sketch_2.setCoincident(SketchPoint_34.coordinates(), SketchBSpline_1.result())
204 Sketch_2.setCoincident(SketchPoint_35.coordinates(), SketchBSpline_1.result())
205 Sketch_2.setCoincident(SketchPoint_36.coordinates(), SketchBSpline_1.result())
206 Sketch_2.setCoincident(SketchPoint_37.coordinates(), SketchBSpline_1.result())
207 Sketch_2.setCoincident(SketchPoint_38.coordinates(), SketchBSpline_1.result())
208 Sketch_2.setCoincident(SketchPoint_39.coordinates(), SketchBSpline_1.result())
209 Sketch_2.setCoincident(SketchPoint_40.coordinates(), SketchBSpline_1.result())
210 Sketch_2.setCoincident(SketchPoint_41.coordinates(), SketchBSpline_1.result())
211 Sketch_2.setCoincident(SketchPoint_42.coordinates(), SketchBSpline_1.result())
212 Sketch_2.setCoincident(SketchPoint_43.coordinates(), SketchBSpline_1.result())
213 Sketch_2.setCoincident(SketchPoint_44.coordinates(), SketchBSpline_1.result())
214 Sketch_2.setCoincident(SketchPoint_45.coordinates(), SketchBSpline_1.result())
215 Sketch_2.setCoincident(SketchPoint_46.coordinates(), SketchBSpline_1.result())
216 Sketch_2.setCoincident(SketchPoint_47.coordinates(), SketchBSpline_1.result())
217 Sketch_2.setCoincident(SketchPoint_48.coordinates(), SketchBSpline_1.result())
218 Sketch_2.setCoincident(SketchPoint_49.coordinates(), SketchBSpline_1.result())
219 Sketch_2.setCoincident(SketchPoint_50.coordinates(), SketchBSpline_1.result())
220 Sketch_2.setCoincident(SketchPoint_51.coordinates(), SketchBSpline_1.result())
221 Sketch_2.setCoincident(SketchPoint_52.coordinates(), SketchBSpline_1.result())
222 Sketch_2.setCoincident(SketchPoint_53.coordinates(), SketchBSpline_1.result())
223 Sketch_2.setCoincident(SketchPoint_54.coordinates(), SketchBSpline_1.result())
224 Sketch_2.setCoincident(SketchPoint_55.coordinates(), SketchBSpline_1.result())
225 Sketch_2.setCoincident(SketchPoint_56.coordinates(), SketchBSpline_1.endPoint())
226 Sketch_2.setCoincident(SketchPoint_1.coordinates(), SketchBSpline_1.startPoint())
227 Sketch_2.setCoincident(SketchPoint_2.coordinates(), SketchBSpline_1.result())
228 Sketch_2.setCoincident(SketchPoint_3.coordinates(), SketchBSpline_1.result())
229 Sketch_2.setCoincident(SketchPoint_4.coordinates(), SketchBSpline_1.result())
230 Sketch_2.setCoincident(SketchPoint_5.coordinates(), SketchBSpline_1.result())
231 Sketch_2.setCoincident(SketchPoint_6.coordinates(), SketchBSpline_1.result())
232 Sketch_2.setCoincident(SketchPoint_7.coordinates(), SketchBSpline_1.result())
233 Sketch_2.setCoincident(SketchPoint_8.coordinates(), SketchBSpline_1.result())
234 Sketch_2.setCoincident(SketchPoint_9.coordinates(), SketchBSpline_1.result())
235 Sketch_2.setCoincident(SketchPoint_10.coordinates(), SketchBSpline_1.result())
236 Sketch_2.setCoincident(SketchPoint_11.coordinates(), SketchBSpline_1.result())
237 Sketch_2.setCoincident(SketchPoint_12.coordinates(), SketchBSpline_1.result())
238 Sketch_2.setCoincident(SketchPoint_13.coordinates(), SketchBSpline_1.result())
239 Sketch_2.setCoincident(SketchPoint_14.coordinates(), SketchBSpline_1.result())
240 Sketch_2.setCoincident(SketchPoint_15.coordinates(), SketchBSpline_1.result())
241 Sketch_2.setCoincident(SketchPoint_16.coordinates(), SketchBSpline_1.result())
242 Sketch_2.setCoincident(SketchPoint_17.coordinates(), SketchBSpline_1.result())
243 Sketch_2.setCoincident(SketchPoint_18.coordinates(), SketchBSpline_1.result())
244 Sketch_2.setCoincident(SketchPoint_19.coordinates(), SketchBSpline_1.result())
245 Sketch_2.setCoincident(SketchPoint_20.coordinates(), SketchBSpline_1.result())
246 Sketch_2.setCoincident(SketchPoint_21.coordinates(), SketchBSpline_1.result())
247 Sketch_2.setCoincident(SketchPoint_22.coordinates(), SketchBSpline_1.result())
248 Sketch_2.setCoincident(SketchPoint_23.coordinates(), SketchBSpline_1.result())
249 Sketch_2.setCoincident(SketchPoint_24.coordinates(), SketchBSpline_1.result())
250 Sketch_2.setCoincident(SketchPoint_25.coordinates(), SketchBSpline_1.result())
251 Sketch_2.setCoincident(SketchPoint_26.coordinates(), SketchBSpline_1.result())
252 Sketch_2.setCoincident(SketchPoint_27.coordinates(), SketchBSpline_1.result())
253 Sketch_2.setCoincident(SketchPoint_28.coordinates(), SketchBSpline_1.result())
254 Sketch_2.setCoincident(SketchPoint_29.coordinates(), SketchBSpline_1.result())
255 Sketch_2.setCoincident(SketchPoint_30.coordinates(), SketchBSpline_1.result())
256 Sketch_2.setCoincident(SketchPoint_31.coordinates(), SketchBSpline_1.result())
257 Sketch_2.setCoincident(SketchPoint_32.coordinates(), SketchBSpline_1.result())
258 Sketch_2.setCoincident(SketchPoint_33.coordinates(), SketchBSpline_1.result())
259 Sketch_2.setCoincident(SketchPoint_34.coordinates(), SketchBSpline_1.result())
260 Sketch_2.setCoincident(SketchPoint_35.coordinates(), SketchBSpline_1.result())
261 Sketch_2.setCoincident(SketchPoint_36.coordinates(), SketchBSpline_1.result())
262 Sketch_2.setCoincident(SketchPoint_37.coordinates(), SketchBSpline_1.result())
263 Sketch_2.setCoincident(SketchPoint_38.coordinates(), SketchBSpline_1.result())
264 Sketch_2.setCoincident(SketchPoint_39.coordinates(), SketchBSpline_1.result())
265 Sketch_2.setCoincident(SketchPoint_40.coordinates(), SketchBSpline_1.result())
266 Sketch_2.setCoincident(SketchPoint_41.coordinates(), SketchBSpline_1.result())
267 Sketch_2.setCoincident(SketchPoint_42.coordinates(), SketchBSpline_1.result())
268 Sketch_2.setCoincident(SketchPoint_43.coordinates(), SketchBSpline_1.result())
269 Sketch_2.setCoincident(SketchPoint_44.coordinates(), SketchBSpline_1.result())
270 Sketch_2.setCoincident(SketchPoint_45.coordinates(), SketchBSpline_1.result())
271 Sketch_2.setCoincident(SketchPoint_46.coordinates(), SketchBSpline_1.result())
272 Sketch_2.setCoincident(SketchPoint_47.coordinates(), SketchBSpline_1.result())
273 Sketch_2.setCoincident(SketchPoint_48.coordinates(), SketchBSpline_1.result())
274 Sketch_2.setCoincident(SketchPoint_49.coordinates(), SketchBSpline_1.result())
275 Sketch_2.setCoincident(SketchPoint_50.coordinates(), SketchBSpline_1.result())
276 Sketch_2.setCoincident(SketchPoint_51.coordinates(), SketchBSpline_1.result())
277 Sketch_2.setCoincident(SketchPoint_52.coordinates(), SketchBSpline_1.result())
278 Sketch_2.setCoincident(SketchPoint_53.coordinates(), SketchBSpline_1.result())
279 Sketch_2.setCoincident(SketchPoint_54.coordinates(), SketchBSpline_1.result())
280 Sketch_2.setCoincident(SketchPoint_55.coordinates(), SketchBSpline_1.result())
281 Sketch_2.setCoincident(SketchPoint_56.coordinates(), SketchBSpline_1.endPoint())
282
283 ### Create SketchBSpline
284 SketchBSpline_2_poles = [(0, 0),
285                          (9.014752251795682e-05, 0.05451214529317949),
286                          (0.02532271171862411, 0.15579971775632),
287                          (0.1083431350565314, 0.2748971692083296),
288                          (0.2055162110916063, 0.3762476714704591),
289                          (0.3226869043516477, 0.4417758873955893),
290                          (0.4396106030030269, 0.5114950821406695),
291                          (0.5686113665746824, 0.5543315380381274),
292                          (0.7080109281378321, 0.6032643908580265),
293                          (0.8627418437966349, 0.6310529967664337),
294                          (1.038760710497959, 0.658153841986185),
295                          (1.22044861142381, 0.6481760900098785),
296                          (1.409221724680022, 0.652722089409154),
297                          (1.576578009046891, 0.6165884029638471),
298                          (1.750622207371201, 0.6101568179490738),
299                          (1.923498511038718, 0.5633997285939256),
300                          (2.101468637706691, 0.5160168977121142),
301                          (2.26756869845679, 0.4799182653430439),
302                          (2.415109663038519, 0.4380247760586003),
303                          (2.559003214216268, 0.3937264274604114),
304                          (2.717970834232034, 0.3510185960290838),
305                          (2.881379255194576, 0.2994130045705585),
306                          (3.044331614256414, 0.2554589350745441),
307                          (3.196663224032949, 0.2002205281261157),
308                          (3.35069087314937, 0.1557508658621287),
309                          (3.498630901739528, 0.1100749985226144),
310                          (3.626758629069007, 0.07354615416618171),
311                          (3.739427723854896, 0.03597634464461345),
312                          (3.813716543275791, 0.02837078095396758),
313                          (3.876876038873482, -0.02879298081488075),
314                          (3.682323148493558, 0.01775150116288641),
315                          (3.59938700895519, 0.01042701260276316),
316                          (3.435447203044759, 0.007149079513330239),
317                          (3.314513764134776, -0.02220772128681934),
318                          (3.182869424552179, -0.05232760411385898),
319                          (3.042896269666394, -0.100514554949581),
320                          (2.881422363667536, -0.1529357624091178),
321                          (2.715356347244389, -0.2233467064371046),
322                          (2.550824101050389, -0.2921770145749832),
323                          (2.405271709687486, -0.3565989754466863),
324                          (2.262755596020973, -0.4148284616349733),
325                          (2.100460548570712, -0.490254433165252),
326                          (1.907228846355101, -0.5500679945331017),
327                          (1.712805296160232, -0.627643180207678),
328                          (1.521165382362285, -0.66728412705947),
329                          (1.336949022926033, -0.6896647036620358),
330                          (1.155869424658838, -0.7022133877004375),
331                          (0.9881820016357848, -0.7038771014232653),
332                          (0.8328845467272493, -0.6739914151454918),
333                          (0.6860350214810707, -0.638614040735098),
334                          (0.5400698242489836, -0.6015646418675653),
335                          (0.4182804086275665, -0.5270754227323547),
336                          (0.302266907807943, -0.4533758717656259),
337                          (0.1873191972961234, -0.3753781603200299),
338                          (0.1039872761267704, -0.2741082432964857),
339                          (0.04328037620103962, -0.1770551690563165),
340                          (0.006988972040230026, -0.08835445483623842),
341                          (-0.0008115069204040052, -0.02871741534942534),
342                          (0, 0)
343                         ]
344 SketchBSpline_2 = Sketch_2.addSpline(degree = 3, poles = SketchBSpline_2_poles, weights = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], knots = [0, 0.01841877717868692, 0.03640857044229438, 0.0503319019589481, 0.06751503486217877, 0.08331688612829682, 0.09815550484724707, 0.1151806897007172, 0.1352802264972665, 0.1533760897133781, 0.1776976203324573, 0.1991289647725509, 0.2196078542088847, 0.2376437370925934, 0.2601966555045284, 0.2823272796231457, 0.3025579520551492, 0.3199893311119836, 0.3363024715699076, 0.3555578894595023, 0.3779215054846461, 0.3966205779803185, 0.4149403217914447, 0.43491563393835, 0.453062794308183, 0.4693759347661071, 0.4820291845192418, 0.4942387027706504, 0.496746319874324, 0.5066094106685624, 0.5312792857910991, 0.5454960476108249, 0.5602561299909423, 0.5757710096568369, 0.592796194510307, 0.6123837212555427, 0.6354982845523691, 0.6562477832463178, 0.6751789135618669, 0.6915216952124962, 0.7104486749233012, 0.7380977836510125, 0.762628078574017, 0.7839805979515587, 0.8067422887543781, 0.8279279725980087, 0.8479059568735401, 0.8655249471990413, 0.8833680589533851, 0.9012352967057089, 0.9180940098763235, 0.9332074432767975, 0.9497886416105058, 0.9666426179720728, 0.9788770179440802, 0.9900778977399243, 1], multiplicities = [4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4])
345 Sketch_2.setCoincident(SketchPoint_1.coordinates(), SketchBSpline_2.startPoint())
346 Sketch_2.setCoincident(SketchPoint_1.coordinates(), SketchBSpline_2.endPoint())
347 Sketch_2.setCoincident(SketchPoint_2.coordinates(), SketchBSpline_2.result())
348 Sketch_2.setCoincident(SketchPoint_3.coordinates(), SketchBSpline_2.result())
349 Sketch_2.setCoincident(SketchPoint_4.coordinates(), SketchBSpline_2.result())
350 Sketch_2.setCoincident(SketchPoint_5.coordinates(), SketchBSpline_2.result())
351 Sketch_2.setCoincident(SketchPoint_6.coordinates(), SketchBSpline_2.result())
352 Sketch_2.setCoincident(SketchPoint_7.coordinates(), SketchBSpline_2.result())
353 Sketch_2.setCoincident(SketchPoint_8.coordinates(), SketchBSpline_2.result())
354 Sketch_2.setCoincident(SketchPoint_9.coordinates(), SketchBSpline_2.result())
355 Sketch_2.setCoincident(SketchPoint_10.coordinates(), SketchBSpline_2.result())
356 Sketch_2.setCoincident(SketchPoint_11.coordinates(), SketchBSpline_2.result())
357 Sketch_2.setCoincident(SketchPoint_12.coordinates(), SketchBSpline_2.result())
358 Sketch_2.setCoincident(SketchPoint_13.coordinates(), SketchBSpline_2.result())
359 Sketch_2.setCoincident(SketchPoint_14.coordinates(), SketchBSpline_2.result())
360 Sketch_2.setCoincident(SketchPoint_15.coordinates(), SketchBSpline_2.result())
361 Sketch_2.setCoincident(SketchPoint_16.coordinates(), SketchBSpline_2.result())
362 Sketch_2.setCoincident(SketchPoint_17.coordinates(), SketchBSpline_2.result())
363 Sketch_2.setCoincident(SketchPoint_18.coordinates(), SketchBSpline_2.result())
364 Sketch_2.setCoincident(SketchPoint_19.coordinates(), SketchBSpline_2.result())
365 Sketch_2.setCoincident(SketchPoint_20.coordinates(), SketchBSpline_2.result())
366 Sketch_2.setCoincident(SketchPoint_21.coordinates(), SketchBSpline_2.result())
367 Sketch_2.setCoincident(SketchPoint_22.coordinates(), SketchBSpline_2.result())
368 Sketch_2.setCoincident(SketchPoint_23.coordinates(), SketchBSpline_2.result())
369 Sketch_2.setCoincident(SketchPoint_24.coordinates(), SketchBSpline_2.result())
370 Sketch_2.setCoincident(SketchPoint_25.coordinates(), SketchBSpline_2.result())
371 Sketch_2.setCoincident(SketchPoint_26.coordinates(), SketchBSpline_2.result())
372 Sketch_2.setCoincident(SketchPoint_27.coordinates(), SketchBSpline_2.result())
373 Sketch_2.setCoincident(SketchPoint_28.coordinates(), SketchBSpline_2.result())
374 Sketch_2.setCoincident(SketchPoint_29.coordinates(), SketchBSpline_2.result())
375 Sketch_2.setCoincident(SketchPoint_30.coordinates(), SketchBSpline_2.result())
376 Sketch_2.setCoincident(SketchPoint_31.coordinates(), SketchBSpline_2.result())
377 Sketch_2.setCoincident(SketchPoint_32.coordinates(), SketchBSpline_2.result())
378 Sketch_2.setCoincident(SketchPoint_33.coordinates(), SketchBSpline_2.result())
379 Sketch_2.setCoincident(SketchPoint_34.coordinates(), SketchBSpline_2.result())
380 Sketch_2.setCoincident(SketchPoint_35.coordinates(), SketchBSpline_2.result())
381 Sketch_2.setCoincident(SketchPoint_36.coordinates(), SketchBSpline_2.result())
382 Sketch_2.setCoincident(SketchPoint_37.coordinates(), SketchBSpline_2.result())
383 Sketch_2.setCoincident(SketchPoint_38.coordinates(), SketchBSpline_2.result())
384 Sketch_2.setCoincident(SketchPoint_39.coordinates(), SketchBSpline_2.result())
385 Sketch_2.setCoincident(SketchPoint_40.coordinates(), SketchBSpline_2.result())
386 Sketch_2.setCoincident(SketchPoint_41.coordinates(), SketchBSpline_2.result())
387 Sketch_2.setCoincident(SketchPoint_42.coordinates(), SketchBSpline_2.result())
388 Sketch_2.setCoincident(SketchPoint_43.coordinates(), SketchBSpline_2.result())
389 Sketch_2.setCoincident(SketchPoint_44.coordinates(), SketchBSpline_2.result())
390 Sketch_2.setCoincident(SketchPoint_45.coordinates(), SketchBSpline_2.result())
391 Sketch_2.setCoincident(SketchPoint_46.coordinates(), SketchBSpline_2.result())
392 Sketch_2.setCoincident(SketchPoint_47.coordinates(), SketchBSpline_2.result())
393 Sketch_2.setCoincident(SketchPoint_48.coordinates(), SketchBSpline_2.result())
394 Sketch_2.setCoincident(SketchPoint_49.coordinates(), SketchBSpline_2.result())
395 Sketch_2.setCoincident(SketchPoint_50.coordinates(), SketchBSpline_2.result())
396 Sketch_2.setCoincident(SketchPoint_51.coordinates(), SketchBSpline_2.result())
397 Sketch_2.setCoincident(SketchPoint_52.coordinates(), SketchBSpline_2.result())
398 Sketch_2.setCoincident(SketchPoint_53.coordinates(), SketchBSpline_2.result())
399 Sketch_2.setCoincident(SketchPoint_54.coordinates(), SketchBSpline_2.result())
400 Sketch_2.setCoincident(SketchPoint_55.coordinates(), SketchBSpline_2.result())
401 Sketch_2.setCoincident(SketchPoint_56.coordinates(), SketchBSpline_2.result())
402 Sketch_2.setCoincident(SketchPoint_1.coordinates(), SketchBSpline_2.startPoint())
403 Sketch_2.setCoincident(SketchPoint_2.coordinates(), SketchBSpline_2.result())
404 Sketch_2.setCoincident(SketchPoint_3.coordinates(), SketchBSpline_2.result())
405 Sketch_2.setCoincident(SketchPoint_4.coordinates(), SketchBSpline_2.result())
406 Sketch_2.setCoincident(SketchPoint_5.coordinates(), SketchBSpline_2.result())
407 Sketch_2.setCoincident(SketchPoint_6.coordinates(), SketchBSpline_2.result())
408 Sketch_2.setCoincident(SketchPoint_7.coordinates(), SketchBSpline_2.result())
409 Sketch_2.setCoincident(SketchPoint_8.coordinates(), SketchBSpline_2.result())
410 Sketch_2.setCoincident(SketchPoint_9.coordinates(), SketchBSpline_2.result())
411 Sketch_2.setCoincident(SketchPoint_10.coordinates(), SketchBSpline_2.result())
412 Sketch_2.setCoincident(SketchPoint_11.coordinates(), SketchBSpline_2.result())
413 Sketch_2.setCoincident(SketchPoint_12.coordinates(), SketchBSpline_2.result())
414 Sketch_2.setCoincident(SketchPoint_13.coordinates(), SketchBSpline_2.result())
415 Sketch_2.setCoincident(SketchPoint_14.coordinates(), SketchBSpline_2.result())
416 Sketch_2.setCoincident(SketchPoint_15.coordinates(), SketchBSpline_2.result())
417 Sketch_2.setCoincident(SketchPoint_16.coordinates(), SketchBSpline_2.result())
418 Sketch_2.setCoincident(SketchPoint_17.coordinates(), SketchBSpline_2.result())
419 Sketch_2.setCoincident(SketchPoint_18.coordinates(), SketchBSpline_2.result())
420 Sketch_2.setCoincident(SketchPoint_19.coordinates(), SketchBSpline_2.result())
421 Sketch_2.setCoincident(SketchPoint_20.coordinates(), SketchBSpline_2.result())
422 Sketch_2.setCoincident(SketchPoint_21.coordinates(), SketchBSpline_2.result())
423 Sketch_2.setCoincident(SketchPoint_22.coordinates(), SketchBSpline_2.result())
424 Sketch_2.setCoincident(SketchPoint_23.coordinates(), SketchBSpline_2.result())
425 Sketch_2.setCoincident(SketchPoint_24.coordinates(), SketchBSpline_2.result())
426 Sketch_2.setCoincident(SketchPoint_25.coordinates(), SketchBSpline_2.result())
427 Sketch_2.setCoincident(SketchPoint_26.coordinates(), SketchBSpline_2.result())
428 Sketch_2.setCoincident(SketchPoint_27.coordinates(), SketchBSpline_2.result())
429 Sketch_2.setCoincident(SketchPoint_28.coordinates(), SketchBSpline_2.result())
430 Sketch_2.setCoincident(SketchPoint_29.coordinates(), SketchBSpline_2.result())
431 Sketch_2.setCoincident(SketchPoint_30.coordinates(), SketchBSpline_2.result())
432 Sketch_2.setCoincident(SketchPoint_31.coordinates(), SketchBSpline_2.result())
433 Sketch_2.setCoincident(SketchPoint_32.coordinates(), SketchBSpline_2.result())
434 Sketch_2.setCoincident(SketchPoint_33.coordinates(), SketchBSpline_2.result())
435 Sketch_2.setCoincident(SketchPoint_34.coordinates(), SketchBSpline_2.result())
436 Sketch_2.setCoincident(SketchPoint_35.coordinates(), SketchBSpline_2.result())
437 Sketch_2.setCoincident(SketchPoint_36.coordinates(), SketchBSpline_2.result())
438 Sketch_2.setCoincident(SketchPoint_37.coordinates(), SketchBSpline_2.result())
439 Sketch_2.setCoincident(SketchPoint_38.coordinates(), SketchBSpline_2.result())
440 Sketch_2.setCoincident(SketchPoint_39.coordinates(), SketchBSpline_2.result())
441 Sketch_2.setCoincident(SketchPoint_40.coordinates(), SketchBSpline_2.result())
442 Sketch_2.setCoincident(SketchPoint_41.coordinates(), SketchBSpline_2.result())
443 Sketch_2.setCoincident(SketchPoint_42.coordinates(), SketchBSpline_2.result())
444 Sketch_2.setCoincident(SketchPoint_43.coordinates(), SketchBSpline_2.result())
445 Sketch_2.setCoincident(SketchPoint_44.coordinates(), SketchBSpline_2.result())
446 Sketch_2.setCoincident(SketchPoint_45.coordinates(), SketchBSpline_2.result())
447 Sketch_2.setCoincident(SketchPoint_46.coordinates(), SketchBSpline_2.result())
448 Sketch_2.setCoincident(SketchPoint_47.coordinates(), SketchBSpline_2.result())
449 Sketch_2.setCoincident(SketchPoint_48.coordinates(), SketchBSpline_2.result())
450 Sketch_2.setCoincident(SketchPoint_49.coordinates(), SketchBSpline_2.result())
451 Sketch_2.setCoincident(SketchPoint_50.coordinates(), SketchBSpline_2.result())
452 Sketch_2.setCoincident(SketchPoint_51.coordinates(), SketchBSpline_2.result())
453 Sketch_2.setCoincident(SketchPoint_52.coordinates(), SketchBSpline_2.result())
454 Sketch_2.setCoincident(SketchPoint_53.coordinates(), SketchBSpline_2.result())
455 Sketch_2.setCoincident(SketchPoint_54.coordinates(), SketchBSpline_2.result())
456 Sketch_2.setCoincident(SketchPoint_55.coordinates(), SketchBSpline_2.result())
457 Sketch_2.setCoincident(SketchPoint_1.coordinates(), SketchBSpline_2.endPoint())
458
459 ### Create SketchOffset
460 SketchOffset_1 = Sketch_2.addOffset([SketchBSpline_2.result()], 0.055, False)
461 [SketchBSpline_3, SketchBSpline_4, SketchBSpline_5, SketchBSpline_6, SketchBSpline_7, SketchBSpline_8, SketchBSpline_9, SketchBSpline_10, SketchBSpline_11, SketchBSpline_12, SketchBSpline_13, SketchBSpline_14, SketchBSpline_15, SketchBSpline_16, SketchBSpline_17, SketchBSpline_18, SketchBSpline_19, SketchBSpline_20, SketchBSpline_21, SketchBSpline_22, SketchBSpline_23, SketchBSpline_24, SketchBSpline_25, SketchBSpline_26, SketchBSpline_27, SketchBSpline_28, SketchBSpline_29, SketchBSpline_30, SketchBSpline_31, SketchBSpline_32, SketchBSpline_33, SketchBSpline_34, SketchBSpline_35, SketchBSpline_36, SketchBSpline_37, SketchBSpline_38, SketchBSpline_39, SketchBSpline_40, SketchBSpline_41, SketchBSpline_42, SketchBSpline_43, SketchBSpline_44, SketchBSpline_45, SketchBSpline_46, SketchBSpline_47, SketchBSpline_48, SketchBSpline_49, SketchBSpline_50, SketchBSpline_51, SketchBSpline_52, SketchBSpline_53, SketchBSpline_54, SketchBSpline_55, SketchBSpline_56, SketchBSpline_57, SketchBSpline_58, SketchBSpline_59, SketchBSpline_60, SketchBSpline_61, SketchBSpline_62, SketchBSpline_63] = SketchOffset_1.offset()
462 model.do()
463
464 ### Create Wire
465 Wire_1 = model.addWire(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], False)
466
467 model.end()
468
469 from GeomAPI import *
470
471 model.testNbResults(Wire_1, 2)
472 model.testNbSubResults(Wire_1, [0, 0])
473 model.testNbSubShapes(Wire_1, GeomAPI_Shape.SOLID, [0, 0])
474 model.testNbSubShapes(Wire_1, GeomAPI_Shape.FACE, [0, 0])
475 model.testNbSubShapes(Wire_1, GeomAPI_Shape.EDGE, [2, 61])
476 model.testNbSubShapes(Wire_1, GeomAPI_Shape.VERTEX, [4, 122])
477
478 assert(model.checkPythonDump())