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 mybaseObjects->clear();
30 mybaseObjects->append(theSketch.feature()->firstResult(), GeomShapePtr());
35 //==================================================================================================
36 void FeaturesAPI_ExtrusionBoolean::setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects)
38 mysketch->setValue(ObjectPtr());
39 mybaseObjects->clear();
40 fillAttribute(theBaseObjects, mybaseObjects);
45 //==================================================================================================
46 void FeaturesAPI_ExtrusionBoolean::setDirection(const ModelHighAPI_Selection& theDirection)
48 fillAttribute(theDirection, mydirection);
53 //==================================================================================================
54 void FeaturesAPI_ExtrusionBoolean::setSizes(const ModelHighAPI_Double& theToSize,
55 const ModelHighAPI_Double& theFromSize)
57 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
58 fillAttribute(theToSize, mytoSize);
59 fillAttribute(theFromSize, myfromSize);
64 //==================================================================================================
65 void FeaturesAPI_ExtrusionBoolean::setSize(const ModelHighAPI_Double& theSize)
67 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
68 fillAttribute(theSize, mytoSize);
69 fillAttribute(ModelHighAPI_Double(), myfromSize);
74 //==================================================================================================
75 void FeaturesAPI_ExtrusionBoolean::setPlanesAndOffsets(const ModelHighAPI_Selection& theToObject,
76 const ModelHighAPI_Double& theToOffset,
77 const ModelHighAPI_Selection& theFromObject,
78 const ModelHighAPI_Double& theFromOffset)
80 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
81 fillAttribute(theToObject, mytoObject);
82 fillAttribute(theToOffset, mytoOffset);
83 fillAttribute(theFromObject, myfromObject);
84 fillAttribute(theFromOffset, myfromOffset);
89 //==================================================================================================
90 void FeaturesAPI_ExtrusionBoolean::setBooleanObjects(const std::list<ModelHighAPI_Selection>& theBooleanObjects)
92 fillAttribute(theBooleanObjects, mybooleanObjects);
97 //==================================================================================================
98 void FeaturesAPI_ExtrusionBoolean::dump(ModelHighAPI_Dumper& theDumper) const
100 FeaturePtr aBase = feature();
101 const std::string& aDocName = theDumper.name(aBase->document());
103 AttributeReferencePtr anAttrSketch = aBase->reference(FeaturesPlugin_CompositeSketch::SKETCH_ID());
104 AttributeSelectionListPtr anAttrObjects = aBase->selectionList(FeaturesPlugin_Extrusion::BASE_OBJECTS_ID());
105 AttributeSelectionPtr anAttrDirection = aBase->selection(FeaturesPlugin_Extrusion::DIRECTION_OBJECT_ID());
107 theDumper << aBase << " = model.addExtrusion";
108 if(aBase->getKind() == FeaturesPlugin_ExtrusionCut::ID()) {
110 } else if(aBase->getKind() == FeaturesPlugin_ExtrusionFuse::ID()) {
113 theDumper << "(" << aDocName << ", ";
114 anAttrSketch->isInitialized() ? theDumper << "[]" : theDumper << anAttrObjects;
115 theDumper << ", " << anAttrDirection;
117 std::string aCreationMethod = aBase->string(FeaturesPlugin_Extrusion::CREATION_METHOD())->value();
119 if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES()) {
120 AttributeDoublePtr anAttrToSize = aBase->real(FeaturesPlugin_Extrusion::TO_SIZE_ID());
121 AttributeDoublePtr anAttrFromSize = aBase->real(FeaturesPlugin_Extrusion::FROM_SIZE_ID());
123 theDumper << ", " << anAttrToSize << ", " << anAttrFromSize;
124 } else if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES()) {
125 AttributeSelectionPtr anAttrToObject = aBase->selection(FeaturesPlugin_Extrusion::TO_OBJECT_ID());
126 AttributeDoublePtr anAttrToOffset = aBase->real(FeaturesPlugin_Extrusion::TO_OFFSET_ID());
127 AttributeSelectionPtr anAttrFromObject = aBase->selection(FeaturesPlugin_Extrusion::FROM_OBJECT_ID());
128 AttributeDoublePtr anAttrFromOffset = aBase->real(FeaturesPlugin_Extrusion::FROM_OFFSET_ID());
130 theDumper << ", " << anAttrToObject << ", " << anAttrToOffset << ", " << anAttrFromObject << ", " << anAttrFromOffset;
133 AttributeSelectionListPtr anAttrBoolObjects = aBase->selectionList(FeaturesPlugin_CompositeBoolean::OBJECTS_ID());
134 theDumper << ", " << anAttrBoolObjects << ")" << std::endl;
136 if(anAttrSketch->isInitialized()) {
137 theDumper << aBase << ".setNestedSketch(" << anAttrSketch << ")" << std::endl;
141 //==================================================================================================
142 void FeaturesAPI_ExtrusionBoolean::execIfBaseNotEmpty()
144 if(mybaseObjects->size() > 0) {
150 //==================================================================================================
151 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature)
152 : FeaturesAPI_ExtrusionBoolean(theFeature)
157 //==================================================================================================
158 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
159 const std::list<ModelHighAPI_Selection>& theBaseObjects,
160 const ModelHighAPI_Double& theSize,
161 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
162 : FeaturesAPI_ExtrusionBoolean(theFeature)
165 fillAttribute(theBaseObjects, mybaseObjects);
166 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
167 fillAttribute(theSize, mytoSize);
168 fillAttribute(ModelHighAPI_Double(), myfromSize);
169 setBooleanObjects(theBooleanObjects);
173 //==================================================================================================
174 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
175 const std::list<ModelHighAPI_Selection>& theBaseObjects,
176 const ModelHighAPI_Selection& theDirection,
177 const ModelHighAPI_Double& theSize,
178 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
179 : FeaturesAPI_ExtrusionBoolean(theFeature)
182 fillAttribute(theBaseObjects, mybaseObjects);
183 fillAttribute(theDirection, mydirection);
184 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
185 fillAttribute(theSize, mytoSize);
186 fillAttribute(ModelHighAPI_Double(), myfromSize);
187 setBooleanObjects(theBooleanObjects);
191 //==================================================================================================
192 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
193 const std::list<ModelHighAPI_Selection>& theBaseObjects,
194 const ModelHighAPI_Double& theToSize,
195 const ModelHighAPI_Double& theFromSize,
196 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
197 : FeaturesAPI_ExtrusionBoolean(theFeature)
200 fillAttribute(theBaseObjects, mybaseObjects);
201 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
202 fillAttribute(theToSize, mytoSize);
203 fillAttribute(theFromSize, myfromSize);
204 setBooleanObjects(theBooleanObjects);
208 //==================================================================================================
209 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
210 const std::list<ModelHighAPI_Selection>& theBaseObjects,
211 const ModelHighAPI_Selection& theDirection,
212 const ModelHighAPI_Double& theToSize,
213 const ModelHighAPI_Double& theFromSize,
214 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
215 : FeaturesAPI_ExtrusionBoolean(theFeature)
218 fillAttribute(theBaseObjects, mybaseObjects);
219 fillAttribute(theDirection, mydirection);
220 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
221 fillAttribute(theToSize, mytoSize);
222 fillAttribute(theFromSize, myfromSize);
223 setBooleanObjects(theBooleanObjects);
227 //==================================================================================================
228 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
229 const std::list<ModelHighAPI_Selection>& theBaseObjects,
230 const ModelHighAPI_Selection& theToObject,
231 const ModelHighAPI_Double& theToOffset,
232 const ModelHighAPI_Selection& theFromObject,
233 const ModelHighAPI_Double& theFromOffset,
234 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
235 : FeaturesAPI_ExtrusionBoolean(theFeature)
238 fillAttribute(theBaseObjects, mybaseObjects);
239 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
240 fillAttribute(theToObject, mytoObject);
241 fillAttribute(theToOffset, mytoOffset);
242 fillAttribute(theFromObject, myfromObject);
243 fillAttribute(theFromOffset, myfromOffset);
244 setBooleanObjects(theBooleanObjects);
248 //==================================================================================================
249 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
250 const std::list<ModelHighAPI_Selection>& theBaseObjects,
251 const ModelHighAPI_Selection& theDirection,
252 const ModelHighAPI_Selection& theToObject,
253 const ModelHighAPI_Double& theToOffset,
254 const ModelHighAPI_Selection& theFromObject,
255 const ModelHighAPI_Double& theFromOffset,
256 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
257 : FeaturesAPI_ExtrusionBoolean(theFeature)
260 fillAttribute(theBaseObjects, mybaseObjects);
261 fillAttribute(theDirection, mydirection);
262 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
263 fillAttribute(theToObject, mytoObject);
264 fillAttribute(theToOffset, mytoOffset);
265 fillAttribute(theFromObject, myfromObject);
266 fillAttribute(theFromOffset, myfromOffset);
267 setBooleanObjects(theBooleanObjects);
271 //==================================================================================================
272 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
273 const std::list<ModelHighAPI_Selection>& theBaseObjects,
274 const ModelHighAPI_Double& theSize,
275 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
277 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
278 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theSize, theBooleanObjects));
281 //==================================================================================================
282 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
283 const std::list<ModelHighAPI_Selection>& theBaseObjects,
284 const ModelHighAPI_Selection& theDirection,
285 const ModelHighAPI_Double& theSize,
286 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
288 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
289 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theDirection, theSize, theBooleanObjects));
292 //==================================================================================================
293 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
294 const std::list<ModelHighAPI_Selection>& theBaseObjects,
295 const ModelHighAPI_Double& theToSize,
296 const ModelHighAPI_Double& theFromSize,
297 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
299 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
300 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theToSize, theFromSize, 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& theToSize,
308 const ModelHighAPI_Double& theFromSize,
309 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
311 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
312 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
320 //==================================================================================================
321 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
322 const std::list<ModelHighAPI_Selection>& theBaseObjects,
323 const ModelHighAPI_Selection& theToObject,
324 const ModelHighAPI_Double& theToOffset,
325 const ModelHighAPI_Selection& theFromObject,
326 const ModelHighAPI_Double& theFromOffset,
327 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
329 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
330 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
339 //==================================================================================================
340 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
341 const std::list<ModelHighAPI_Selection>& theBaseObjects,
342 const ModelHighAPI_Selection& theDirection,
343 const ModelHighAPI_Selection& theToObject,
344 const ModelHighAPI_Double& theToOffset,
345 const ModelHighAPI_Selection& theFromObject,
346 const ModelHighAPI_Double& theFromOffset,
347 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
349 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
350 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
361 //==================================================================================================
362 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature)
363 : FeaturesAPI_ExtrusionBoolean(theFeature)
368 //==================================================================================================
369 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
370 const std::list<ModelHighAPI_Selection>& theBaseObjects,
371 const ModelHighAPI_Double& theSize,
372 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
373 : FeaturesAPI_ExtrusionBoolean(theFeature)
376 fillAttribute(theBaseObjects, mybaseObjects);
377 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
378 fillAttribute(theSize, mytoSize);
379 fillAttribute(ModelHighAPI_Double(), myfromSize);
380 setBooleanObjects(theBooleanObjects);
384 //==================================================================================================
385 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
386 const std::list<ModelHighAPI_Selection>& theBaseObjects,
387 const ModelHighAPI_Selection& theDirection,
388 const ModelHighAPI_Double& theSize,
389 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
390 : FeaturesAPI_ExtrusionBoolean(theFeature)
393 fillAttribute(theBaseObjects, mybaseObjects);
394 fillAttribute(theDirection, mydirection);
395 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
396 fillAttribute(theSize, mytoSize);
397 fillAttribute(ModelHighAPI_Double(), myfromSize);
398 setBooleanObjects(theBooleanObjects);
402 //==================================================================================================
403 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
404 const std::list<ModelHighAPI_Selection>& theBaseObjects,
405 const ModelHighAPI_Double& theToSize,
406 const ModelHighAPI_Double& theFromSize,
407 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
408 : FeaturesAPI_ExtrusionBoolean(theFeature)
411 fillAttribute(theBaseObjects, mybaseObjects);
412 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
413 fillAttribute(theToSize, mytoSize);
414 fillAttribute(theFromSize, myfromSize);
415 setBooleanObjects(theBooleanObjects);
419 //==================================================================================================
420 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
421 const std::list<ModelHighAPI_Selection>& theBaseObjects,
422 const ModelHighAPI_Selection& theDirection,
423 const ModelHighAPI_Double& theToSize,
424 const ModelHighAPI_Double& theFromSize,
425 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
426 : FeaturesAPI_ExtrusionBoolean(theFeature)
429 fillAttribute(theBaseObjects, mybaseObjects);
430 fillAttribute(theDirection, mydirection);
431 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
432 fillAttribute(theToSize, mytoSize);
433 fillAttribute(theFromSize, myfromSize);
434 setBooleanObjects(theBooleanObjects);
438 //==================================================================================================
439 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
440 const std::list<ModelHighAPI_Selection>& theBaseObjects,
441 const ModelHighAPI_Selection& theToObject,
442 const ModelHighAPI_Double& theToOffset,
443 const ModelHighAPI_Selection& theFromObject,
444 const ModelHighAPI_Double& theFromOffset,
445 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
446 : FeaturesAPI_ExtrusionBoolean(theFeature)
449 fillAttribute(theBaseObjects, mybaseObjects);
450 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
451 fillAttribute(theToObject, mytoObject);
452 fillAttribute(theToOffset, mytoOffset);
453 fillAttribute(theFromObject, myfromObject);
454 fillAttribute(theFromOffset, myfromOffset);
455 setBooleanObjects(theBooleanObjects);
459 //==================================================================================================
460 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
461 const std::list<ModelHighAPI_Selection>& theBaseObjects,
462 const ModelHighAPI_Selection& theDirection,
463 const ModelHighAPI_Selection& theToObject,
464 const ModelHighAPI_Double& theToOffset,
465 const ModelHighAPI_Selection& theFromObject,
466 const ModelHighAPI_Double& theFromOffset,
467 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
468 : FeaturesAPI_ExtrusionBoolean(theFeature)
471 fillAttribute(theBaseObjects, mybaseObjects);
472 fillAttribute(theDirection, mydirection);
473 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
474 fillAttribute(theToObject, mytoObject);
475 fillAttribute(theToOffset, mytoOffset);
476 fillAttribute(theFromObject, myfromObject);
477 fillAttribute(theFromOffset, myfromOffset);
478 setBooleanObjects(theBooleanObjects);
482 //==================================================================================================
483 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
484 const std::list<ModelHighAPI_Selection>& theBaseObjects,
485 const ModelHighAPI_Double& theSize,
486 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
488 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
489 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theSize, theBooleanObjects));
492 //==================================================================================================
493 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
494 const std::list<ModelHighAPI_Selection>& theBaseObjects,
495 const ModelHighAPI_Selection& theDirection,
496 const ModelHighAPI_Double& theSize,
497 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
499 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
500 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theDirection, theSize, theBooleanObjects));
503 //==================================================================================================
504 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
505 const std::list<ModelHighAPI_Selection>& theBaseObjects,
506 const ModelHighAPI_Double& theToSize,
507 const ModelHighAPI_Double& theFromSize,
508 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
510 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
511 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theToSize, theFromSize, 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& theToSize,
519 const ModelHighAPI_Double& theFromSize,
520 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
522 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
523 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
531 //==================================================================================================
532 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
533 const std::list<ModelHighAPI_Selection>& theBaseObjects,
534 const ModelHighAPI_Selection& theToObject,
535 const ModelHighAPI_Double& theToOffset,
536 const ModelHighAPI_Selection& theFromObject,
537 const ModelHighAPI_Double& theFromOffset,
538 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
540 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
541 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
550 //==================================================================================================
551 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
552 const std::list<ModelHighAPI_Selection>& theBaseObjects,
553 const ModelHighAPI_Selection& theDirection,
554 const ModelHighAPI_Selection& theToObject,
555 const ModelHighAPI_Double& theToOffset,
556 const ModelHighAPI_Selection& theFromObject,
557 const ModelHighAPI_Double& theFromOffset,
558 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
560 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
561 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,