1 // Copyright (C) 2014-2019 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include "FeaturesAPI_ExtrusionBoolean.h"
22 #include <ModelHighAPI_Double.h>
23 #include <ModelHighAPI_Dumper.h>
24 #include <ModelHighAPI_Reference.h>
25 #include <ModelHighAPI_Tools.h>
27 //==================================================================================================
28 FeaturesAPI_ExtrusionBoolean::FeaturesAPI_ExtrusionBoolean(
29 const std::shared_ptr<ModelAPI_Feature>& theFeature)
30 : ModelHighAPI_Interface(theFeature)
34 //==================================================================================================
35 FeaturesAPI_ExtrusionBoolean::~FeaturesAPI_ExtrusionBoolean()
39 //==================================================================================================
40 void FeaturesAPI_ExtrusionBoolean::setNestedSketch(const ModelHighAPI_Reference& theSketch)
42 mysketch->setValue(theSketch.feature());
44 // To make Sketch feature execute and subfeatures execute.
45 feature()->document()->setCurrentFeature(feature(), false);
47 // to inform that the history is updated due to the sketch moved under the composite feature
48 if (theSketch.feature().get()) {
49 theSketch.feature()->document()->updateHistory(ModelAPI_Feature::group());
50 if (theSketch.feature()->firstResult().get())
51 theSketch.feature()->firstResult()->setDisplayed(false);
53 mybaseObjects->clear();
54 mybaseObjects->append(theSketch.feature()->firstResult(), GeomShapePtr());
59 //==================================================================================================
60 void FeaturesAPI_ExtrusionBoolean::setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects)
62 mysketch->setValue(ObjectPtr());
63 mybaseObjects->clear();
64 fillAttribute(theBaseObjects, mybaseObjects);
69 //==================================================================================================
70 void FeaturesAPI_ExtrusionBoolean::setDirection(const ModelHighAPI_Selection& theDirection)
72 fillAttribute(theDirection, mydirection);
77 //==================================================================================================
78 void FeaturesAPI_ExtrusionBoolean::setSizes(const ModelHighAPI_Double& theToSize,
79 const ModelHighAPI_Double& theFromSize)
81 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
82 fillAttribute(theToSize, mytoSize);
83 fillAttribute(theFromSize, myfromSize);
88 //==================================================================================================
89 void FeaturesAPI_ExtrusionBoolean::setSize(const ModelHighAPI_Double& theSize)
91 setSizes(theSize, ModelHighAPI_Double());
94 //==================================================================================================
95 void FeaturesAPI_ExtrusionBoolean::setPlanesAndOffsets(const ModelHighAPI_Selection& theToObject,
96 const ModelHighAPI_Double& theToOffset,
97 const ModelHighAPI_Selection& theFromObject,
98 const ModelHighAPI_Double& theFromOffset)
100 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
101 fillAttribute(theToObject, mytoObject);
102 fillAttribute(theToOffset, mytoOffset);
103 fillAttribute(theFromObject, myfromObject);
104 fillAttribute(theFromOffset, myfromOffset);
106 execIfBaseNotEmpty();
109 //==================================================================================================
110 void FeaturesAPI_ExtrusionBoolean::setBooleanObjects(
111 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
113 fillAttribute(theBooleanObjects, mybooleanObjects);
115 execIfBaseNotEmpty();
118 //==================================================================================================
119 void FeaturesAPI_ExtrusionBoolean::dump(ModelHighAPI_Dumper& theDumper) const
121 FeaturePtr aBase = feature();
122 const std::string& aDocName = theDumper.name(aBase->document());
124 AttributeReferencePtr anAttrSketch = aBase->reference(FeaturesPlugin_Extrusion::SKETCH_ID());
125 AttributeSelectionListPtr anAttrObjects =
126 aBase->selectionList(FeaturesPlugin_Extrusion::BASE_OBJECTS_ID());
127 AttributeSelectionPtr anAttrDirection =
128 aBase->selection(FeaturesPlugin_Extrusion::DIRECTION_OBJECT_ID());
130 theDumper << aBase << " = model.addExtrusion";
131 if(aBase->getKind() == FeaturesPlugin_ExtrusionCut::ID()) {
133 } else if(aBase->getKind() == FeaturesPlugin_ExtrusionFuse::ID()) {
136 theDumper << "(" << aDocName << ", ";
137 anAttrSketch->isInitialized() ? theDumper << "[]" : theDumper << anAttrObjects;
138 theDumper << ", " << anAttrDirection;
140 std::string aCreationMethod =
141 aBase->string(FeaturesPlugin_Extrusion::CREATION_METHOD())->value();
143 if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES()) {
144 AttributeDoublePtr anAttrToSize = aBase->real(FeaturesPlugin_Extrusion::TO_SIZE_ID());
145 AttributeDoublePtr anAttrFromSize = aBase->real(FeaturesPlugin_Extrusion::FROM_SIZE_ID());
147 theDumper << ", " << anAttrToSize << ", " << anAttrFromSize;
148 } else if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES()) {
149 AttributeSelectionPtr anAttrToObject =
150 aBase->selection(FeaturesPlugin_Extrusion::TO_OBJECT_ID());
151 AttributeDoublePtr anAttrToOffset = aBase->real(FeaturesPlugin_Extrusion::TO_OFFSET_ID());
152 AttributeSelectionPtr anAttrFromObject =
153 aBase->selection(FeaturesPlugin_Extrusion::FROM_OBJECT_ID());
154 AttributeDoublePtr anAttrFromOffset = aBase->real(FeaturesPlugin_Extrusion::FROM_OFFSET_ID());
156 theDumper << ", " << anAttrToObject << ", " << anAttrToOffset <<
157 ", " << anAttrFromObject << ", " << anAttrFromOffset;
160 AttributeSelectionListPtr anAttrBoolObjects =
161 aBase->selectionList(FeaturesPlugin_CompositeBoolean::OBJECTS_ID());
162 theDumper << ", " << anAttrBoolObjects << ")" << std::endl;
164 if(anAttrSketch->isInitialized()) {
165 theDumper << aBase << ".setNestedSketch(" << anAttrSketch << ")" << std::endl;
169 //==================================================================================================
170 void FeaturesAPI_ExtrusionBoolean::execIfBaseNotEmpty()
172 if(mybaseObjects->size() > 0) {
178 //==================================================================================================
179 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
180 const std::shared_ptr<ModelAPI_Feature>& theFeature)
181 : FeaturesAPI_ExtrusionBoolean(theFeature)
186 //==================================================================================================
187 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
188 const std::shared_ptr<ModelAPI_Feature>& theFeature,
189 const std::list<ModelHighAPI_Selection>& theBaseObjects,
190 const ModelHighAPI_Double& theSize,
191 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
192 : FeaturesAPI_ExtrusionBoolean(theFeature)
195 fillAttribute(theBaseObjects, mybaseObjects);
197 setBooleanObjects(theBooleanObjects);
201 //==================================================================================================
202 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
203 const std::shared_ptr<ModelAPI_Feature>& theFeature,
204 const std::list<ModelHighAPI_Selection>& theBaseObjects,
205 const ModelHighAPI_Selection& theDirection,
206 const ModelHighAPI_Double& theSize,
207 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
208 : FeaturesAPI_ExtrusionBoolean(theFeature)
211 fillAttribute(theBaseObjects, mybaseObjects);
212 fillAttribute(theDirection, mydirection);
214 setBooleanObjects(theBooleanObjects);
218 //==================================================================================================
219 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
220 const std::shared_ptr<ModelAPI_Feature>& theFeature,
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 : FeaturesAPI_ExtrusionBoolean(theFeature)
228 fillAttribute(theBaseObjects, mybaseObjects);
229 setSizes(theToSize, theFromSize);
230 setBooleanObjects(theBooleanObjects);
234 //==================================================================================================
235 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
236 const std::shared_ptr<ModelAPI_Feature>& theFeature,
237 const std::list<ModelHighAPI_Selection>& theBaseObjects,
238 const ModelHighAPI_Selection& theDirection,
239 const ModelHighAPI_Double& theToSize,
240 const ModelHighAPI_Double& theFromSize,
241 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
242 : FeaturesAPI_ExtrusionBoolean(theFeature)
245 fillAttribute(theBaseObjects, mybaseObjects);
246 fillAttribute(theDirection, mydirection);
247 setSizes(theToSize, theFromSize);
248 setBooleanObjects(theBooleanObjects);
252 //==================================================================================================
253 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
254 const std::shared_ptr<ModelAPI_Feature>& theFeature,
255 const std::list<ModelHighAPI_Selection>& theBaseObjects,
256 const ModelHighAPI_Selection& theToObject,
257 const ModelHighAPI_Double& theToOffset,
258 const ModelHighAPI_Selection& theFromObject,
259 const ModelHighAPI_Double& theFromOffset,
260 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
261 : FeaturesAPI_ExtrusionBoolean(theFeature)
264 fillAttribute(theBaseObjects, mybaseObjects);
265 setPlanesAndOffsets(theToObject, theToOffset, theFromObject, theFromOffset);
266 setBooleanObjects(theBooleanObjects);
270 //==================================================================================================
271 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
272 const std::shared_ptr<ModelAPI_Feature>& theFeature,
273 const std::list<ModelHighAPI_Selection>& theBaseObjects,
274 const ModelHighAPI_Selection& theDirection,
275 const ModelHighAPI_Selection& theToObject,
276 const ModelHighAPI_Double& theToOffset,
277 const ModelHighAPI_Selection& theFromObject,
278 const ModelHighAPI_Double& theFromOffset,
279 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
280 : FeaturesAPI_ExtrusionBoolean(theFeature)
283 fillAttribute(theBaseObjects, mybaseObjects);
284 fillAttribute(theDirection, mydirection);
285 setPlanesAndOffsets(theToObject, theToOffset, theFromObject, theFromOffset);
286 setBooleanObjects(theBooleanObjects);
290 //==================================================================================================
291 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
292 const std::list<ModelHighAPI_Selection>& theBaseObjects,
293 const ModelHighAPI_Double& theSize,
294 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
296 std::shared_ptr<ModelAPI_Feature> aFeature =
297 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
298 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects,
299 theSize, theBooleanObjects));
302 //==================================================================================================
303 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
304 const std::list<ModelHighAPI_Selection>& theBaseObjects,
305 const ModelHighAPI_Selection& theDirection,
306 const ModelHighAPI_Double& theSize,
307 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
309 std::shared_ptr<ModelAPI_Feature> aFeature =
310 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
311 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theDirection,
312 theSize, theBooleanObjects));
315 //==================================================================================================
316 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
317 const std::list<ModelHighAPI_Selection>& theBaseObjects,
318 const ModelHighAPI_Double& theToSize,
319 const ModelHighAPI_Double& theFromSize,
320 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
322 std::shared_ptr<ModelAPI_Feature> aFeature =
323 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
324 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects,
325 theToSize, theFromSize, theBooleanObjects));
328 //==================================================================================================
329 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
330 const std::list<ModelHighAPI_Selection>& theBaseObjects,
331 const ModelHighAPI_Selection& theDirection,
332 const ModelHighAPI_Double& theToSize,
333 const ModelHighAPI_Double& theFromSize,
334 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
336 std::shared_ptr<ModelAPI_Feature> aFeature =
337 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
338 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
346 //==================================================================================================
347 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
348 const std::list<ModelHighAPI_Selection>& theBaseObjects,
349 const ModelHighAPI_Selection& theToObject,
350 const ModelHighAPI_Double& theToOffset,
351 const ModelHighAPI_Selection& theFromObject,
352 const ModelHighAPI_Double& theFromOffset,
353 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
355 std::shared_ptr<ModelAPI_Feature> aFeature =
356 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
357 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
366 //==================================================================================================
367 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
368 const std::list<ModelHighAPI_Selection>& theBaseObjects,
369 const ModelHighAPI_Selection& theDirection,
370 const ModelHighAPI_Selection& theToObject,
371 const ModelHighAPI_Double& theToOffset,
372 const ModelHighAPI_Selection& theFromObject,
373 const ModelHighAPI_Double& theFromOffset,
374 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
376 std::shared_ptr<ModelAPI_Feature> aFeature =
377 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
378 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
389 //==================================================================================================
390 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
391 const std::shared_ptr<ModelAPI_Feature>& theFeature)
392 : FeaturesAPI_ExtrusionBoolean(theFeature)
397 //==================================================================================================
398 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
399 const std::shared_ptr<ModelAPI_Feature>& theFeature,
400 const std::list<ModelHighAPI_Selection>& theBaseObjects,
401 const ModelHighAPI_Double& theSize,
402 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
403 : FeaturesAPI_ExtrusionBoolean(theFeature)
406 fillAttribute(theBaseObjects, mybaseObjects);
408 setBooleanObjects(theBooleanObjects);
412 //==================================================================================================
413 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
414 const std::shared_ptr<ModelAPI_Feature>& theFeature,
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 : FeaturesAPI_ExtrusionBoolean(theFeature)
422 fillAttribute(theBaseObjects, mybaseObjects);
423 fillAttribute(theDirection, mydirection);
425 setBooleanObjects(theBooleanObjects);
429 //==================================================================================================
430 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
431 const std::shared_ptr<ModelAPI_Feature>& theFeature,
432 const std::list<ModelHighAPI_Selection>& theBaseObjects,
433 const ModelHighAPI_Double& theToSize,
434 const ModelHighAPI_Double& theFromSize,
435 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
436 : FeaturesAPI_ExtrusionBoolean(theFeature)
439 fillAttribute(theBaseObjects, mybaseObjects);
440 setSizes(theToSize, theFromSize);
441 setBooleanObjects(theBooleanObjects);
445 //==================================================================================================
446 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
447 const std::shared_ptr<ModelAPI_Feature>& theFeature,
448 const std::list<ModelHighAPI_Selection>& theBaseObjects,
449 const ModelHighAPI_Selection& theDirection,
450 const ModelHighAPI_Double& theToSize,
451 const ModelHighAPI_Double& theFromSize,
452 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
453 : FeaturesAPI_ExtrusionBoolean(theFeature)
456 fillAttribute(theBaseObjects, mybaseObjects);
457 fillAttribute(theDirection, mydirection);
458 setSizes(theToSize, theFromSize);
459 setBooleanObjects(theBooleanObjects);
463 //==================================================================================================
464 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
465 const std::shared_ptr<ModelAPI_Feature>& theFeature,
466 const std::list<ModelHighAPI_Selection>& theBaseObjects,
467 const ModelHighAPI_Selection& theToObject,
468 const ModelHighAPI_Double& theToOffset,
469 const ModelHighAPI_Selection& theFromObject,
470 const ModelHighAPI_Double& theFromOffset,
471 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
472 : FeaturesAPI_ExtrusionBoolean(theFeature)
475 fillAttribute(theBaseObjects, mybaseObjects);
476 setPlanesAndOffsets(theToObject, theToOffset, theFromObject, theFromOffset);
477 setBooleanObjects(theBooleanObjects);
481 //==================================================================================================
482 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
483 const std::shared_ptr<ModelAPI_Feature>& theFeature,
484 const std::list<ModelHighAPI_Selection>& theBaseObjects,
485 const ModelHighAPI_Selection& theDirection,
486 const ModelHighAPI_Selection& theToObject,
487 const ModelHighAPI_Double& theToOffset,
488 const ModelHighAPI_Selection& theFromObject,
489 const ModelHighAPI_Double& theFromOffset,
490 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
491 : FeaturesAPI_ExtrusionBoolean(theFeature)
494 fillAttribute(theBaseObjects, mybaseObjects);
495 fillAttribute(theDirection, mydirection);
496 setPlanesAndOffsets(theToObject, theToOffset, theFromObject, theFromOffset);
497 setBooleanObjects(theBooleanObjects);
501 //==================================================================================================
502 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
503 const std::list<ModelHighAPI_Selection>& theBaseObjects,
504 const ModelHighAPI_Double& theSize,
505 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
507 std::shared_ptr<ModelAPI_Feature> aFeature =
508 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
509 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects,
510 theSize, theBooleanObjects));
513 //==================================================================================================
514 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
515 const std::list<ModelHighAPI_Selection>& theBaseObjects,
516 const ModelHighAPI_Selection& theDirection,
517 const ModelHighAPI_Double& theSize,
518 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
520 std::shared_ptr<ModelAPI_Feature> aFeature =
521 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
522 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects,
523 theDirection, theSize, theBooleanObjects));
526 //==================================================================================================
527 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
528 const std::list<ModelHighAPI_Selection>& theBaseObjects,
529 const ModelHighAPI_Double& theToSize,
530 const ModelHighAPI_Double& theFromSize,
531 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
533 std::shared_ptr<ModelAPI_Feature> aFeature =
534 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
535 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects,
536 theToSize, theFromSize, theBooleanObjects));
539 //==================================================================================================
540 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
541 const std::list<ModelHighAPI_Selection>& theBaseObjects,
542 const ModelHighAPI_Selection& theDirection,
543 const ModelHighAPI_Double& theToSize,
544 const ModelHighAPI_Double& theFromSize,
545 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
547 std::shared_ptr<ModelAPI_Feature> aFeature =
548 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
549 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
557 //==================================================================================================
558 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
559 const std::list<ModelHighAPI_Selection>& theBaseObjects,
560 const ModelHighAPI_Selection& theToObject,
561 const ModelHighAPI_Double& theToOffset,
562 const ModelHighAPI_Selection& theFromObject,
563 const ModelHighAPI_Double& theFromOffset,
564 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
566 std::shared_ptr<ModelAPI_Feature> aFeature =
567 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
568 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
577 //==================================================================================================
578 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
579 const std::list<ModelHighAPI_Selection>& theBaseObjects,
580 const ModelHighAPI_Selection& theDirection,
581 const ModelHighAPI_Selection& theToObject,
582 const ModelHighAPI_Double& theToOffset,
583 const ModelHighAPI_Selection& theFromObject,
584 const ModelHighAPI_Double& theFromOffset,
585 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
587 std::shared_ptr<ModelAPI_Feature> aFeature =
588 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
589 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,