1 // Copyright (C) 2014-2017 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
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #include "FeaturesAPI_ExtrusionBoolean.h"
23 #include <ModelHighAPI_Double.h>
24 #include <ModelHighAPI_Dumper.h>
25 #include <ModelHighAPI_Reference.h>
26 #include <ModelHighAPI_Tools.h>
28 //==================================================================================================
29 FeaturesAPI_ExtrusionBoolean::FeaturesAPI_ExtrusionBoolean(
30 const std::shared_ptr<ModelAPI_Feature>& theFeature)
31 : ModelHighAPI_Interface(theFeature)
35 //==================================================================================================
36 FeaturesAPI_ExtrusionBoolean::~FeaturesAPI_ExtrusionBoolean()
40 //==================================================================================================
41 void FeaturesAPI_ExtrusionBoolean::setNestedSketch(const ModelHighAPI_Reference& theSketch)
43 mysketch->setValue(theSketch.feature());
45 // To make Sketch feature execute and subfeatures execute.
46 feature()->document()->setCurrentFeature(feature(), false);
48 // to inform that the history is updated due to the sketch moved under the composite feature
49 if (theSketch.feature().get()) {
50 theSketch.feature()->document()->updateHistory(ModelAPI_Feature::group());
51 if (theSketch.feature()->firstResult().get())
52 theSketch.feature()->firstResult()->setDisplayed(false);
54 mybaseObjects->clear();
55 mybaseObjects->append(theSketch.feature()->firstResult(), GeomShapePtr());
60 //==================================================================================================
61 void FeaturesAPI_ExtrusionBoolean::setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects)
63 mysketch->setValue(ObjectPtr());
64 mybaseObjects->clear();
65 fillAttribute(theBaseObjects, mybaseObjects);
70 //==================================================================================================
71 void FeaturesAPI_ExtrusionBoolean::setDirection(const ModelHighAPI_Selection& theDirection)
73 fillAttribute(theDirection, mydirection);
78 //==================================================================================================
79 void FeaturesAPI_ExtrusionBoolean::setSizes(const ModelHighAPI_Double& theToSize,
80 const ModelHighAPI_Double& theFromSize)
82 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
83 fillAttribute(theToSize, mytoSize);
84 fillAttribute(theFromSize, myfromSize);
89 //==================================================================================================
90 void FeaturesAPI_ExtrusionBoolean::setSize(const ModelHighAPI_Double& theSize)
92 setSizes(theSize, ModelHighAPI_Double());
95 //==================================================================================================
96 void FeaturesAPI_ExtrusionBoolean::setPlanesAndOffsets(const ModelHighAPI_Selection& theToObject,
97 const ModelHighAPI_Double& theToOffset,
98 const ModelHighAPI_Selection& theFromObject,
99 const ModelHighAPI_Double& theFromOffset)
101 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
102 fillAttribute(theToObject, mytoObject);
103 fillAttribute(theToOffset, mytoOffset);
104 fillAttribute(theFromObject, myfromObject);
105 fillAttribute(theFromOffset, myfromOffset);
107 execIfBaseNotEmpty();
110 //==================================================================================================
111 void FeaturesAPI_ExtrusionBoolean::setBooleanObjects(
112 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
114 fillAttribute(theBooleanObjects, mybooleanObjects);
116 execIfBaseNotEmpty();
119 //==================================================================================================
120 void FeaturesAPI_ExtrusionBoolean::dump(ModelHighAPI_Dumper& theDumper) const
122 FeaturePtr aBase = feature();
123 const std::string& aDocName = theDumper.name(aBase->document());
125 AttributeReferencePtr anAttrSketch = aBase->reference(FeaturesPlugin_Extrusion::SKETCH_ID());
126 AttributeSelectionListPtr anAttrObjects =
127 aBase->selectionList(FeaturesPlugin_Extrusion::BASE_OBJECTS_ID());
128 AttributeSelectionPtr anAttrDirection =
129 aBase->selection(FeaturesPlugin_Extrusion::DIRECTION_OBJECT_ID());
131 theDumper << aBase << " = model.addExtrusion";
132 if(aBase->getKind() == FeaturesPlugin_ExtrusionCut::ID()) {
134 } else if(aBase->getKind() == FeaturesPlugin_ExtrusionFuse::ID()) {
137 theDumper << "(" << aDocName << ", ";
138 anAttrSketch->isInitialized() ? theDumper << "[]" : theDumper << anAttrObjects;
139 theDumper << ", " << anAttrDirection;
141 std::string aCreationMethod =
142 aBase->string(FeaturesPlugin_Extrusion::CREATION_METHOD())->value();
144 if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES()) {
145 AttributeDoublePtr anAttrToSize = aBase->real(FeaturesPlugin_Extrusion::TO_SIZE_ID());
146 AttributeDoublePtr anAttrFromSize = aBase->real(FeaturesPlugin_Extrusion::FROM_SIZE_ID());
148 theDumper << ", " << anAttrToSize << ", " << anAttrFromSize;
149 } else if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES()) {
150 AttributeSelectionPtr anAttrToObject =
151 aBase->selection(FeaturesPlugin_Extrusion::TO_OBJECT_ID());
152 AttributeDoublePtr anAttrToOffset = aBase->real(FeaturesPlugin_Extrusion::TO_OFFSET_ID());
153 AttributeSelectionPtr anAttrFromObject =
154 aBase->selection(FeaturesPlugin_Extrusion::FROM_OBJECT_ID());
155 AttributeDoublePtr anAttrFromOffset = aBase->real(FeaturesPlugin_Extrusion::FROM_OFFSET_ID());
157 theDumper << ", " << anAttrToObject << ", " << anAttrToOffset <<
158 ", " << anAttrFromObject << ", " << anAttrFromOffset;
161 AttributeSelectionListPtr anAttrBoolObjects =
162 aBase->selectionList(FeaturesPlugin_CompositeBoolean::OBJECTS_ID());
163 theDumper << ", " << anAttrBoolObjects << ")" << std::endl;
165 if(anAttrSketch->isInitialized()) {
166 theDumper << aBase << ".setNestedSketch(" << anAttrSketch << ")" << std::endl;
170 //==================================================================================================
171 void FeaturesAPI_ExtrusionBoolean::execIfBaseNotEmpty()
173 if(mybaseObjects->size() > 0) {
179 //==================================================================================================
180 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
181 const std::shared_ptr<ModelAPI_Feature>& theFeature)
182 : FeaturesAPI_ExtrusionBoolean(theFeature)
187 //==================================================================================================
188 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
189 const std::shared_ptr<ModelAPI_Feature>& theFeature,
190 const std::list<ModelHighAPI_Selection>& theBaseObjects,
191 const ModelHighAPI_Double& theSize,
192 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
193 : FeaturesAPI_ExtrusionBoolean(theFeature)
196 fillAttribute(theBaseObjects, mybaseObjects);
198 setBooleanObjects(theBooleanObjects);
202 //==================================================================================================
203 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
204 const std::shared_ptr<ModelAPI_Feature>& theFeature,
205 const std::list<ModelHighAPI_Selection>& theBaseObjects,
206 const ModelHighAPI_Selection& theDirection,
207 const ModelHighAPI_Double& theSize,
208 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
209 : FeaturesAPI_ExtrusionBoolean(theFeature)
212 fillAttribute(theBaseObjects, mybaseObjects);
213 fillAttribute(theDirection, mydirection);
215 setBooleanObjects(theBooleanObjects);
219 //==================================================================================================
220 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
221 const std::shared_ptr<ModelAPI_Feature>& theFeature,
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 : FeaturesAPI_ExtrusionBoolean(theFeature)
229 fillAttribute(theBaseObjects, mybaseObjects);
230 setSizes(theToSize, theFromSize);
231 setBooleanObjects(theBooleanObjects);
235 //==================================================================================================
236 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
237 const std::shared_ptr<ModelAPI_Feature>& theFeature,
238 const std::list<ModelHighAPI_Selection>& theBaseObjects,
239 const ModelHighAPI_Selection& theDirection,
240 const ModelHighAPI_Double& theToSize,
241 const ModelHighAPI_Double& theFromSize,
242 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
243 : FeaturesAPI_ExtrusionBoolean(theFeature)
246 fillAttribute(theBaseObjects, mybaseObjects);
247 fillAttribute(theDirection, mydirection);
248 setSizes(theToSize, theFromSize);
249 setBooleanObjects(theBooleanObjects);
253 //==================================================================================================
254 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
255 const std::shared_ptr<ModelAPI_Feature>& theFeature,
256 const std::list<ModelHighAPI_Selection>& theBaseObjects,
257 const ModelHighAPI_Selection& theToObject,
258 const ModelHighAPI_Double& theToOffset,
259 const ModelHighAPI_Selection& theFromObject,
260 const ModelHighAPI_Double& theFromOffset,
261 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
262 : FeaturesAPI_ExtrusionBoolean(theFeature)
265 fillAttribute(theBaseObjects, mybaseObjects);
266 setPlanesAndOffsets(theToObject, theToOffset, theFromObject, theFromOffset);
267 setBooleanObjects(theBooleanObjects);
271 //==================================================================================================
272 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
273 const std::shared_ptr<ModelAPI_Feature>& theFeature,
274 const std::list<ModelHighAPI_Selection>& theBaseObjects,
275 const ModelHighAPI_Selection& theDirection,
276 const ModelHighAPI_Selection& theToObject,
277 const ModelHighAPI_Double& theToOffset,
278 const ModelHighAPI_Selection& theFromObject,
279 const ModelHighAPI_Double& theFromOffset,
280 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
281 : FeaturesAPI_ExtrusionBoolean(theFeature)
284 fillAttribute(theBaseObjects, mybaseObjects);
285 fillAttribute(theDirection, mydirection);
286 setPlanesAndOffsets(theToObject, theToOffset, theFromObject, theFromOffset);
287 setBooleanObjects(theBooleanObjects);
291 //==================================================================================================
292 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
293 const std::list<ModelHighAPI_Selection>& theBaseObjects,
294 const ModelHighAPI_Double& theSize,
295 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
297 std::shared_ptr<ModelAPI_Feature> aFeature =
298 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
299 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects,
300 theSize, theBooleanObjects));
303 //==================================================================================================
304 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
305 const std::list<ModelHighAPI_Selection>& theBaseObjects,
306 const ModelHighAPI_Selection& theDirection,
307 const ModelHighAPI_Double& theSize,
308 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
310 std::shared_ptr<ModelAPI_Feature> aFeature =
311 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
312 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theDirection,
313 theSize, theBooleanObjects));
316 //==================================================================================================
317 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
318 const std::list<ModelHighAPI_Selection>& theBaseObjects,
319 const ModelHighAPI_Double& theToSize,
320 const ModelHighAPI_Double& theFromSize,
321 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
323 std::shared_ptr<ModelAPI_Feature> aFeature =
324 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
325 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects,
326 theToSize, theFromSize, theBooleanObjects));
329 //==================================================================================================
330 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
331 const std::list<ModelHighAPI_Selection>& theBaseObjects,
332 const ModelHighAPI_Selection& theDirection,
333 const ModelHighAPI_Double& theToSize,
334 const ModelHighAPI_Double& theFromSize,
335 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
337 std::shared_ptr<ModelAPI_Feature> aFeature =
338 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
339 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
347 //==================================================================================================
348 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
349 const std::list<ModelHighAPI_Selection>& theBaseObjects,
350 const ModelHighAPI_Selection& theToObject,
351 const ModelHighAPI_Double& theToOffset,
352 const ModelHighAPI_Selection& theFromObject,
353 const ModelHighAPI_Double& theFromOffset,
354 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
356 std::shared_ptr<ModelAPI_Feature> aFeature =
357 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
358 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
367 //==================================================================================================
368 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
369 const std::list<ModelHighAPI_Selection>& theBaseObjects,
370 const ModelHighAPI_Selection& theDirection,
371 const ModelHighAPI_Selection& theToObject,
372 const ModelHighAPI_Double& theToOffset,
373 const ModelHighAPI_Selection& theFromObject,
374 const ModelHighAPI_Double& theFromOffset,
375 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
377 std::shared_ptr<ModelAPI_Feature> aFeature =
378 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
379 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
390 //==================================================================================================
391 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
392 const std::shared_ptr<ModelAPI_Feature>& theFeature)
393 : FeaturesAPI_ExtrusionBoolean(theFeature)
398 //==================================================================================================
399 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
400 const std::shared_ptr<ModelAPI_Feature>& theFeature,
401 const std::list<ModelHighAPI_Selection>& theBaseObjects,
402 const ModelHighAPI_Double& theSize,
403 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
404 : FeaturesAPI_ExtrusionBoolean(theFeature)
407 fillAttribute(theBaseObjects, mybaseObjects);
409 setBooleanObjects(theBooleanObjects);
413 //==================================================================================================
414 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
415 const std::shared_ptr<ModelAPI_Feature>& theFeature,
416 const std::list<ModelHighAPI_Selection>& theBaseObjects,
417 const ModelHighAPI_Selection& theDirection,
418 const ModelHighAPI_Double& theSize,
419 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
420 : FeaturesAPI_ExtrusionBoolean(theFeature)
423 fillAttribute(theBaseObjects, mybaseObjects);
424 fillAttribute(theDirection, mydirection);
426 setBooleanObjects(theBooleanObjects);
430 //==================================================================================================
431 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
432 const std::shared_ptr<ModelAPI_Feature>& theFeature,
433 const std::list<ModelHighAPI_Selection>& theBaseObjects,
434 const ModelHighAPI_Double& theToSize,
435 const ModelHighAPI_Double& theFromSize,
436 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
437 : FeaturesAPI_ExtrusionBoolean(theFeature)
440 fillAttribute(theBaseObjects, mybaseObjects);
441 setSizes(theToSize, theFromSize);
442 setBooleanObjects(theBooleanObjects);
446 //==================================================================================================
447 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
448 const std::shared_ptr<ModelAPI_Feature>& theFeature,
449 const std::list<ModelHighAPI_Selection>& theBaseObjects,
450 const ModelHighAPI_Selection& theDirection,
451 const ModelHighAPI_Double& theToSize,
452 const ModelHighAPI_Double& theFromSize,
453 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
454 : FeaturesAPI_ExtrusionBoolean(theFeature)
457 fillAttribute(theBaseObjects, mybaseObjects);
458 fillAttribute(theDirection, mydirection);
459 setSizes(theToSize, theFromSize);
460 setBooleanObjects(theBooleanObjects);
464 //==================================================================================================
465 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
466 const std::shared_ptr<ModelAPI_Feature>& theFeature,
467 const std::list<ModelHighAPI_Selection>& theBaseObjects,
468 const ModelHighAPI_Selection& theToObject,
469 const ModelHighAPI_Double& theToOffset,
470 const ModelHighAPI_Selection& theFromObject,
471 const ModelHighAPI_Double& theFromOffset,
472 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
473 : FeaturesAPI_ExtrusionBoolean(theFeature)
476 fillAttribute(theBaseObjects, mybaseObjects);
477 setPlanesAndOffsets(theToObject, theToOffset, theFromObject, theFromOffset);
478 setBooleanObjects(theBooleanObjects);
482 //==================================================================================================
483 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
484 const std::shared_ptr<ModelAPI_Feature>& theFeature,
485 const std::list<ModelHighAPI_Selection>& theBaseObjects,
486 const ModelHighAPI_Selection& theDirection,
487 const ModelHighAPI_Selection& theToObject,
488 const ModelHighAPI_Double& theToOffset,
489 const ModelHighAPI_Selection& theFromObject,
490 const ModelHighAPI_Double& theFromOffset,
491 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
492 : FeaturesAPI_ExtrusionBoolean(theFeature)
495 fillAttribute(theBaseObjects, mybaseObjects);
496 fillAttribute(theDirection, mydirection);
497 setPlanesAndOffsets(theToObject, theToOffset, theFromObject, theFromOffset);
498 setBooleanObjects(theBooleanObjects);
502 //==================================================================================================
503 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
504 const std::list<ModelHighAPI_Selection>& theBaseObjects,
505 const ModelHighAPI_Double& theSize,
506 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
508 std::shared_ptr<ModelAPI_Feature> aFeature =
509 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
510 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects,
511 theSize, theBooleanObjects));
514 //==================================================================================================
515 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
516 const std::list<ModelHighAPI_Selection>& theBaseObjects,
517 const ModelHighAPI_Selection& theDirection,
518 const ModelHighAPI_Double& theSize,
519 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
521 std::shared_ptr<ModelAPI_Feature> aFeature =
522 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
523 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects,
524 theDirection, theSize, theBooleanObjects));
527 //==================================================================================================
528 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
529 const std::list<ModelHighAPI_Selection>& theBaseObjects,
530 const ModelHighAPI_Double& theToSize,
531 const ModelHighAPI_Double& theFromSize,
532 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
534 std::shared_ptr<ModelAPI_Feature> aFeature =
535 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
536 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects,
537 theToSize, theFromSize, theBooleanObjects));
540 //==================================================================================================
541 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
542 const std::list<ModelHighAPI_Selection>& theBaseObjects,
543 const ModelHighAPI_Selection& theDirection,
544 const ModelHighAPI_Double& theToSize,
545 const ModelHighAPI_Double& theFromSize,
546 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
548 std::shared_ptr<ModelAPI_Feature> aFeature =
549 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
550 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
558 //==================================================================================================
559 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
560 const std::list<ModelHighAPI_Selection>& theBaseObjects,
561 const ModelHighAPI_Selection& theToObject,
562 const ModelHighAPI_Double& theToOffset,
563 const ModelHighAPI_Selection& theFromObject,
564 const ModelHighAPI_Double& theFromOffset,
565 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
567 std::shared_ptr<ModelAPI_Feature> aFeature =
568 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
569 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
578 //==================================================================================================
579 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
580 const std::list<ModelHighAPI_Selection>& theBaseObjects,
581 const ModelHighAPI_Selection& theDirection,
582 const ModelHighAPI_Selection& theToObject,
583 const ModelHighAPI_Double& theToOffset,
584 const ModelHighAPI_Selection& theFromObject,
585 const ModelHighAPI_Double& theFromOffset,
586 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
588 std::shared_ptr<ModelAPI_Feature> aFeature =
589 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
590 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,