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());
29 // to inform that the history is updated due to the sketch moved under the composite feature
30 if (theSketch.feature().get()) {
31 theSketch.feature()->document()->updateHistory(ModelAPI_Feature::group());
32 if (theSketch.feature()->firstResult().get())
33 theSketch.feature()->firstResult()->setDisplayed(false);
35 mybaseObjects->clear();
36 mybaseObjects->append(theSketch.feature()->firstResult(), GeomShapePtr());
41 //==================================================================================================
42 void FeaturesAPI_ExtrusionBoolean::setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects)
44 mysketch->setValue(ObjectPtr());
45 mybaseObjects->clear();
46 fillAttribute(theBaseObjects, mybaseObjects);
51 //==================================================================================================
52 void FeaturesAPI_ExtrusionBoolean::setDirection(const ModelHighAPI_Selection& theDirection)
54 fillAttribute(theDirection, mydirection);
59 //==================================================================================================
60 void FeaturesAPI_ExtrusionBoolean::setSizes(const ModelHighAPI_Double& theToSize,
61 const ModelHighAPI_Double& theFromSize)
63 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
64 fillAttribute(theToSize, mytoSize);
65 fillAttribute(theFromSize, myfromSize);
70 //==================================================================================================
71 void FeaturesAPI_ExtrusionBoolean::setSize(const ModelHighAPI_Double& theSize)
73 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
74 fillAttribute(theSize, mytoSize);
75 fillAttribute(ModelHighAPI_Double(), myfromSize);
80 //==================================================================================================
81 void FeaturesAPI_ExtrusionBoolean::setPlanesAndOffsets(const ModelHighAPI_Selection& theToObject,
82 const ModelHighAPI_Double& theToOffset,
83 const ModelHighAPI_Selection& theFromObject,
84 const ModelHighAPI_Double& theFromOffset)
86 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
87 fillAttribute(theToObject, mytoObject);
88 fillAttribute(theToOffset, mytoOffset);
89 fillAttribute(theFromObject, myfromObject);
90 fillAttribute(theFromOffset, myfromOffset);
95 //==================================================================================================
96 void FeaturesAPI_ExtrusionBoolean::setBooleanObjects(const std::list<ModelHighAPI_Selection>& theBooleanObjects)
98 fillAttribute(theBooleanObjects, mybooleanObjects);
100 execIfBaseNotEmpty();
103 //==================================================================================================
104 void FeaturesAPI_ExtrusionBoolean::dump(ModelHighAPI_Dumper& theDumper) const
106 FeaturePtr aBase = feature();
107 const std::string& aDocName = theDumper.name(aBase->document());
109 AttributeReferencePtr anAttrSketch = aBase->reference(FeaturesPlugin_Extrusion::SKETCH_ID());
110 AttributeSelectionListPtr anAttrObjects = aBase->selectionList(FeaturesPlugin_Extrusion::BASE_OBJECTS_ID());
111 AttributeSelectionPtr anAttrDirection = aBase->selection(FeaturesPlugin_Extrusion::DIRECTION_OBJECT_ID());
113 theDumper << aBase << " = model.addExtrusion";
114 if(aBase->getKind() == FeaturesPlugin_ExtrusionCut::ID()) {
116 } else if(aBase->getKind() == FeaturesPlugin_ExtrusionFuse::ID()) {
119 theDumper << "(" << aDocName << ", ";
120 anAttrSketch->isInitialized() ? theDumper << "[]" : theDumper << anAttrObjects;
121 theDumper << ", " << anAttrDirection;
123 std::string aCreationMethod = aBase->string(FeaturesPlugin_Extrusion::CREATION_METHOD())->value();
125 if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES()) {
126 AttributeDoublePtr anAttrToSize = aBase->real(FeaturesPlugin_Extrusion::TO_SIZE_ID());
127 AttributeDoublePtr anAttrFromSize = aBase->real(FeaturesPlugin_Extrusion::FROM_SIZE_ID());
129 theDumper << ", " << anAttrToSize << ", " << anAttrFromSize;
130 } else if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES()) {
131 AttributeSelectionPtr anAttrToObject = aBase->selection(FeaturesPlugin_Extrusion::TO_OBJECT_ID());
132 AttributeDoublePtr anAttrToOffset = aBase->real(FeaturesPlugin_Extrusion::TO_OFFSET_ID());
133 AttributeSelectionPtr anAttrFromObject = aBase->selection(FeaturesPlugin_Extrusion::FROM_OBJECT_ID());
134 AttributeDoublePtr anAttrFromOffset = aBase->real(FeaturesPlugin_Extrusion::FROM_OFFSET_ID());
136 theDumper << ", " << anAttrToObject << ", " << anAttrToOffset << ", " << anAttrFromObject << ", " << anAttrFromOffset;
139 AttributeSelectionListPtr anAttrBoolObjects = aBase->selectionList(FeaturesPlugin_CompositeBoolean::OBJECTS_ID());
140 theDumper << ", " << anAttrBoolObjects << ")" << std::endl;
142 if(anAttrSketch->isInitialized()) {
143 theDumper << aBase << ".setNestedSketch(" << anAttrSketch << ")" << std::endl;
147 //==================================================================================================
148 void FeaturesAPI_ExtrusionBoolean::execIfBaseNotEmpty()
150 if(mybaseObjects->size() > 0) {
156 //==================================================================================================
157 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature)
158 : FeaturesAPI_ExtrusionBoolean(theFeature)
163 //==================================================================================================
164 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
165 const std::list<ModelHighAPI_Selection>& theBaseObjects,
166 const ModelHighAPI_Double& theSize,
167 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
168 : FeaturesAPI_ExtrusionBoolean(theFeature)
171 fillAttribute(theBaseObjects, mybaseObjects);
172 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
173 fillAttribute(theSize, mytoSize);
174 fillAttribute(ModelHighAPI_Double(), myfromSize);
175 setBooleanObjects(theBooleanObjects);
179 //==================================================================================================
180 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
181 const std::list<ModelHighAPI_Selection>& theBaseObjects,
182 const ModelHighAPI_Selection& theDirection,
183 const ModelHighAPI_Double& theSize,
184 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
185 : FeaturesAPI_ExtrusionBoolean(theFeature)
188 fillAttribute(theBaseObjects, mybaseObjects);
189 fillAttribute(theDirection, mydirection);
190 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
191 fillAttribute(theSize, mytoSize);
192 fillAttribute(ModelHighAPI_Double(), myfromSize);
193 setBooleanObjects(theBooleanObjects);
197 //==================================================================================================
198 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
199 const std::list<ModelHighAPI_Selection>& theBaseObjects,
200 const ModelHighAPI_Double& theToSize,
201 const ModelHighAPI_Double& theFromSize,
202 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
203 : FeaturesAPI_ExtrusionBoolean(theFeature)
206 fillAttribute(theBaseObjects, mybaseObjects);
207 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
208 fillAttribute(theToSize, mytoSize);
209 fillAttribute(theFromSize, myfromSize);
210 setBooleanObjects(theBooleanObjects);
214 //==================================================================================================
215 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
216 const std::list<ModelHighAPI_Selection>& theBaseObjects,
217 const ModelHighAPI_Selection& theDirection,
218 const ModelHighAPI_Double& theToSize,
219 const ModelHighAPI_Double& theFromSize,
220 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
221 : FeaturesAPI_ExtrusionBoolean(theFeature)
224 fillAttribute(theBaseObjects, mybaseObjects);
225 fillAttribute(theDirection, mydirection);
226 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
227 fillAttribute(theToSize, mytoSize);
228 fillAttribute(theFromSize, myfromSize);
229 setBooleanObjects(theBooleanObjects);
233 //==================================================================================================
234 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
235 const std::list<ModelHighAPI_Selection>& theBaseObjects,
236 const ModelHighAPI_Selection& theToObject,
237 const ModelHighAPI_Double& theToOffset,
238 const ModelHighAPI_Selection& theFromObject,
239 const ModelHighAPI_Double& theFromOffset,
240 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
241 : FeaturesAPI_ExtrusionBoolean(theFeature)
244 fillAttribute(theBaseObjects, mybaseObjects);
245 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
246 fillAttribute(theToObject, mytoObject);
247 fillAttribute(theToOffset, mytoOffset);
248 fillAttribute(theFromObject, myfromObject);
249 fillAttribute(theFromOffset, myfromOffset);
250 setBooleanObjects(theBooleanObjects);
254 //==================================================================================================
255 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
256 const std::list<ModelHighAPI_Selection>& theBaseObjects,
257 const ModelHighAPI_Selection& theDirection,
258 const ModelHighAPI_Selection& theToObject,
259 const ModelHighAPI_Double& theToOffset,
260 const ModelHighAPI_Selection& theFromObject,
261 const ModelHighAPI_Double& theFromOffset,
262 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
263 : FeaturesAPI_ExtrusionBoolean(theFeature)
266 fillAttribute(theBaseObjects, mybaseObjects);
267 fillAttribute(theDirection, mydirection);
268 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
269 fillAttribute(theToObject, mytoObject);
270 fillAttribute(theToOffset, mytoOffset);
271 fillAttribute(theFromObject, myfromObject);
272 fillAttribute(theFromOffset, myfromOffset);
273 setBooleanObjects(theBooleanObjects);
277 //==================================================================================================
278 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
279 const std::list<ModelHighAPI_Selection>& theBaseObjects,
280 const ModelHighAPI_Double& theSize,
281 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
283 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
284 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theSize, theBooleanObjects));
287 //==================================================================================================
288 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
289 const std::list<ModelHighAPI_Selection>& theBaseObjects,
290 const ModelHighAPI_Selection& theDirection,
291 const ModelHighAPI_Double& theSize,
292 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
294 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
295 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theDirection, theSize, theBooleanObjects));
298 //==================================================================================================
299 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
300 const std::list<ModelHighAPI_Selection>& theBaseObjects,
301 const ModelHighAPI_Double& theToSize,
302 const ModelHighAPI_Double& theFromSize,
303 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
305 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
306 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theToSize, theFromSize, 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& theToSize,
314 const ModelHighAPI_Double& theFromSize,
315 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
317 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
318 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
326 //==================================================================================================
327 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
328 const std::list<ModelHighAPI_Selection>& theBaseObjects,
329 const ModelHighAPI_Selection& theToObject,
330 const ModelHighAPI_Double& theToOffset,
331 const ModelHighAPI_Selection& theFromObject,
332 const ModelHighAPI_Double& theFromOffset,
333 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
335 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
336 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
345 //==================================================================================================
346 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
347 const std::list<ModelHighAPI_Selection>& theBaseObjects,
348 const ModelHighAPI_Selection& theDirection,
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 = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
356 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
367 //==================================================================================================
368 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature)
369 : FeaturesAPI_ExtrusionBoolean(theFeature)
374 //==================================================================================================
375 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
376 const std::list<ModelHighAPI_Selection>& theBaseObjects,
377 const ModelHighAPI_Double& theSize,
378 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
379 : FeaturesAPI_ExtrusionBoolean(theFeature)
382 fillAttribute(theBaseObjects, mybaseObjects);
383 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
384 fillAttribute(theSize, mytoSize);
385 fillAttribute(ModelHighAPI_Double(), myfromSize);
386 setBooleanObjects(theBooleanObjects);
390 //==================================================================================================
391 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
392 const std::list<ModelHighAPI_Selection>& theBaseObjects,
393 const ModelHighAPI_Selection& theDirection,
394 const ModelHighAPI_Double& theSize,
395 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
396 : FeaturesAPI_ExtrusionBoolean(theFeature)
399 fillAttribute(theBaseObjects, mybaseObjects);
400 fillAttribute(theDirection, mydirection);
401 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
402 fillAttribute(theSize, mytoSize);
403 fillAttribute(ModelHighAPI_Double(), myfromSize);
404 setBooleanObjects(theBooleanObjects);
408 //==================================================================================================
409 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
410 const std::list<ModelHighAPI_Selection>& theBaseObjects,
411 const ModelHighAPI_Double& theToSize,
412 const ModelHighAPI_Double& theFromSize,
413 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
414 : FeaturesAPI_ExtrusionBoolean(theFeature)
417 fillAttribute(theBaseObjects, mybaseObjects);
418 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
419 fillAttribute(theToSize, mytoSize);
420 fillAttribute(theFromSize, myfromSize);
421 setBooleanObjects(theBooleanObjects);
425 //==================================================================================================
426 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
427 const std::list<ModelHighAPI_Selection>& theBaseObjects,
428 const ModelHighAPI_Selection& theDirection,
429 const ModelHighAPI_Double& theToSize,
430 const ModelHighAPI_Double& theFromSize,
431 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
432 : FeaturesAPI_ExtrusionBoolean(theFeature)
435 fillAttribute(theBaseObjects, mybaseObjects);
436 fillAttribute(theDirection, mydirection);
437 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
438 fillAttribute(theToSize, mytoSize);
439 fillAttribute(theFromSize, myfromSize);
440 setBooleanObjects(theBooleanObjects);
444 //==================================================================================================
445 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
446 const std::list<ModelHighAPI_Selection>& theBaseObjects,
447 const ModelHighAPI_Selection& theToObject,
448 const ModelHighAPI_Double& theToOffset,
449 const ModelHighAPI_Selection& theFromObject,
450 const ModelHighAPI_Double& theFromOffset,
451 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
452 : FeaturesAPI_ExtrusionBoolean(theFeature)
455 fillAttribute(theBaseObjects, mybaseObjects);
456 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
457 fillAttribute(theToObject, mytoObject);
458 fillAttribute(theToOffset, mytoOffset);
459 fillAttribute(theFromObject, myfromObject);
460 fillAttribute(theFromOffset, myfromOffset);
461 setBooleanObjects(theBooleanObjects);
465 //==================================================================================================
466 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
467 const std::list<ModelHighAPI_Selection>& theBaseObjects,
468 const ModelHighAPI_Selection& theDirection,
469 const ModelHighAPI_Selection& theToObject,
470 const ModelHighAPI_Double& theToOffset,
471 const ModelHighAPI_Selection& theFromObject,
472 const ModelHighAPI_Double& theFromOffset,
473 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
474 : FeaturesAPI_ExtrusionBoolean(theFeature)
477 fillAttribute(theBaseObjects, mybaseObjects);
478 fillAttribute(theDirection, mydirection);
479 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
480 fillAttribute(theToObject, mytoObject);
481 fillAttribute(theToOffset, mytoOffset);
482 fillAttribute(theFromObject, myfromObject);
483 fillAttribute(theFromOffset, myfromOffset);
484 setBooleanObjects(theBooleanObjects);
488 //==================================================================================================
489 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
490 const std::list<ModelHighAPI_Selection>& theBaseObjects,
491 const ModelHighAPI_Double& theSize,
492 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
494 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
495 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theSize, theBooleanObjects));
498 //==================================================================================================
499 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
500 const std::list<ModelHighAPI_Selection>& theBaseObjects,
501 const ModelHighAPI_Selection& theDirection,
502 const ModelHighAPI_Double& theSize,
503 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
505 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
506 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theDirection, theSize, theBooleanObjects));
509 //==================================================================================================
510 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
511 const std::list<ModelHighAPI_Selection>& theBaseObjects,
512 const ModelHighAPI_Double& theToSize,
513 const ModelHighAPI_Double& theFromSize,
514 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
516 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
517 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theToSize, theFromSize, theBooleanObjects));
520 //==================================================================================================
521 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
522 const std::list<ModelHighAPI_Selection>& theBaseObjects,
523 const ModelHighAPI_Selection& theDirection,
524 const ModelHighAPI_Double& theToSize,
525 const ModelHighAPI_Double& theFromSize,
526 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
528 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
529 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
537 //==================================================================================================
538 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
539 const std::list<ModelHighAPI_Selection>& theBaseObjects,
540 const ModelHighAPI_Selection& theToObject,
541 const ModelHighAPI_Double& theToOffset,
542 const ModelHighAPI_Selection& theFromObject,
543 const ModelHighAPI_Double& theFromOffset,
544 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
546 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
547 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
556 //==================================================================================================
557 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
558 const std::list<ModelHighAPI_Selection>& theBaseObjects,
559 const ModelHighAPI_Selection& theDirection,
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 = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
567 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,