Salome HOME
Remove some TODOs
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_ExtrusionBoolean.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesAPI_ExtrusionBoolean.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 //==================================================================================================
199 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
200                                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
201                                 const ModelHighAPI_Double& theSize,
202                                 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
203 {
204   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
205   return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theSize, theBooleanObjects));
206 }
207
208 //==================================================================================================
209 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
210                                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
211                                 const ModelHighAPI_Selection& theDirection,
212                                 const ModelHighAPI_Double& theSize,
213                                 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
214 {
215   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
216   return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theDirection, theSize, theBooleanObjects));
217 }
218
219 //==================================================================================================
220 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
221                                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
222                                 const ModelHighAPI_Double& theToSize,
223                                 const ModelHighAPI_Double& theFromSize,
224                                 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
225 {
226   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
227   return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theToSize, theFromSize, theBooleanObjects));
228 }
229
230 //==================================================================================================
231 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
232                                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
233                                 const ModelHighAPI_Selection& theDirection,
234                                 const ModelHighAPI_Double& theToSize,
235                                 const ModelHighAPI_Double& theFromSize,
236                                 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
237 {
238   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
239   return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
240                                                       theBaseObjects,
241                                                       theDirection,
242                                                       theToSize,
243                                                       theFromSize,
244                                                       theBooleanObjects));
245 }
246
247 //==================================================================================================
248 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
249                                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
250                                 const ModelHighAPI_Selection& theToObject,
251                                 const ModelHighAPI_Double& theToOffset,
252                                 const ModelHighAPI_Selection& theFromObject,
253                                 const ModelHighAPI_Double& theFromOffset,
254                                 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
255 {
256   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
257   return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
258                                                       theBaseObjects,
259                                                       theToObject,
260                                                       theToOffset,
261                                                       theFromObject,
262                                                       theFromOffset,
263                                                       theBooleanObjects));
264 }
265
266 //==================================================================================================
267 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
268                                 const std::list<ModelHighAPI_Selection>& theBaseObjects,
269                                 const ModelHighAPI_Selection& theDirection,
270                                 const ModelHighAPI_Selection& theToObject,
271                                 const ModelHighAPI_Double& theToOffset,
272                                 const ModelHighAPI_Selection& theFromObject,
273                                 const ModelHighAPI_Double& theFromOffset,
274                                 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
275 {
276   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
277   return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
278                                                       theBaseObjects,
279                                                       theDirection,
280                                                       theToObject,
281                                                       theToOffset,
282                                                       theFromObject,
283                                                       theFromOffset,
284                                                       theBooleanObjects));
285 }
286
287
288 //==================================================================================================
289 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature)
290 : FeaturesAPI_ExtrusionBoolean(theFeature)
291 {
292   initialize();
293 }
294
295 //==================================================================================================
296 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
297                                                      const std::list<ModelHighAPI_Selection>& theBaseObjects,
298                                                      const ModelHighAPI_Double& theSize,
299                                                      const std::list<ModelHighAPI_Selection>& theBooleanObjects)
300 : FeaturesAPI_ExtrusionBoolean(theFeature)
301 {
302   if(initialize()) {
303     fillAttribute(theBaseObjects, mybaseObjects);
304     fillAttribute(theSize, mytoSize);
305     fillAttribute(ModelHighAPI_Double(), myfromSize);
306     setBooleanObjects(theBooleanObjects);
307   }
308 }
309
310 //==================================================================================================
311 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
312                                                      const std::list<ModelHighAPI_Selection>& theBaseObjects,
313                                                      const ModelHighAPI_Selection& theDirection,
314                                                      const ModelHighAPI_Double& theSize,
315                                                      const std::list<ModelHighAPI_Selection>& theBooleanObjects)
316 : FeaturesAPI_ExtrusionBoolean(theFeature)
317 {
318   if(initialize()) {
319     fillAttribute(theBaseObjects, mybaseObjects);
320     fillAttribute(theDirection, mydirection);
321     fillAttribute(theSize, mytoSize);
322     fillAttribute(ModelHighAPI_Double(), myfromSize);
323     setBooleanObjects(theBooleanObjects);
324   }
325 }
326
327 //==================================================================================================
328 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
329                                                      const std::list<ModelHighAPI_Selection>& theBaseObjects,
330                                                      const ModelHighAPI_Double& theToSize,
331                                                      const ModelHighAPI_Double& theFromSize,
332                                                      const std::list<ModelHighAPI_Selection>& theBooleanObjects)
333 : FeaturesAPI_ExtrusionBoolean(theFeature)
334 {
335   if(initialize()) {
336     fillAttribute(theBaseObjects, mybaseObjects);
337     fillAttribute(theToSize, mytoSize);
338     fillAttribute(theFromSize, myfromSize);
339     setBooleanObjects(theBooleanObjects);
340   }
341 }
342
343 //==================================================================================================
344 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
345                                                      const std::list<ModelHighAPI_Selection>& theBaseObjects,
346                                                      const ModelHighAPI_Selection& theDirection,
347                                                      const ModelHighAPI_Double& theToSize,
348                                                      const ModelHighAPI_Double& theFromSize,
349                                                      const std::list<ModelHighAPI_Selection>& theBooleanObjects)
350 : FeaturesAPI_ExtrusionBoolean(theFeature)
351 {
352   if(initialize()) {
353     fillAttribute(theBaseObjects, mybaseObjects);
354     fillAttribute(theDirection, mydirection);
355     fillAttribute(theToSize, mytoSize);
356     fillAttribute(theFromSize, myfromSize);
357     setBooleanObjects(theBooleanObjects);
358   }
359 }
360
361 //==================================================================================================
362 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
363                                                      const std::list<ModelHighAPI_Selection>& theBaseObjects,
364                                                      const ModelHighAPI_Selection& theToObject,
365                                                      const ModelHighAPI_Double& theToOffset,
366                                                      const ModelHighAPI_Selection& theFromObject,
367                                                      const ModelHighAPI_Double& theFromOffset,
368                                                      const std::list<ModelHighAPI_Selection>& theBooleanObjects)
369 : FeaturesAPI_ExtrusionBoolean(theFeature)
370 {
371   if(initialize()) {
372     fillAttribute(theBaseObjects, mybaseObjects);
373     fillAttribute(theToObject, mytoObject);
374     fillAttribute(theToOffset, mytoOffset);
375     fillAttribute(theFromObject, myfromObject);
376     fillAttribute(theFromOffset, myfromOffset);
377     setBooleanObjects(theBooleanObjects);
378   }
379 }
380
381 //==================================================================================================
382 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
383                                                      const std::list<ModelHighAPI_Selection>& theBaseObjects,
384                                                      const ModelHighAPI_Selection& theDirection,
385                                                      const ModelHighAPI_Selection& theToObject,
386                                                      const ModelHighAPI_Double& theToOffset,
387                                                      const ModelHighAPI_Selection& theFromObject,
388                                                      const ModelHighAPI_Double& theFromOffset,
389                                                      const std::list<ModelHighAPI_Selection>& theBooleanObjects)
390 : FeaturesAPI_ExtrusionBoolean(theFeature)
391 {
392   if(initialize()) {
393     fillAttribute(theBaseObjects, mybaseObjects);
394     fillAttribute(theDirection, mydirection);
395     fillAttribute(theToObject, mytoObject);
396     fillAttribute(theToOffset, mytoOffset);
397     fillAttribute(theFromObject, myfromObject);
398     fillAttribute(theFromOffset, myfromOffset);
399     setBooleanObjects(theBooleanObjects);
400   }
401 }
402
403 //==================================================================================================
404 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
405                                   const std::list<ModelHighAPI_Selection>& theBaseObjects,
406                                   const ModelHighAPI_Double& theSize,
407                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
408 {
409   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
410   return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theSize, theBooleanObjects));
411 }
412
413 //==================================================================================================
414 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
415                                   const std::list<ModelHighAPI_Selection>& theBaseObjects,
416                                   const ModelHighAPI_Selection& theDirection,
417                                   const ModelHighAPI_Double& theSize,
418                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
419 {
420   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
421   return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theDirection, theSize, theBooleanObjects));
422 }
423
424 //==================================================================================================
425 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
426                                   const std::list<ModelHighAPI_Selection>& theBaseObjects,
427                                   const ModelHighAPI_Double& theToSize,
428                                   const ModelHighAPI_Double& theFromSize,
429                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
430 {
431   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
432   return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theToSize, theFromSize, theBooleanObjects));
433 }
434
435 //==================================================================================================
436 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
437                                   const std::list<ModelHighAPI_Selection>& theBaseObjects,
438                                   const ModelHighAPI_Selection& theDirection,
439                                   const ModelHighAPI_Double& theToSize,
440                                   const ModelHighAPI_Double& theFromSize,
441                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
442 {
443   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
444   return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
445                                                         theBaseObjects,
446                                                         theDirection,
447                                                         theToSize,
448                                                         theFromSize,
449                                                         theBooleanObjects));
450 }
451
452 //==================================================================================================
453 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
454                                   const std::list<ModelHighAPI_Selection>& theBaseObjects,
455                                   const ModelHighAPI_Selection& theToObject,
456                                   const ModelHighAPI_Double& theToOffset,
457                                   const ModelHighAPI_Selection& theFromObject,
458                                   const ModelHighAPI_Double& theFromOffset,
459                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
460 {
461   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
462   return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
463                                                         theBaseObjects,
464                                                         theToObject,
465                                                         theToOffset,
466                                                         theFromObject,
467                                                         theFromOffset,
468                                                         theBooleanObjects));
469 }
470
471 //==================================================================================================
472 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
473                                   const std::list<ModelHighAPI_Selection>& theBaseObjects,
474                                   const ModelHighAPI_Selection& theDirection,
475                                   const ModelHighAPI_Selection& theToObject,
476                                   const ModelHighAPI_Double& theToOffset,
477                                   const ModelHighAPI_Selection& theFromObject,
478                                   const ModelHighAPI_Double& theFromOffset,
479                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
480 {
481   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
482   return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
483                                                         theBaseObjects,
484                                                         theDirection,
485                                                         theToObject,
486                                                         theToOffset,
487                                                         theFromObject,
488                                                         theFromOffset,
489                                                         theBooleanObjects));
490 }