1 // Copyright (C) 2014-2017 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
20 #include "FeaturesAPI_ExtrusionBoolean.h"
22 #include <ModelHighAPI_Double.h>
23 #include <ModelHighAPI_Dumper.h>
24 #include <ModelHighAPI_Reference.h>
25 #include <ModelHighAPI_Tools.h>
27 //==================================================================================================
28 FeaturesAPI_ExtrusionBoolean::FeaturesAPI_ExtrusionBoolean(
29 const std::shared_ptr<ModelAPI_Feature>& theFeature)
30 : ModelHighAPI_Interface(theFeature)
34 //==================================================================================================
35 FeaturesAPI_ExtrusionBoolean::~FeaturesAPI_ExtrusionBoolean()
39 //==================================================================================================
40 void FeaturesAPI_ExtrusionBoolean::setNestedSketch(const ModelHighAPI_Reference& theSketch)
42 mysketch->setValue(theSketch.feature());
44 // To make Sketch feature execute and subfeatures execute.
45 feature()->document()->setCurrentFeature(feature(), false);
47 // to inform that the history is updated due to the sketch moved under the composite feature
48 if (theSketch.feature().get()) {
49 theSketch.feature()->document()->updateHistory(ModelAPI_Feature::group());
50 if (theSketch.feature()->firstResult().get())
51 theSketch.feature()->firstResult()->setDisplayed(false);
53 mybaseObjects->clear();
54 mybaseObjects->append(theSketch.feature()->firstResult(), GeomShapePtr());
59 //==================================================================================================
60 void FeaturesAPI_ExtrusionBoolean::setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects)
62 mysketch->setValue(ObjectPtr());
63 mybaseObjects->clear();
64 fillAttribute(theBaseObjects, mybaseObjects);
69 //==================================================================================================
70 void FeaturesAPI_ExtrusionBoolean::setDirection(const ModelHighAPI_Selection& theDirection)
72 fillAttribute(theDirection, mydirection);
77 //==================================================================================================
78 void FeaturesAPI_ExtrusionBoolean::setSizes(const ModelHighAPI_Double& theToSize,
79 const ModelHighAPI_Double& theFromSize)
81 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
82 fillAttribute(theToSize, mytoSize);
83 fillAttribute(theFromSize, myfromSize);
88 //==================================================================================================
89 void FeaturesAPI_ExtrusionBoolean::setSize(const ModelHighAPI_Double& theSize)
91 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
92 fillAttribute(theSize, mytoSize);
93 fillAttribute(ModelHighAPI_Double(), myfromSize);
98 //==================================================================================================
99 void FeaturesAPI_ExtrusionBoolean::setPlanesAndOffsets(const ModelHighAPI_Selection& theToObject,
100 const ModelHighAPI_Double& theToOffset,
101 const ModelHighAPI_Selection& theFromObject,
102 const ModelHighAPI_Double& theFromOffset)
104 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
105 fillAttribute(theToObject, mytoObject);
106 fillAttribute(theToOffset, mytoOffset);
107 fillAttribute(theFromObject, myfromObject);
108 fillAttribute(theFromOffset, myfromOffset);
110 execIfBaseNotEmpty();
113 //==================================================================================================
114 void FeaturesAPI_ExtrusionBoolean::setBooleanObjects(
115 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
117 fillAttribute(theBooleanObjects, mybooleanObjects);
119 execIfBaseNotEmpty();
122 //==================================================================================================
123 void FeaturesAPI_ExtrusionBoolean::dump(ModelHighAPI_Dumper& theDumper) const
125 FeaturePtr aBase = feature();
126 const std::string& aDocName = theDumper.name(aBase->document());
128 AttributeReferencePtr anAttrSketch = aBase->reference(FeaturesPlugin_Extrusion::SKETCH_ID());
129 AttributeSelectionListPtr anAttrObjects =
130 aBase->selectionList(FeaturesPlugin_Extrusion::BASE_OBJECTS_ID());
131 AttributeSelectionPtr anAttrDirection =
132 aBase->selection(FeaturesPlugin_Extrusion::DIRECTION_OBJECT_ID());
134 theDumper << aBase << " = model.addExtrusion";
135 if(aBase->getKind() == FeaturesPlugin_ExtrusionCut::ID()) {
137 } else if(aBase->getKind() == FeaturesPlugin_ExtrusionFuse::ID()) {
140 theDumper << "(" << aDocName << ", ";
141 anAttrSketch->isInitialized() ? theDumper << "[]" : theDumper << anAttrObjects;
142 theDumper << ", " << anAttrDirection;
144 std::string aCreationMethod =
145 aBase->string(FeaturesPlugin_Extrusion::CREATION_METHOD())->value();
147 if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES()) {
148 AttributeDoublePtr anAttrToSize = aBase->real(FeaturesPlugin_Extrusion::TO_SIZE_ID());
149 AttributeDoublePtr anAttrFromSize = aBase->real(FeaturesPlugin_Extrusion::FROM_SIZE_ID());
151 theDumper << ", " << anAttrToSize << ", " << anAttrFromSize;
152 } else if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES()) {
153 AttributeSelectionPtr anAttrToObject =
154 aBase->selection(FeaturesPlugin_Extrusion::TO_OBJECT_ID());
155 AttributeDoublePtr anAttrToOffset = aBase->real(FeaturesPlugin_Extrusion::TO_OFFSET_ID());
156 AttributeSelectionPtr anAttrFromObject =
157 aBase->selection(FeaturesPlugin_Extrusion::FROM_OBJECT_ID());
158 AttributeDoublePtr anAttrFromOffset = aBase->real(FeaturesPlugin_Extrusion::FROM_OFFSET_ID());
160 theDumper << ", " << anAttrToObject << ", " << anAttrToOffset <<
161 ", " << anAttrFromObject << ", " << anAttrFromOffset;
164 AttributeSelectionListPtr anAttrBoolObjects =
165 aBase->selectionList(FeaturesPlugin_CompositeBoolean::OBJECTS_ID());
166 theDumper << ", " << anAttrBoolObjects << ")" << std::endl;
168 if(anAttrSketch->isInitialized()) {
169 theDumper << aBase << ".setNestedSketch(" << anAttrSketch << ")" << std::endl;
173 //==================================================================================================
174 void FeaturesAPI_ExtrusionBoolean::execIfBaseNotEmpty()
176 if(mybaseObjects->size() > 0) {
182 //==================================================================================================
183 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
184 const std::shared_ptr<ModelAPI_Feature>& theFeature)
185 : FeaturesAPI_ExtrusionBoolean(theFeature)
190 //==================================================================================================
191 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
192 const std::shared_ptr<ModelAPI_Feature>& theFeature,
193 const std::list<ModelHighAPI_Selection>& theBaseObjects,
194 const ModelHighAPI_Double& theSize,
195 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
196 : FeaturesAPI_ExtrusionBoolean(theFeature)
199 fillAttribute(theBaseObjects, mybaseObjects);
200 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
201 fillAttribute(theSize, mytoSize);
202 fillAttribute(ModelHighAPI_Double(), myfromSize);
203 setBooleanObjects(theBooleanObjects);
207 //==================================================================================================
208 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
209 const std::shared_ptr<ModelAPI_Feature>& theFeature,
210 const std::list<ModelHighAPI_Selection>& theBaseObjects,
211 const ModelHighAPI_Selection& theDirection,
212 const ModelHighAPI_Double& theSize,
213 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
214 : FeaturesAPI_ExtrusionBoolean(theFeature)
217 fillAttribute(theBaseObjects, mybaseObjects);
218 fillAttribute(theDirection, mydirection);
219 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
220 fillAttribute(theSize, mytoSize);
221 fillAttribute(ModelHighAPI_Double(), myfromSize);
222 setBooleanObjects(theBooleanObjects);
226 //==================================================================================================
227 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
228 const std::shared_ptr<ModelAPI_Feature>& theFeature,
229 const std::list<ModelHighAPI_Selection>& theBaseObjects,
230 const ModelHighAPI_Double& theToSize,
231 const ModelHighAPI_Double& theFromSize,
232 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
233 : FeaturesAPI_ExtrusionBoolean(theFeature)
236 fillAttribute(theBaseObjects, mybaseObjects);
237 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
238 fillAttribute(theToSize, mytoSize);
239 fillAttribute(theFromSize, myfromSize);
240 setBooleanObjects(theBooleanObjects);
244 //==================================================================================================
245 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
246 const std::shared_ptr<ModelAPI_Feature>& theFeature,
247 const std::list<ModelHighAPI_Selection>& theBaseObjects,
248 const ModelHighAPI_Selection& theDirection,
249 const ModelHighAPI_Double& theToSize,
250 const ModelHighAPI_Double& theFromSize,
251 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
252 : FeaturesAPI_ExtrusionBoolean(theFeature)
255 fillAttribute(theBaseObjects, mybaseObjects);
256 fillAttribute(theDirection, mydirection);
257 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
258 fillAttribute(theToSize, mytoSize);
259 fillAttribute(theFromSize, myfromSize);
260 setBooleanObjects(theBooleanObjects);
264 //==================================================================================================
265 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
266 const std::shared_ptr<ModelAPI_Feature>& theFeature,
267 const std::list<ModelHighAPI_Selection>& theBaseObjects,
268 const ModelHighAPI_Selection& theToObject,
269 const ModelHighAPI_Double& theToOffset,
270 const ModelHighAPI_Selection& theFromObject,
271 const ModelHighAPI_Double& theFromOffset,
272 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
273 : FeaturesAPI_ExtrusionBoolean(theFeature)
276 fillAttribute(theBaseObjects, mybaseObjects);
277 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
278 fillAttribute(theToObject, mytoObject);
279 fillAttribute(theToOffset, mytoOffset);
280 fillAttribute(theFromObject, myfromObject);
281 fillAttribute(theFromOffset, myfromOffset);
282 setBooleanObjects(theBooleanObjects);
286 //==================================================================================================
287 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
288 const std::shared_ptr<ModelAPI_Feature>& theFeature,
289 const std::list<ModelHighAPI_Selection>& theBaseObjects,
290 const ModelHighAPI_Selection& theDirection,
291 const ModelHighAPI_Selection& theToObject,
292 const ModelHighAPI_Double& theToOffset,
293 const ModelHighAPI_Selection& theFromObject,
294 const ModelHighAPI_Double& theFromOffset,
295 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
296 : FeaturesAPI_ExtrusionBoolean(theFeature)
299 fillAttribute(theBaseObjects, mybaseObjects);
300 fillAttribute(theDirection, mydirection);
301 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
302 fillAttribute(theToObject, mytoObject);
303 fillAttribute(theToOffset, mytoOffset);
304 fillAttribute(theFromObject, myfromObject);
305 fillAttribute(theFromOffset, myfromOffset);
306 setBooleanObjects(theBooleanObjects);
310 //==================================================================================================
311 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
312 const std::list<ModelHighAPI_Selection>& theBaseObjects,
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,
319 theSize, theBooleanObjects));
322 //==================================================================================================
323 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
324 const std::list<ModelHighAPI_Selection>& theBaseObjects,
325 const ModelHighAPI_Selection& theDirection,
326 const ModelHighAPI_Double& theSize,
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, theDirection,
332 theSize, theBooleanObjects));
335 //==================================================================================================
336 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
337 const std::list<ModelHighAPI_Selection>& theBaseObjects,
338 const ModelHighAPI_Double& theToSize,
339 const ModelHighAPI_Double& theFromSize,
340 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
342 std::shared_ptr<ModelAPI_Feature> aFeature =
343 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
344 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects,
345 theToSize, theFromSize, theBooleanObjects));
348 //==================================================================================================
349 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
350 const std::list<ModelHighAPI_Selection>& theBaseObjects,
351 const ModelHighAPI_Selection& theDirection,
352 const ModelHighAPI_Double& theToSize,
353 const ModelHighAPI_Double& theFromSize,
354 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
356 std::shared_ptr<ModelAPI_Feature> aFeature =
357 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
358 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
366 //==================================================================================================
367 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
368 const std::list<ModelHighAPI_Selection>& theBaseObjects,
369 const ModelHighAPI_Selection& theToObject,
370 const ModelHighAPI_Double& theToOffset,
371 const ModelHighAPI_Selection& theFromObject,
372 const ModelHighAPI_Double& theFromOffset,
373 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
375 std::shared_ptr<ModelAPI_Feature> aFeature =
376 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
377 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
386 //==================================================================================================
387 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
388 const std::list<ModelHighAPI_Selection>& theBaseObjects,
389 const ModelHighAPI_Selection& theDirection,
390 const ModelHighAPI_Selection& theToObject,
391 const ModelHighAPI_Double& theToOffset,
392 const ModelHighAPI_Selection& theFromObject,
393 const ModelHighAPI_Double& theFromOffset,
394 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
396 std::shared_ptr<ModelAPI_Feature> aFeature =
397 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
398 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
409 //==================================================================================================
410 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
411 const std::shared_ptr<ModelAPI_Feature>& theFeature)
412 : FeaturesAPI_ExtrusionBoolean(theFeature)
417 //==================================================================================================
418 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
419 const std::shared_ptr<ModelAPI_Feature>& theFeature,
420 const std::list<ModelHighAPI_Selection>& theBaseObjects,
421 const ModelHighAPI_Double& theSize,
422 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
423 : FeaturesAPI_ExtrusionBoolean(theFeature)
426 fillAttribute(theBaseObjects, mybaseObjects);
427 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
428 fillAttribute(theSize, mytoSize);
429 fillAttribute(ModelHighAPI_Double(), myfromSize);
430 setBooleanObjects(theBooleanObjects);
434 //==================================================================================================
435 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
436 const std::shared_ptr<ModelAPI_Feature>& theFeature,
437 const std::list<ModelHighAPI_Selection>& theBaseObjects,
438 const ModelHighAPI_Selection& theDirection,
439 const ModelHighAPI_Double& theSize,
440 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
441 : FeaturesAPI_ExtrusionBoolean(theFeature)
444 fillAttribute(theBaseObjects, mybaseObjects);
445 fillAttribute(theDirection, mydirection);
446 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
447 fillAttribute(theSize, mytoSize);
448 fillAttribute(ModelHighAPI_Double(), myfromSize);
449 setBooleanObjects(theBooleanObjects);
453 //==================================================================================================
454 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
455 const std::shared_ptr<ModelAPI_Feature>& theFeature,
456 const std::list<ModelHighAPI_Selection>& theBaseObjects,
457 const ModelHighAPI_Double& theToSize,
458 const ModelHighAPI_Double& theFromSize,
459 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
460 : FeaturesAPI_ExtrusionBoolean(theFeature)
463 fillAttribute(theBaseObjects, mybaseObjects);
464 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
465 fillAttribute(theToSize, mytoSize);
466 fillAttribute(theFromSize, myfromSize);
467 setBooleanObjects(theBooleanObjects);
471 //==================================================================================================
472 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
473 const std::shared_ptr<ModelAPI_Feature>& theFeature,
474 const std::list<ModelHighAPI_Selection>& theBaseObjects,
475 const ModelHighAPI_Selection& theDirection,
476 const ModelHighAPI_Double& theToSize,
477 const ModelHighAPI_Double& theFromSize,
478 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
479 : FeaturesAPI_ExtrusionBoolean(theFeature)
482 fillAttribute(theBaseObjects, mybaseObjects);
483 fillAttribute(theDirection, mydirection);
484 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
485 fillAttribute(theToSize, mytoSize);
486 fillAttribute(theFromSize, myfromSize);
487 setBooleanObjects(theBooleanObjects);
491 //==================================================================================================
492 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
493 const std::shared_ptr<ModelAPI_Feature>& theFeature,
494 const std::list<ModelHighAPI_Selection>& theBaseObjects,
495 const ModelHighAPI_Selection& theToObject,
496 const ModelHighAPI_Double& theToOffset,
497 const ModelHighAPI_Selection& theFromObject,
498 const ModelHighAPI_Double& theFromOffset,
499 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
500 : FeaturesAPI_ExtrusionBoolean(theFeature)
503 fillAttribute(theBaseObjects, mybaseObjects);
504 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
505 fillAttribute(theToObject, mytoObject);
506 fillAttribute(theToOffset, mytoOffset);
507 fillAttribute(theFromObject, myfromObject);
508 fillAttribute(theFromOffset, myfromOffset);
509 setBooleanObjects(theBooleanObjects);
513 //==================================================================================================
514 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
515 const std::shared_ptr<ModelAPI_Feature>& theFeature,
516 const std::list<ModelHighAPI_Selection>& theBaseObjects,
517 const ModelHighAPI_Selection& theDirection,
518 const ModelHighAPI_Selection& theToObject,
519 const ModelHighAPI_Double& theToOffset,
520 const ModelHighAPI_Selection& theFromObject,
521 const ModelHighAPI_Double& theFromOffset,
522 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
523 : FeaturesAPI_ExtrusionBoolean(theFeature)
526 fillAttribute(theBaseObjects, mybaseObjects);
527 fillAttribute(theDirection, mydirection);
528 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
529 fillAttribute(theToObject, mytoObject);
530 fillAttribute(theToOffset, mytoOffset);
531 fillAttribute(theFromObject, myfromObject);
532 fillAttribute(theFromOffset, myfromOffset);
533 setBooleanObjects(theBooleanObjects);
537 //==================================================================================================
538 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
539 const std::list<ModelHighAPI_Selection>& theBaseObjects,
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 theSize, theBooleanObjects));
549 //==================================================================================================
550 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
551 const std::list<ModelHighAPI_Selection>& theBaseObjects,
552 const ModelHighAPI_Selection& theDirection,
553 const ModelHighAPI_Double& theSize,
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 theDirection, theSize, theBooleanObjects));
562 //==================================================================================================
563 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
564 const std::list<ModelHighAPI_Selection>& theBaseObjects,
565 const ModelHighAPI_Double& theToSize,
566 const ModelHighAPI_Double& theFromSize,
567 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
569 std::shared_ptr<ModelAPI_Feature> aFeature =
570 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
571 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects,
572 theToSize, theFromSize, theBooleanObjects));
575 //==================================================================================================
576 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
577 const std::list<ModelHighAPI_Selection>& theBaseObjects,
578 const ModelHighAPI_Selection& theDirection,
579 const ModelHighAPI_Double& theToSize,
580 const ModelHighAPI_Double& theFromSize,
581 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
583 std::shared_ptr<ModelAPI_Feature> aFeature =
584 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
585 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
593 //==================================================================================================
594 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
595 const std::list<ModelHighAPI_Selection>& theBaseObjects,
596 const ModelHighAPI_Selection& theToObject,
597 const ModelHighAPI_Double& theToOffset,
598 const ModelHighAPI_Selection& theFromObject,
599 const ModelHighAPI_Double& theFromOffset,
600 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
602 std::shared_ptr<ModelAPI_Feature> aFeature =
603 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
604 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
613 //==================================================================================================
614 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
615 const std::list<ModelHighAPI_Selection>& theBaseObjects,
616 const ModelHighAPI_Selection& theDirection,
617 const ModelHighAPI_Selection& theToObject,
618 const ModelHighAPI_Double& theToOffset,
619 const ModelHighAPI_Selection& theFromObject,
620 const ModelHighAPI_Double& theFromOffset,
621 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
623 std::shared_ptr<ModelAPI_Feature> aFeature =
624 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
625 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,