1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesAPI_ExtrusionBoolean.cpp
4 // Created: 09 June 2016
5 // Author: Dmitry Bobylev
7 #include "FeaturesAPI_ExtrusionBoolean.h"
9 #include <ModelHighAPI_Double.h>
10 #include <ModelHighAPI_Dumper.h>
11 #include <ModelHighAPI_Reference.h>
12 #include <ModelHighAPI_Tools.h>
14 //==================================================================================================
15 FeaturesAPI_ExtrusionBoolean::FeaturesAPI_ExtrusionBoolean(
16 const std::shared_ptr<ModelAPI_Feature>& theFeature)
17 : ModelHighAPI_Interface(theFeature)
21 //==================================================================================================
22 FeaturesAPI_ExtrusionBoolean::~FeaturesAPI_ExtrusionBoolean()
26 //==================================================================================================
27 void FeaturesAPI_ExtrusionBoolean::setNestedSketch(const ModelHighAPI_Reference& theSketch)
29 mysketch->setValue(theSketch.feature());
31 // To make Sketch feature execute and subfeatures execute.
32 feature()->document()->setCurrentFeature(feature(), false);
34 // to inform that the history is updated due to the sketch moved under the composite feature
35 if (theSketch.feature().get()) {
36 theSketch.feature()->document()->updateHistory(ModelAPI_Feature::group());
37 if (theSketch.feature()->firstResult().get())
38 theSketch.feature()->firstResult()->setDisplayed(false);
40 mybaseObjects->clear();
41 mybaseObjects->append(theSketch.feature()->firstResult(), GeomShapePtr());
46 //==================================================================================================
47 void FeaturesAPI_ExtrusionBoolean::setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects)
49 mysketch->setValue(ObjectPtr());
50 mybaseObjects->clear();
51 fillAttribute(theBaseObjects, mybaseObjects);
56 //==================================================================================================
57 void FeaturesAPI_ExtrusionBoolean::setDirection(const ModelHighAPI_Selection& theDirection)
59 fillAttribute(theDirection, mydirection);
64 //==================================================================================================
65 void FeaturesAPI_ExtrusionBoolean::setSizes(const ModelHighAPI_Double& theToSize,
66 const ModelHighAPI_Double& theFromSize)
68 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
69 fillAttribute(theToSize, mytoSize);
70 fillAttribute(theFromSize, myfromSize);
75 //==================================================================================================
76 void FeaturesAPI_ExtrusionBoolean::setSize(const ModelHighAPI_Double& theSize)
78 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
79 fillAttribute(theSize, mytoSize);
80 fillAttribute(ModelHighAPI_Double(), myfromSize);
85 //==================================================================================================
86 void FeaturesAPI_ExtrusionBoolean::setPlanesAndOffsets(const ModelHighAPI_Selection& theToObject,
87 const ModelHighAPI_Double& theToOffset,
88 const ModelHighAPI_Selection& theFromObject,
89 const ModelHighAPI_Double& theFromOffset)
91 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
92 fillAttribute(theToObject, mytoObject);
93 fillAttribute(theToOffset, mytoOffset);
94 fillAttribute(theFromObject, myfromObject);
95 fillAttribute(theFromOffset, myfromOffset);
100 //==================================================================================================
101 void FeaturesAPI_ExtrusionBoolean::setBooleanObjects(
102 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
104 fillAttribute(theBooleanObjects, mybooleanObjects);
106 execIfBaseNotEmpty();
109 //==================================================================================================
110 void FeaturesAPI_ExtrusionBoolean::dump(ModelHighAPI_Dumper& theDumper) const
112 FeaturePtr aBase = feature();
113 const std::string& aDocName = theDumper.name(aBase->document());
115 AttributeReferencePtr anAttrSketch = aBase->reference(FeaturesPlugin_Extrusion::SKETCH_ID());
116 AttributeSelectionListPtr anAttrObjects =
117 aBase->selectionList(FeaturesPlugin_Extrusion::BASE_OBJECTS_ID());
118 AttributeSelectionPtr anAttrDirection =
119 aBase->selection(FeaturesPlugin_Extrusion::DIRECTION_OBJECT_ID());
121 theDumper << aBase << " = model.addExtrusion";
122 if(aBase->getKind() == FeaturesPlugin_ExtrusionCut::ID()) {
124 } else if(aBase->getKind() == FeaturesPlugin_ExtrusionFuse::ID()) {
127 theDumper << "(" << aDocName << ", ";
128 anAttrSketch->isInitialized() ? theDumper << "[]" : theDumper << anAttrObjects;
129 theDumper << ", " << anAttrDirection;
131 std::string aCreationMethod =
132 aBase->string(FeaturesPlugin_Extrusion::CREATION_METHOD())->value();
134 if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES()) {
135 AttributeDoublePtr anAttrToSize = aBase->real(FeaturesPlugin_Extrusion::TO_SIZE_ID());
136 AttributeDoublePtr anAttrFromSize = aBase->real(FeaturesPlugin_Extrusion::FROM_SIZE_ID());
138 theDumper << ", " << anAttrToSize << ", " << anAttrFromSize;
139 } else if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES()) {
140 AttributeSelectionPtr anAttrToObject =
141 aBase->selection(FeaturesPlugin_Extrusion::TO_OBJECT_ID());
142 AttributeDoublePtr anAttrToOffset = aBase->real(FeaturesPlugin_Extrusion::TO_OFFSET_ID());
143 AttributeSelectionPtr anAttrFromObject =
144 aBase->selection(FeaturesPlugin_Extrusion::FROM_OBJECT_ID());
145 AttributeDoublePtr anAttrFromOffset = aBase->real(FeaturesPlugin_Extrusion::FROM_OFFSET_ID());
147 theDumper << ", " << anAttrToObject << ", " << anAttrToOffset <<
148 ", " << anAttrFromObject << ", " << anAttrFromOffset;
151 AttributeSelectionListPtr anAttrBoolObjects =
152 aBase->selectionList(FeaturesPlugin_CompositeBoolean::OBJECTS_ID());
153 theDumper << ", " << anAttrBoolObjects << ")" << std::endl;
155 if(anAttrSketch->isInitialized()) {
156 theDumper << aBase << ".setNestedSketch(" << anAttrSketch << ")" << std::endl;
160 //==================================================================================================
161 void FeaturesAPI_ExtrusionBoolean::execIfBaseNotEmpty()
163 if(mybaseObjects->size() > 0) {
169 //==================================================================================================
170 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
171 const std::shared_ptr<ModelAPI_Feature>& theFeature)
172 : FeaturesAPI_ExtrusionBoolean(theFeature)
177 //==================================================================================================
178 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
179 const std::shared_ptr<ModelAPI_Feature>& theFeature,
180 const std::list<ModelHighAPI_Selection>& theBaseObjects,
181 const ModelHighAPI_Double& theSize,
182 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
183 : FeaturesAPI_ExtrusionBoolean(theFeature)
186 fillAttribute(theBaseObjects, mybaseObjects);
187 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
188 fillAttribute(theSize, mytoSize);
189 fillAttribute(ModelHighAPI_Double(), myfromSize);
190 setBooleanObjects(theBooleanObjects);
194 //==================================================================================================
195 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
196 const std::shared_ptr<ModelAPI_Feature>& theFeature,
197 const std::list<ModelHighAPI_Selection>& theBaseObjects,
198 const ModelHighAPI_Selection& theDirection,
199 const ModelHighAPI_Double& theSize,
200 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
201 : FeaturesAPI_ExtrusionBoolean(theFeature)
204 fillAttribute(theBaseObjects, mybaseObjects);
205 fillAttribute(theDirection, mydirection);
206 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
207 fillAttribute(theSize, mytoSize);
208 fillAttribute(ModelHighAPI_Double(), myfromSize);
209 setBooleanObjects(theBooleanObjects);
213 //==================================================================================================
214 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
215 const std::shared_ptr<ModelAPI_Feature>& theFeature,
216 const std::list<ModelHighAPI_Selection>& theBaseObjects,
217 const ModelHighAPI_Double& theToSize,
218 const ModelHighAPI_Double& theFromSize,
219 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
220 : FeaturesAPI_ExtrusionBoolean(theFeature)
223 fillAttribute(theBaseObjects, mybaseObjects);
224 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
225 fillAttribute(theToSize, mytoSize);
226 fillAttribute(theFromSize, myfromSize);
227 setBooleanObjects(theBooleanObjects);
231 //==================================================================================================
232 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
233 const std::shared_ptr<ModelAPI_Feature>& theFeature,
234 const std::list<ModelHighAPI_Selection>& theBaseObjects,
235 const ModelHighAPI_Selection& theDirection,
236 const ModelHighAPI_Double& theToSize,
237 const ModelHighAPI_Double& theFromSize,
238 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
239 : FeaturesAPI_ExtrusionBoolean(theFeature)
242 fillAttribute(theBaseObjects, mybaseObjects);
243 fillAttribute(theDirection, mydirection);
244 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
245 fillAttribute(theToSize, mytoSize);
246 fillAttribute(theFromSize, myfromSize);
247 setBooleanObjects(theBooleanObjects);
251 //==================================================================================================
252 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
253 const std::shared_ptr<ModelAPI_Feature>& theFeature,
254 const std::list<ModelHighAPI_Selection>& theBaseObjects,
255 const ModelHighAPI_Selection& theToObject,
256 const ModelHighAPI_Double& theToOffset,
257 const ModelHighAPI_Selection& theFromObject,
258 const ModelHighAPI_Double& theFromOffset,
259 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
260 : FeaturesAPI_ExtrusionBoolean(theFeature)
263 fillAttribute(theBaseObjects, mybaseObjects);
264 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
265 fillAttribute(theToObject, mytoObject);
266 fillAttribute(theToOffset, mytoOffset);
267 fillAttribute(theFromObject, myfromObject);
268 fillAttribute(theFromOffset, myfromOffset);
269 setBooleanObjects(theBooleanObjects);
273 //==================================================================================================
274 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
275 const std::shared_ptr<ModelAPI_Feature>& theFeature,
276 const std::list<ModelHighAPI_Selection>& theBaseObjects,
277 const ModelHighAPI_Selection& theDirection,
278 const ModelHighAPI_Selection& theToObject,
279 const ModelHighAPI_Double& theToOffset,
280 const ModelHighAPI_Selection& theFromObject,
281 const ModelHighAPI_Double& theFromOffset,
282 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
283 : FeaturesAPI_ExtrusionBoolean(theFeature)
286 fillAttribute(theBaseObjects, mybaseObjects);
287 fillAttribute(theDirection, mydirection);
288 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
289 fillAttribute(theToObject, mytoObject);
290 fillAttribute(theToOffset, mytoOffset);
291 fillAttribute(theFromObject, myfromObject);
292 fillAttribute(theFromOffset, myfromOffset);
293 setBooleanObjects(theBooleanObjects);
297 //==================================================================================================
298 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
299 const std::list<ModelHighAPI_Selection>& theBaseObjects,
300 const ModelHighAPI_Double& theSize,
301 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
303 std::shared_ptr<ModelAPI_Feature> aFeature =
304 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
305 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects,
306 theSize, theBooleanObjects));
309 //==================================================================================================
310 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
311 const std::list<ModelHighAPI_Selection>& theBaseObjects,
312 const ModelHighAPI_Selection& theDirection,
313 const ModelHighAPI_Double& theSize,
314 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
316 std::shared_ptr<ModelAPI_Feature> aFeature =
317 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
318 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theDirection,
319 theSize, theBooleanObjects));
322 //==================================================================================================
323 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
324 const std::list<ModelHighAPI_Selection>& theBaseObjects,
325 const ModelHighAPI_Double& theToSize,
326 const ModelHighAPI_Double& theFromSize,
327 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
329 std::shared_ptr<ModelAPI_Feature> aFeature =
330 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
331 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects,
332 theToSize, theFromSize, theBooleanObjects));
335 //==================================================================================================
336 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
337 const std::list<ModelHighAPI_Selection>& theBaseObjects,
338 const ModelHighAPI_Selection& theDirection,
339 const ModelHighAPI_Double& theToSize,
340 const ModelHighAPI_Double& theFromSize,
341 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
343 std::shared_ptr<ModelAPI_Feature> aFeature =
344 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
345 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
353 //==================================================================================================
354 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
355 const std::list<ModelHighAPI_Selection>& theBaseObjects,
356 const ModelHighAPI_Selection& theToObject,
357 const ModelHighAPI_Double& theToOffset,
358 const ModelHighAPI_Selection& theFromObject,
359 const ModelHighAPI_Double& theFromOffset,
360 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
362 std::shared_ptr<ModelAPI_Feature> aFeature =
363 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
364 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
373 //==================================================================================================
374 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
375 const std::list<ModelHighAPI_Selection>& theBaseObjects,
376 const ModelHighAPI_Selection& theDirection,
377 const ModelHighAPI_Selection& theToObject,
378 const ModelHighAPI_Double& theToOffset,
379 const ModelHighAPI_Selection& theFromObject,
380 const ModelHighAPI_Double& theFromOffset,
381 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
383 std::shared_ptr<ModelAPI_Feature> aFeature =
384 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
385 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
396 //==================================================================================================
397 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
398 const std::shared_ptr<ModelAPI_Feature>& theFeature)
399 : FeaturesAPI_ExtrusionBoolean(theFeature)
404 //==================================================================================================
405 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
406 const std::shared_ptr<ModelAPI_Feature>& theFeature,
407 const std::list<ModelHighAPI_Selection>& theBaseObjects,
408 const ModelHighAPI_Double& theSize,
409 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
410 : FeaturesAPI_ExtrusionBoolean(theFeature)
413 fillAttribute(theBaseObjects, mybaseObjects);
414 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
415 fillAttribute(theSize, mytoSize);
416 fillAttribute(ModelHighAPI_Double(), myfromSize);
417 setBooleanObjects(theBooleanObjects);
421 //==================================================================================================
422 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
423 const std::shared_ptr<ModelAPI_Feature>& theFeature,
424 const std::list<ModelHighAPI_Selection>& theBaseObjects,
425 const ModelHighAPI_Selection& theDirection,
426 const ModelHighAPI_Double& theSize,
427 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
428 : FeaturesAPI_ExtrusionBoolean(theFeature)
431 fillAttribute(theBaseObjects, mybaseObjects);
432 fillAttribute(theDirection, mydirection);
433 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
434 fillAttribute(theSize, mytoSize);
435 fillAttribute(ModelHighAPI_Double(), myfromSize);
436 setBooleanObjects(theBooleanObjects);
440 //==================================================================================================
441 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
442 const std::shared_ptr<ModelAPI_Feature>& theFeature,
443 const std::list<ModelHighAPI_Selection>& theBaseObjects,
444 const ModelHighAPI_Double& theToSize,
445 const ModelHighAPI_Double& theFromSize,
446 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
447 : FeaturesAPI_ExtrusionBoolean(theFeature)
450 fillAttribute(theBaseObjects, mybaseObjects);
451 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
452 fillAttribute(theToSize, mytoSize);
453 fillAttribute(theFromSize, myfromSize);
454 setBooleanObjects(theBooleanObjects);
458 //==================================================================================================
459 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
460 const std::shared_ptr<ModelAPI_Feature>& theFeature,
461 const std::list<ModelHighAPI_Selection>& theBaseObjects,
462 const ModelHighAPI_Selection& theDirection,
463 const ModelHighAPI_Double& theToSize,
464 const ModelHighAPI_Double& theFromSize,
465 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
466 : FeaturesAPI_ExtrusionBoolean(theFeature)
469 fillAttribute(theBaseObjects, mybaseObjects);
470 fillAttribute(theDirection, mydirection);
471 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
472 fillAttribute(theToSize, mytoSize);
473 fillAttribute(theFromSize, myfromSize);
474 setBooleanObjects(theBooleanObjects);
478 //==================================================================================================
479 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
480 const std::shared_ptr<ModelAPI_Feature>& theFeature,
481 const std::list<ModelHighAPI_Selection>& theBaseObjects,
482 const ModelHighAPI_Selection& theToObject,
483 const ModelHighAPI_Double& theToOffset,
484 const ModelHighAPI_Selection& theFromObject,
485 const ModelHighAPI_Double& theFromOffset,
486 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
487 : FeaturesAPI_ExtrusionBoolean(theFeature)
490 fillAttribute(theBaseObjects, mybaseObjects);
491 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
492 fillAttribute(theToObject, mytoObject);
493 fillAttribute(theToOffset, mytoOffset);
494 fillAttribute(theFromObject, myfromObject);
495 fillAttribute(theFromOffset, myfromOffset);
496 setBooleanObjects(theBooleanObjects);
500 //==================================================================================================
501 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
502 const std::shared_ptr<ModelAPI_Feature>& theFeature,
503 const std::list<ModelHighAPI_Selection>& theBaseObjects,
504 const ModelHighAPI_Selection& theDirection,
505 const ModelHighAPI_Selection& theToObject,
506 const ModelHighAPI_Double& theToOffset,
507 const ModelHighAPI_Selection& theFromObject,
508 const ModelHighAPI_Double& theFromOffset,
509 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
510 : FeaturesAPI_ExtrusionBoolean(theFeature)
513 fillAttribute(theBaseObjects, mybaseObjects);
514 fillAttribute(theDirection, mydirection);
515 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
516 fillAttribute(theToObject, mytoObject);
517 fillAttribute(theToOffset, mytoOffset);
518 fillAttribute(theFromObject, myfromObject);
519 fillAttribute(theFromOffset, myfromOffset);
520 setBooleanObjects(theBooleanObjects);
524 //==================================================================================================
525 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
526 const std::list<ModelHighAPI_Selection>& theBaseObjects,
527 const ModelHighAPI_Double& theSize,
528 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
530 std::shared_ptr<ModelAPI_Feature> aFeature =
531 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
532 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects,
533 theSize, theBooleanObjects));
536 //==================================================================================================
537 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
538 const std::list<ModelHighAPI_Selection>& theBaseObjects,
539 const ModelHighAPI_Selection& theDirection,
540 const ModelHighAPI_Double& theSize,
541 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
543 std::shared_ptr<ModelAPI_Feature> aFeature =
544 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
545 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects,
546 theDirection, theSize, theBooleanObjects));
549 //==================================================================================================
550 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
551 const std::list<ModelHighAPI_Selection>& theBaseObjects,
552 const ModelHighAPI_Double& theToSize,
553 const ModelHighAPI_Double& theFromSize,
554 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
556 std::shared_ptr<ModelAPI_Feature> aFeature =
557 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
558 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects,
559 theToSize, theFromSize, theBooleanObjects));
562 //==================================================================================================
563 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
564 const std::list<ModelHighAPI_Selection>& theBaseObjects,
565 const ModelHighAPI_Selection& theDirection,
566 const ModelHighAPI_Double& theToSize,
567 const ModelHighAPI_Double& theFromSize,
568 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
570 std::shared_ptr<ModelAPI_Feature> aFeature =
571 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
572 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
580 //==================================================================================================
581 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
582 const std::list<ModelHighAPI_Selection>& theBaseObjects,
583 const ModelHighAPI_Selection& theToObject,
584 const ModelHighAPI_Double& theToOffset,
585 const ModelHighAPI_Selection& theFromObject,
586 const ModelHighAPI_Double& theFromOffset,
587 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
589 std::shared_ptr<ModelAPI_Feature> aFeature =
590 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
591 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
600 //==================================================================================================
601 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
602 const std::list<ModelHighAPI_Selection>& theBaseObjects,
603 const ModelHighAPI_Selection& theDirection,
604 const ModelHighAPI_Selection& theToObject,
605 const ModelHighAPI_Double& theToOffset,
606 const ModelHighAPI_Selection& theFromObject,
607 const ModelHighAPI_Double& theFromOffset,
608 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
610 std::shared_ptr<ModelAPI_Feature> aFeature =
611 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
612 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,