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(const std::shared_ptr<ModelAPI_Feature>& theFeature)
16 : ModelHighAPI_Interface(theFeature)
20 //==================================================================================================
21 FeaturesAPI_ExtrusionBoolean::~FeaturesAPI_ExtrusionBoolean()
25 //==================================================================================================
26 void FeaturesAPI_ExtrusionBoolean::setNestedSketch(const ModelHighAPI_Reference& theSketch)
28 mysketch->setValue(theSketch.feature());
30 // To make Sketch feature execute and subfeatures execute.
31 feature()->document()->setCurrentFeature(feature(), false);
33 // to inform that the history is updated due to the sketch moved under the composite feature
34 if (theSketch.feature().get()) {
35 theSketch.feature()->document()->updateHistory(ModelAPI_Feature::group());
36 if (theSketch.feature()->firstResult().get())
37 theSketch.feature()->firstResult()->setDisplayed(false);
39 mybaseObjects->clear();
40 mybaseObjects->append(theSketch.feature()->firstResult(), GeomShapePtr());
45 //==================================================================================================
46 void FeaturesAPI_ExtrusionBoolean::setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects)
48 mysketch->setValue(ObjectPtr());
49 mybaseObjects->clear();
50 fillAttribute(theBaseObjects, mybaseObjects);
55 //==================================================================================================
56 void FeaturesAPI_ExtrusionBoolean::setDirection(const ModelHighAPI_Selection& theDirection)
58 fillAttribute(theDirection, mydirection);
63 //==================================================================================================
64 void FeaturesAPI_ExtrusionBoolean::setSizes(const ModelHighAPI_Double& theToSize,
65 const ModelHighAPI_Double& theFromSize)
67 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
68 fillAttribute(theToSize, mytoSize);
69 fillAttribute(theFromSize, myfromSize);
74 //==================================================================================================
75 void FeaturesAPI_ExtrusionBoolean::setSize(const ModelHighAPI_Double& theSize)
77 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
78 fillAttribute(theSize, mytoSize);
79 fillAttribute(ModelHighAPI_Double(), myfromSize);
84 //==================================================================================================
85 void FeaturesAPI_ExtrusionBoolean::setPlanesAndOffsets(const ModelHighAPI_Selection& theToObject,
86 const ModelHighAPI_Double& theToOffset,
87 const ModelHighAPI_Selection& theFromObject,
88 const ModelHighAPI_Double& theFromOffset)
90 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
91 fillAttribute(theToObject, mytoObject);
92 fillAttribute(theToOffset, mytoOffset);
93 fillAttribute(theFromObject, myfromObject);
94 fillAttribute(theFromOffset, myfromOffset);
99 //==================================================================================================
100 void FeaturesAPI_ExtrusionBoolean::setBooleanObjects(const std::list<ModelHighAPI_Selection>& theBooleanObjects)
102 fillAttribute(theBooleanObjects, mybooleanObjects);
104 execIfBaseNotEmpty();
107 //==================================================================================================
108 void FeaturesAPI_ExtrusionBoolean::dump(ModelHighAPI_Dumper& theDumper) const
110 FeaturePtr aBase = feature();
111 const std::string& aDocName = theDumper.name(aBase->document());
113 AttributeReferencePtr anAttrSketch = aBase->reference(FeaturesPlugin_Extrusion::SKETCH_ID());
114 AttributeSelectionListPtr anAttrObjects = aBase->selectionList(FeaturesPlugin_Extrusion::BASE_OBJECTS_ID());
115 AttributeSelectionPtr anAttrDirection = aBase->selection(FeaturesPlugin_Extrusion::DIRECTION_OBJECT_ID());
117 theDumper << aBase << " = model.addExtrusion";
118 if(aBase->getKind() == FeaturesPlugin_ExtrusionCut::ID()) {
120 } else if(aBase->getKind() == FeaturesPlugin_ExtrusionFuse::ID()) {
123 theDumper << "(" << aDocName << ", ";
124 anAttrSketch->isInitialized() ? theDumper << "[]" : theDumper << anAttrObjects;
125 theDumper << ", " << anAttrDirection;
127 std::string aCreationMethod = aBase->string(FeaturesPlugin_Extrusion::CREATION_METHOD())->value();
129 if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES()) {
130 AttributeDoublePtr anAttrToSize = aBase->real(FeaturesPlugin_Extrusion::TO_SIZE_ID());
131 AttributeDoublePtr anAttrFromSize = aBase->real(FeaturesPlugin_Extrusion::FROM_SIZE_ID());
133 theDumper << ", " << anAttrToSize << ", " << anAttrFromSize;
134 } else if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES()) {
135 AttributeSelectionPtr anAttrToObject = aBase->selection(FeaturesPlugin_Extrusion::TO_OBJECT_ID());
136 AttributeDoublePtr anAttrToOffset = aBase->real(FeaturesPlugin_Extrusion::TO_OFFSET_ID());
137 AttributeSelectionPtr anAttrFromObject = aBase->selection(FeaturesPlugin_Extrusion::FROM_OBJECT_ID());
138 AttributeDoublePtr anAttrFromOffset = aBase->real(FeaturesPlugin_Extrusion::FROM_OFFSET_ID());
140 theDumper << ", " << anAttrToObject << ", " << anAttrToOffset << ", " << anAttrFromObject << ", " << anAttrFromOffset;
143 AttributeSelectionListPtr anAttrBoolObjects = aBase->selectionList(FeaturesPlugin_CompositeBoolean::OBJECTS_ID());
144 theDumper << ", " << anAttrBoolObjects << ")" << std::endl;
146 if(anAttrSketch->isInitialized()) {
147 theDumper << aBase << ".setNestedSketch(" << anAttrSketch << ")" << std::endl;
151 //==================================================================================================
152 void FeaturesAPI_ExtrusionBoolean::execIfBaseNotEmpty()
154 if(mybaseObjects->size() > 0) {
160 //==================================================================================================
161 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature)
162 : FeaturesAPI_ExtrusionBoolean(theFeature)
167 //==================================================================================================
168 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
169 const std::list<ModelHighAPI_Selection>& theBaseObjects,
170 const ModelHighAPI_Double& theSize,
171 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
172 : FeaturesAPI_ExtrusionBoolean(theFeature)
175 fillAttribute(theBaseObjects, mybaseObjects);
176 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
177 fillAttribute(theSize, mytoSize);
178 fillAttribute(ModelHighAPI_Double(), myfromSize);
179 setBooleanObjects(theBooleanObjects);
183 //==================================================================================================
184 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
185 const std::list<ModelHighAPI_Selection>& theBaseObjects,
186 const ModelHighAPI_Selection& theDirection,
187 const ModelHighAPI_Double& theSize,
188 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
189 : FeaturesAPI_ExtrusionBoolean(theFeature)
192 fillAttribute(theBaseObjects, mybaseObjects);
193 fillAttribute(theDirection, mydirection);
194 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
195 fillAttribute(theSize, mytoSize);
196 fillAttribute(ModelHighAPI_Double(), myfromSize);
197 setBooleanObjects(theBooleanObjects);
201 //==================================================================================================
202 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
203 const std::list<ModelHighAPI_Selection>& theBaseObjects,
204 const ModelHighAPI_Double& theToSize,
205 const ModelHighAPI_Double& theFromSize,
206 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
207 : FeaturesAPI_ExtrusionBoolean(theFeature)
210 fillAttribute(theBaseObjects, mybaseObjects);
211 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
212 fillAttribute(theToSize, mytoSize);
213 fillAttribute(theFromSize, myfromSize);
214 setBooleanObjects(theBooleanObjects);
218 //==================================================================================================
219 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
220 const std::list<ModelHighAPI_Selection>& theBaseObjects,
221 const ModelHighAPI_Selection& theDirection,
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 fillAttribute(theDirection, mydirection);
230 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
231 fillAttribute(theToSize, mytoSize);
232 fillAttribute(theFromSize, myfromSize);
233 setBooleanObjects(theBooleanObjects);
237 //==================================================================================================
238 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
239 const std::list<ModelHighAPI_Selection>& theBaseObjects,
240 const ModelHighAPI_Selection& theToObject,
241 const ModelHighAPI_Double& theToOffset,
242 const ModelHighAPI_Selection& theFromObject,
243 const ModelHighAPI_Double& theFromOffset,
244 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
245 : FeaturesAPI_ExtrusionBoolean(theFeature)
248 fillAttribute(theBaseObjects, mybaseObjects);
249 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
250 fillAttribute(theToObject, mytoObject);
251 fillAttribute(theToOffset, mytoOffset);
252 fillAttribute(theFromObject, myfromObject);
253 fillAttribute(theFromOffset, myfromOffset);
254 setBooleanObjects(theBooleanObjects);
258 //==================================================================================================
259 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
260 const std::list<ModelHighAPI_Selection>& theBaseObjects,
261 const ModelHighAPI_Selection& theDirection,
262 const ModelHighAPI_Selection& theToObject,
263 const ModelHighAPI_Double& theToOffset,
264 const ModelHighAPI_Selection& theFromObject,
265 const ModelHighAPI_Double& theFromOffset,
266 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
267 : FeaturesAPI_ExtrusionBoolean(theFeature)
270 fillAttribute(theBaseObjects, mybaseObjects);
271 fillAttribute(theDirection, mydirection);
272 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
273 fillAttribute(theToObject, mytoObject);
274 fillAttribute(theToOffset, mytoOffset);
275 fillAttribute(theFromObject, myfromObject);
276 fillAttribute(theFromOffset, myfromOffset);
277 setBooleanObjects(theBooleanObjects);
281 //==================================================================================================
282 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
283 const std::list<ModelHighAPI_Selection>& theBaseObjects,
284 const ModelHighAPI_Double& theSize,
285 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
287 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
288 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theSize, theBooleanObjects));
291 //==================================================================================================
292 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
293 const std::list<ModelHighAPI_Selection>& theBaseObjects,
294 const ModelHighAPI_Selection& theDirection,
295 const ModelHighAPI_Double& theSize,
296 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
298 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
299 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theDirection, theSize, theBooleanObjects));
302 //==================================================================================================
303 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
304 const std::list<ModelHighAPI_Selection>& theBaseObjects,
305 const ModelHighAPI_Double& theToSize,
306 const ModelHighAPI_Double& theFromSize,
307 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
309 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
310 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theToSize, theFromSize, theBooleanObjects));
313 //==================================================================================================
314 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
315 const std::list<ModelHighAPI_Selection>& theBaseObjects,
316 const ModelHighAPI_Selection& theDirection,
317 const ModelHighAPI_Double& theToSize,
318 const ModelHighAPI_Double& theFromSize,
319 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
321 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
322 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
330 //==================================================================================================
331 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
332 const std::list<ModelHighAPI_Selection>& theBaseObjects,
333 const ModelHighAPI_Selection& theToObject,
334 const ModelHighAPI_Double& theToOffset,
335 const ModelHighAPI_Selection& theFromObject,
336 const ModelHighAPI_Double& theFromOffset,
337 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
339 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
340 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
349 //==================================================================================================
350 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
351 const std::list<ModelHighAPI_Selection>& theBaseObjects,
352 const ModelHighAPI_Selection& theDirection,
353 const ModelHighAPI_Selection& theToObject,
354 const ModelHighAPI_Double& theToOffset,
355 const ModelHighAPI_Selection& theFromObject,
356 const ModelHighAPI_Double& theFromOffset,
357 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
359 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
360 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
371 //==================================================================================================
372 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature)
373 : FeaturesAPI_ExtrusionBoolean(theFeature)
378 //==================================================================================================
379 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
380 const std::list<ModelHighAPI_Selection>& theBaseObjects,
381 const ModelHighAPI_Double& theSize,
382 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
383 : FeaturesAPI_ExtrusionBoolean(theFeature)
386 fillAttribute(theBaseObjects, mybaseObjects);
387 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
388 fillAttribute(theSize, mytoSize);
389 fillAttribute(ModelHighAPI_Double(), myfromSize);
390 setBooleanObjects(theBooleanObjects);
394 //==================================================================================================
395 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
396 const std::list<ModelHighAPI_Selection>& theBaseObjects,
397 const ModelHighAPI_Selection& theDirection,
398 const ModelHighAPI_Double& theSize,
399 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
400 : FeaturesAPI_ExtrusionBoolean(theFeature)
403 fillAttribute(theBaseObjects, mybaseObjects);
404 fillAttribute(theDirection, mydirection);
405 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
406 fillAttribute(theSize, mytoSize);
407 fillAttribute(ModelHighAPI_Double(), myfromSize);
408 setBooleanObjects(theBooleanObjects);
412 //==================================================================================================
413 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
414 const std::list<ModelHighAPI_Selection>& theBaseObjects,
415 const ModelHighAPI_Double& theToSize,
416 const ModelHighAPI_Double& theFromSize,
417 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
418 : FeaturesAPI_ExtrusionBoolean(theFeature)
421 fillAttribute(theBaseObjects, mybaseObjects);
422 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
423 fillAttribute(theToSize, mytoSize);
424 fillAttribute(theFromSize, myfromSize);
425 setBooleanObjects(theBooleanObjects);
429 //==================================================================================================
430 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
431 const std::list<ModelHighAPI_Selection>& theBaseObjects,
432 const ModelHighAPI_Selection& theDirection,
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 fillAttribute(theDirection, mydirection);
441 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
442 fillAttribute(theToSize, mytoSize);
443 fillAttribute(theFromSize, myfromSize);
444 setBooleanObjects(theBooleanObjects);
448 //==================================================================================================
449 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
450 const std::list<ModelHighAPI_Selection>& theBaseObjects,
451 const ModelHighAPI_Selection& theToObject,
452 const ModelHighAPI_Double& theToOffset,
453 const ModelHighAPI_Selection& theFromObject,
454 const ModelHighAPI_Double& theFromOffset,
455 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
456 : FeaturesAPI_ExtrusionBoolean(theFeature)
459 fillAttribute(theBaseObjects, mybaseObjects);
460 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
461 fillAttribute(theToObject, mytoObject);
462 fillAttribute(theToOffset, mytoOffset);
463 fillAttribute(theFromObject, myfromObject);
464 fillAttribute(theFromOffset, myfromOffset);
465 setBooleanObjects(theBooleanObjects);
469 //==================================================================================================
470 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
471 const std::list<ModelHighAPI_Selection>& theBaseObjects,
472 const ModelHighAPI_Selection& theDirection,
473 const ModelHighAPI_Selection& theToObject,
474 const ModelHighAPI_Double& theToOffset,
475 const ModelHighAPI_Selection& theFromObject,
476 const ModelHighAPI_Double& theFromOffset,
477 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
478 : FeaturesAPI_ExtrusionBoolean(theFeature)
481 fillAttribute(theBaseObjects, mybaseObjects);
482 fillAttribute(theDirection, mydirection);
483 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
484 fillAttribute(theToObject, mytoObject);
485 fillAttribute(theToOffset, mytoOffset);
486 fillAttribute(theFromObject, myfromObject);
487 fillAttribute(theFromOffset, myfromOffset);
488 setBooleanObjects(theBooleanObjects);
492 //==================================================================================================
493 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
494 const std::list<ModelHighAPI_Selection>& theBaseObjects,
495 const ModelHighAPI_Double& theSize,
496 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
498 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
499 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theSize, theBooleanObjects));
502 //==================================================================================================
503 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
504 const std::list<ModelHighAPI_Selection>& theBaseObjects,
505 const ModelHighAPI_Selection& theDirection,
506 const ModelHighAPI_Double& theSize,
507 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
509 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
510 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theDirection, theSize, theBooleanObjects));
513 //==================================================================================================
514 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
515 const std::list<ModelHighAPI_Selection>& theBaseObjects,
516 const ModelHighAPI_Double& theToSize,
517 const ModelHighAPI_Double& theFromSize,
518 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
520 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
521 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theToSize, theFromSize, theBooleanObjects));
524 //==================================================================================================
525 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
526 const std::list<ModelHighAPI_Selection>& theBaseObjects,
527 const ModelHighAPI_Selection& theDirection,
528 const ModelHighAPI_Double& theToSize,
529 const ModelHighAPI_Double& theFromSize,
530 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
532 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
533 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
541 //==================================================================================================
542 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
543 const std::list<ModelHighAPI_Selection>& theBaseObjects,
544 const ModelHighAPI_Selection& theToObject,
545 const ModelHighAPI_Double& theToOffset,
546 const ModelHighAPI_Selection& theFromObject,
547 const ModelHighAPI_Double& theFromOffset,
548 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
550 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
551 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
560 //==================================================================================================
561 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
562 const std::list<ModelHighAPI_Selection>& theBaseObjects,
563 const ModelHighAPI_Selection& theDirection,
564 const ModelHighAPI_Selection& theToObject,
565 const ModelHighAPI_Double& theToOffset,
566 const ModelHighAPI_Selection& theFromObject,
567 const ModelHighAPI_Double& theFromOffset,
568 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
570 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
571 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,