Salome HOME
b645e739321253e8dba95c82a825fa0fc56a5d49
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_ExtrusionBoolean.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesAPI_Extrusion.cpp
4 // Created:     09 June 2016
5 // Author:      Dmitry Bobylev
6
7 #include "FeaturesAPI_ExtrusionBoolean.h"
8
9 #include <ModelHighAPI_Double.h>
10 #include <ModelHighAPI_Tools.h>
11
12 //==================================================================================================
13 FeaturesAPI_ExtrusionBoolean::FeaturesAPI_ExtrusionBoolean(const std::shared_ptr<ModelAPI_Feature>& theFeature)
14 : ModelHighAPI_Interface(theFeature)
15 {
16 }
17
18 //==================================================================================================
19 FeaturesAPI_ExtrusionBoolean::~FeaturesAPI_ExtrusionBoolean()
20 {
21 }
22
23 //==================================================================================================
24 void FeaturesAPI_ExtrusionBoolean::setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects)
25 {
26   fillAttribute(theBaseObjects, mybaseObjects);
27
28   execute();
29 }
30
31 //==================================================================================================
32 void FeaturesAPI_ExtrusionBoolean::setDirection(const ModelHighAPI_Selection& theDirection)
33 {
34   fillAttribute(theDirection, mydirection);
35
36   execute();
37 }
38
39 //==================================================================================================
40 void FeaturesAPI_ExtrusionBoolean::setSizes(const ModelHighAPI_Double& theToSize,
41                                             const ModelHighAPI_Double& theFromSize)
42 {
43   fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
44   fillAttribute(theToSize, mytoSize);
45   fillAttribute(theFromSize, myfromSize);
46
47   execute();
48 }
49
50 //==================================================================================================
51 void FeaturesAPI_ExtrusionBoolean::setSize(const ModelHighAPI_Double& theSize)
52 {
53   fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
54   fillAttribute(theSize, mytoSize);
55   fillAttribute(ModelHighAPI_Double(), myfromSize);
56
57   execute();
58 }
59
60 //==================================================================================================
61 void FeaturesAPI_ExtrusionBoolean::setPlanesAndOffsets(const ModelHighAPI_Selection& theToObject,
62                                                        const ModelHighAPI_Double& theToOffset,
63                                                        const ModelHighAPI_Selection& theFromObject,
64                                                        const ModelHighAPI_Double& theFromOffset)
65 {
66   fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
67   fillAttribute(theToObject, mytoObject);
68   fillAttribute(theToOffset, mytoOffset);
69   fillAttribute(theFromObject, myfromObject);
70   fillAttribute(theFromOffset, myfromOffset);
71
72   execute();
73 }
74
75 //==================================================================================================
76 void FeaturesAPI_ExtrusionBoolean::setBooleanObjects(const std::list<ModelHighAPI_Selection>& theBooleanObjects)
77 {
78   fillAttribute(theBooleanObjects, mybooleanObjects);
79
80   execute();
81 }
82
83 //==================================================================================================
84 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature)
85 : FeaturesAPI_ExtrusionBoolean(theFeature)
86 {
87   initialize();
88 }
89
90 //==================================================================================================
91 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
92                                                    const std::list<ModelHighAPI_Selection>& theBaseObjects,
93                                                    const ModelHighAPI_Double& theSize,
94                                                    const std::list<ModelHighAPI_Selection>& theBooleanObjects)
95 : FeaturesAPI_ExtrusionBoolean(theFeature)
96 {
97   if(initialize()) {
98     fillAttribute(theBaseObjects, mybaseObjects);
99     fillAttribute(theSize, mytoSize);
100     fillAttribute(ModelHighAPI_Double(), myfromSize);
101     setBooleanObjects(theBooleanObjects);
102   }
103 }
104
105 //==================================================================================================
106 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
107                                                    const std::list<ModelHighAPI_Selection>& theBaseObjects,
108                                                    const ModelHighAPI_Selection& theDirection,
109                                                    const ModelHighAPI_Double& theSize,
110                                                    const std::list<ModelHighAPI_Selection>& theBooleanObjects)
111 : FeaturesAPI_ExtrusionBoolean(theFeature)
112 {
113   if(initialize()) {
114     fillAttribute(theBaseObjects, mybaseObjects);
115     fillAttribute(theDirection, mydirection);
116     fillAttribute(theSize, mytoSize);
117     fillAttribute(ModelHighAPI_Double(), myfromSize);
118     setBooleanObjects(theBooleanObjects);
119   }
120 }
121
122 //==================================================================================================
123 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
124                                                    const std::list<ModelHighAPI_Selection>& theBaseObjects,
125                                                    const ModelHighAPI_Double& theToSize,
126                                                    const ModelHighAPI_Double& theFromSize,
127                                                    const std::list<ModelHighAPI_Selection>& theBooleanObjects)
128 : FeaturesAPI_ExtrusionBoolean(theFeature)
129 {
130   if(initialize()) {
131     fillAttribute(theBaseObjects, mybaseObjects);
132     fillAttribute(theToSize, mytoSize);
133     fillAttribute(theFromSize, myfromSize);
134     setBooleanObjects(theBooleanObjects);
135   }
136 }
137
138 //==================================================================================================
139 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
140                                                    const std::list<ModelHighAPI_Selection>& theBaseObjects,
141                                                    const ModelHighAPI_Selection& theDirection,
142                                                    const ModelHighAPI_Double& theToSize,
143                                                    const ModelHighAPI_Double& theFromSize,
144                                                    const std::list<ModelHighAPI_Selection>& theBooleanObjects)
145 : FeaturesAPI_ExtrusionBoolean(theFeature)
146 {
147   if(initialize()) {
148     fillAttribute(theBaseObjects, mybaseObjects);
149     fillAttribute(theDirection, mydirection);
150     fillAttribute(theToSize, mytoSize);
151     fillAttribute(theFromSize, myfromSize);
152     setBooleanObjects(theBooleanObjects);
153   }
154 }
155
156 //==================================================================================================
157 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
158                                                    const std::list<ModelHighAPI_Selection>& theBaseObjects,
159                                                    const ModelHighAPI_Selection& theToObject,
160                                                    const ModelHighAPI_Double& theToOffset,
161                                                    const ModelHighAPI_Selection& theFromObject,
162                                                    const ModelHighAPI_Double& theFromOffset,
163                                                    const std::list<ModelHighAPI_Selection>& theBooleanObjects)
164 : FeaturesAPI_ExtrusionBoolean(theFeature)
165 {
166   if(initialize()) {
167     fillAttribute(theBaseObjects, mybaseObjects);
168     fillAttribute(theToObject, mytoObject);
169     fillAttribute(theToOffset, mytoOffset);
170     fillAttribute(theFromObject, myfromObject);
171     fillAttribute(theFromOffset, myfromOffset);
172     setBooleanObjects(theBooleanObjects);
173   }
174 }
175
176 //==================================================================================================
177 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
178                                                    const std::list<ModelHighAPI_Selection>& theBaseObjects,
179                                                    const ModelHighAPI_Selection& theDirection,
180                                                    const ModelHighAPI_Selection& theToObject,
181                                                    const ModelHighAPI_Double& theToOffset,
182                                                    const ModelHighAPI_Selection& theFromObject,
183                                                    const ModelHighAPI_Double& theFromOffset,
184                                                    const std::list<ModelHighAPI_Selection>& theBooleanObjects)
185 : FeaturesAPI_ExtrusionBoolean(theFeature)
186 {
187   if(initialize()) {
188     fillAttribute(theBaseObjects, mybaseObjects);
189     fillAttribute(theDirection, mydirection);
190     fillAttribute(theToObject, mytoObject);
191     fillAttribute(theToOffset, mytoOffset);
192     fillAttribute(theFromObject, myfromObject);
193     fillAttribute(theFromOffset, myfromOffset);
194     setBooleanObjects(theBooleanObjects);
195   }
196 }
197
198 // TODO(spo): make add* as static functions of the class
199 //==================================================================================================
200 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
201                                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
202                                 const ModelHighAPI_Double& theSize,
203                                 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
204 {
205   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
206   return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theSize, theBooleanObjects));
207 }
208
209 //==================================================================================================
210 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
211                                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
212                                 const ModelHighAPI_Selection& theDirection,
213                                 const ModelHighAPI_Double& theSize,
214                                 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
215 {
216   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
217   return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theDirection, theSize, theBooleanObjects));
218 }
219
220 //==================================================================================================
221 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
222                                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
223                                 const ModelHighAPI_Double& theToSize,
224                                 const ModelHighAPI_Double& theFromSize,
225                                 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
226 {
227   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
228   return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theToSize, theFromSize, theBooleanObjects));
229 }
230
231 //==================================================================================================
232 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
233                                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
234                                 const ModelHighAPI_Selection& theDirection,
235                                 const ModelHighAPI_Double& theToSize,
236                                 const ModelHighAPI_Double& theFromSize,
237                                 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
238 {
239   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
240   return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
241                                                       theBaseObjects,
242                                                       theDirection,
243                                                       theToSize,
244                                                       theFromSize,
245                                                       theBooleanObjects));
246 }
247
248 //==================================================================================================
249 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
250                                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
251                                 const ModelHighAPI_Selection& theToObject,
252                                 const ModelHighAPI_Double& theToOffset,
253                                 const ModelHighAPI_Selection& theFromObject,
254                                 const ModelHighAPI_Double& theFromOffset,
255                                 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
256 {
257   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
258   return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
259                                                       theBaseObjects,
260                                                       theToObject,
261                                                       theToOffset,
262                                                       theFromObject,
263                                                       theFromOffset,
264                                                       theBooleanObjects));
265 }
266
267 //==================================================================================================
268 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
269                                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
270                                 const ModelHighAPI_Selection& theDirection,
271                                 const ModelHighAPI_Selection& theToObject,
272                                 const ModelHighAPI_Double& theToOffset,
273                                 const ModelHighAPI_Selection& theFromObject,
274                                 const ModelHighAPI_Double& theFromOffset,
275                                 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
276 {
277   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
278   return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
279                                                       theBaseObjects,
280                                                       theDirection,
281                                                       theToObject,
282                                                       theToOffset,
283                                                       theFromObject,
284                                                       theFromOffset,
285                                                       theBooleanObjects));
286 }
287
288
289 //==================================================================================================
290 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature)
291 : FeaturesAPI_ExtrusionBoolean(theFeature)
292 {
293   initialize();
294 }
295
296 //==================================================================================================
297 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
298                                                      const std::list<ModelHighAPI_Selection>& theBaseObjects,
299                                                      const ModelHighAPI_Double& theSize,
300                                                      const std::list<ModelHighAPI_Selection>& theBooleanObjects)
301 : FeaturesAPI_ExtrusionBoolean(theFeature)
302 {
303   if(initialize()) {
304     fillAttribute(theBaseObjects, mybaseObjects);
305     fillAttribute(theSize, mytoSize);
306     fillAttribute(ModelHighAPI_Double(), myfromSize);
307     setBooleanObjects(theBooleanObjects);
308   }
309 }
310
311 //==================================================================================================
312 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
313                                                      const std::list<ModelHighAPI_Selection>& theBaseObjects,
314                                                      const ModelHighAPI_Selection& theDirection,
315                                                      const ModelHighAPI_Double& theSize,
316                                                      const std::list<ModelHighAPI_Selection>& theBooleanObjects)
317 : FeaturesAPI_ExtrusionBoolean(theFeature)
318 {
319   if(initialize()) {
320     fillAttribute(theBaseObjects, mybaseObjects);
321     fillAttribute(theDirection, mydirection);
322     fillAttribute(theSize, mytoSize);
323     fillAttribute(ModelHighAPI_Double(), myfromSize);
324     setBooleanObjects(theBooleanObjects);
325   }
326 }
327
328 //==================================================================================================
329 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
330                                                      const std::list<ModelHighAPI_Selection>& theBaseObjects,
331                                                      const ModelHighAPI_Double& theToSize,
332                                                      const ModelHighAPI_Double& theFromSize,
333                                                      const std::list<ModelHighAPI_Selection>& theBooleanObjects)
334 : FeaturesAPI_ExtrusionBoolean(theFeature)
335 {
336   if(initialize()) {
337     fillAttribute(theBaseObjects, mybaseObjects);
338     fillAttribute(theToSize, mytoSize);
339     fillAttribute(theFromSize, myfromSize);
340     setBooleanObjects(theBooleanObjects);
341   }
342 }
343
344 //==================================================================================================
345 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
346                                                      const std::list<ModelHighAPI_Selection>& theBaseObjects,
347                                                      const ModelHighAPI_Selection& theDirection,
348                                                      const ModelHighAPI_Double& theToSize,
349                                                      const ModelHighAPI_Double& theFromSize,
350                                                      const std::list<ModelHighAPI_Selection>& theBooleanObjects)
351 : FeaturesAPI_ExtrusionBoolean(theFeature)
352 {
353   if(initialize()) {
354     fillAttribute(theBaseObjects, mybaseObjects);
355     fillAttribute(theDirection, mydirection);
356     fillAttribute(theToSize, mytoSize);
357     fillAttribute(theFromSize, myfromSize);
358     setBooleanObjects(theBooleanObjects);
359   }
360 }
361
362 //==================================================================================================
363 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
364                                                      const std::list<ModelHighAPI_Selection>& theBaseObjects,
365                                                      const ModelHighAPI_Selection& theToObject,
366                                                      const ModelHighAPI_Double& theToOffset,
367                                                      const ModelHighAPI_Selection& theFromObject,
368                                                      const ModelHighAPI_Double& theFromOffset,
369                                                      const std::list<ModelHighAPI_Selection>& theBooleanObjects)
370 : FeaturesAPI_ExtrusionBoolean(theFeature)
371 {
372   if(initialize()) {
373     fillAttribute(theBaseObjects, mybaseObjects);
374     fillAttribute(theToObject, mytoObject);
375     fillAttribute(theToOffset, mytoOffset);
376     fillAttribute(theFromObject, myfromObject);
377     fillAttribute(theFromOffset, myfromOffset);
378     setBooleanObjects(theBooleanObjects);
379   }
380 }
381
382 //==================================================================================================
383 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
384                                                      const std::list<ModelHighAPI_Selection>& theBaseObjects,
385                                                      const ModelHighAPI_Selection& theDirection,
386                                                      const ModelHighAPI_Selection& theToObject,
387                                                      const ModelHighAPI_Double& theToOffset,
388                                                      const ModelHighAPI_Selection& theFromObject,
389                                                      const ModelHighAPI_Double& theFromOffset,
390                                                      const std::list<ModelHighAPI_Selection>& theBooleanObjects)
391 : FeaturesAPI_ExtrusionBoolean(theFeature)
392 {
393   if(initialize()) {
394     fillAttribute(theBaseObjects, mybaseObjects);
395     fillAttribute(theDirection, mydirection);
396     fillAttribute(theToObject, mytoObject);
397     fillAttribute(theToOffset, mytoOffset);
398     fillAttribute(theFromObject, myfromObject);
399     fillAttribute(theFromOffset, myfromOffset);
400     setBooleanObjects(theBooleanObjects);
401   }
402 }
403
404 // TODO(spo): make add* as static functions of the class
405 //==================================================================================================
406 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
407                                   const std::list<ModelHighAPI_Selection>& theBaseObjects,
408                                   const ModelHighAPI_Double& theSize,
409                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
410 {
411   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
412   return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theSize, theBooleanObjects));
413 }
414
415 //==================================================================================================
416 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
417                                   const std::list<ModelHighAPI_Selection>& theBaseObjects,
418                                   const ModelHighAPI_Selection& theDirection,
419                                   const ModelHighAPI_Double& theSize,
420                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
421 {
422   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
423   return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theDirection, theSize, theBooleanObjects));
424 }
425
426 //==================================================================================================
427 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
428                                   const std::list<ModelHighAPI_Selection>& theBaseObjects,
429                                   const ModelHighAPI_Double& theToSize,
430                                   const ModelHighAPI_Double& theFromSize,
431                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
432 {
433   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
434   return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theToSize, theFromSize, theBooleanObjects));
435 }
436
437 //==================================================================================================
438 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
439                                   const std::list<ModelHighAPI_Selection>& theBaseObjects,
440                                   const ModelHighAPI_Selection& theDirection,
441                                   const ModelHighAPI_Double& theToSize,
442                                   const ModelHighAPI_Double& theFromSize,
443                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
444 {
445   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
446   return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
447                                                         theBaseObjects,
448                                                         theDirection,
449                                                         theToSize,
450                                                         theFromSize,
451                                                         theBooleanObjects));
452 }
453
454 //==================================================================================================
455 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
456                                   const std::list<ModelHighAPI_Selection>& theBaseObjects,
457                                   const ModelHighAPI_Selection& theToObject,
458                                   const ModelHighAPI_Double& theToOffset,
459                                   const ModelHighAPI_Selection& theFromObject,
460                                   const ModelHighAPI_Double& theFromOffset,
461                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
462 {
463   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
464   return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
465                                                         theBaseObjects,
466                                                         theToObject,
467                                                         theToOffset,
468                                                         theFromObject,
469                                                         theFromOffset,
470                                                         theBooleanObjects));
471 }
472
473 //==================================================================================================
474 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
475                                   const std::list<ModelHighAPI_Selection>& theBaseObjects,
476                                   const ModelHighAPI_Selection& theDirection,
477                                   const ModelHighAPI_Selection& theToObject,
478                                   const ModelHighAPI_Double& theToOffset,
479                                   const ModelHighAPI_Selection& theFromObject,
480                                   const ModelHighAPI_Double& theFromOffset,
481                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
482 {
483   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
484   return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
485                                                         theBaseObjects,
486                                                         theDirection,
487                                                         theToObject,
488                                                         theToOffset,
489                                                         theFromObject,
490                                                         theFromOffset,
491                                                         theBooleanObjects));
492 }