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
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #include "FeaturesAPI_ExtrusionBoolean.h"
23 #include <ModelHighAPI_Double.h>
24 #include <ModelHighAPI_Dumper.h>
25 #include <ModelHighAPI_Reference.h>
26 #include <ModelHighAPI_Tools.h>
28 //==================================================================================================
29 FeaturesAPI_ExtrusionBoolean::FeaturesAPI_ExtrusionBoolean(
30 const std::shared_ptr<ModelAPI_Feature>& theFeature)
31 : ModelHighAPI_Interface(theFeature)
35 //==================================================================================================
36 FeaturesAPI_ExtrusionBoolean::~FeaturesAPI_ExtrusionBoolean()
40 //==================================================================================================
41 void FeaturesAPI_ExtrusionBoolean::setNestedSketch(const ModelHighAPI_Reference& theSketch)
43 mysketch->setValue(theSketch.feature());
45 // To make Sketch feature execute and subfeatures execute.
46 feature()->document()->setCurrentFeature(feature(), false);
48 // to inform that the history is updated due to the sketch moved under the composite feature
49 if (theSketch.feature().get()) {
50 theSketch.feature()->document()->updateHistory(ModelAPI_Feature::group());
51 if (theSketch.feature()->firstResult().get())
52 theSketch.feature()->firstResult()->setDisplayed(false);
54 mybaseObjects->clear();
55 mybaseObjects->append(theSketch.feature()->firstResult(), GeomShapePtr());
60 //==================================================================================================
61 void FeaturesAPI_ExtrusionBoolean::setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects)
63 mysketch->setValue(ObjectPtr());
64 mybaseObjects->clear();
65 fillAttribute(theBaseObjects, mybaseObjects);
70 //==================================================================================================
71 void FeaturesAPI_ExtrusionBoolean::setDirection(const ModelHighAPI_Selection& theDirection)
73 fillAttribute(theDirection, mydirection);
78 //==================================================================================================
79 void FeaturesAPI_ExtrusionBoolean::setSizes(const ModelHighAPI_Double& theToSize,
80 const ModelHighAPI_Double& theFromSize)
82 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
83 fillAttribute(theToSize, mytoSize);
84 fillAttribute(theFromSize, myfromSize);
89 //==================================================================================================
90 void FeaturesAPI_ExtrusionBoolean::setSize(const ModelHighAPI_Double& theSize)
92 setSizes(theSize, ModelHighAPI_Double());
95 //==================================================================================================
96 void FeaturesAPI_ExtrusionBoolean::setPlanesAndOffsets(const ModelHighAPI_Selection& theToObject,
97 const ModelHighAPI_Double& theToOffset,
98 const ModelHighAPI_Selection& theFromObject,
99 const ModelHighAPI_Double& theFromOffset)
101 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
102 fillAttribute(theToObject, mytoObject);
103 fillAttribute(theToOffset, mytoOffset);
104 fillAttribute(theFromObject, myfromObject);
105 fillAttribute(theFromOffset, myfromOffset);
107 execIfBaseNotEmpty();
110 //==================================================================================================
111 void FeaturesAPI_ExtrusionBoolean::setBooleanObjects(
112 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
114 fillAttribute(theBooleanObjects, mybooleanObjects);
116 execIfBaseNotEmpty();
119 //==================================================================================================
120 void FeaturesAPI_ExtrusionBoolean::dump(ModelHighAPI_Dumper& theDumper) const
122 FeaturePtr aBase = feature();
123 const std::string& aDocName = theDumper.name(aBase->document());
125 AttributeReferencePtr anAttrSketch = aBase->reference(FeaturesPlugin_Extrusion::SKETCH_ID());
126 AttributeSelectionListPtr anAttrObjects =
127 aBase->selectionList(FeaturesPlugin_Extrusion::BASE_OBJECTS_ID());
128 AttributeSelectionPtr anAttrDirection =
129 aBase->selection(FeaturesPlugin_Extrusion::DIRECTION_OBJECT_ID());
131 theDumper << aBase << " = model.addExtrusion";
132 if(aBase->getKind() == FeaturesPlugin_ExtrusionCut::ID()) {
134 } else if(aBase->getKind() == FeaturesPlugin_ExtrusionFuse::ID()) {
137 theDumper << "(" << aDocName << ", ";
138 anAttrSketch->isInitialized() ? theDumper << "[]" : theDumper << anAttrObjects;
139 theDumper << ", " << anAttrDirection;
141 std::string aCreationMethod =
142 aBase->string(FeaturesPlugin_Extrusion::CREATION_METHOD())->value();
144 if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES()) {
145 AttributeDoublePtr anAttrToSize = aBase->real(FeaturesPlugin_Extrusion::TO_SIZE_ID());
146 AttributeDoublePtr anAttrFromSize = aBase->real(FeaturesPlugin_Extrusion::FROM_SIZE_ID());
148 theDumper << ", " << anAttrToSize << ", " << anAttrFromSize;
149 } else if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES()) {
150 AttributeSelectionPtr anAttrToObject =
151 aBase->selection(FeaturesPlugin_Extrusion::TO_OBJECT_ID());
152 AttributeDoublePtr anAttrToOffset = aBase->real(FeaturesPlugin_Extrusion::TO_OFFSET_ID());
153 AttributeSelectionPtr anAttrFromObject =
154 aBase->selection(FeaturesPlugin_Extrusion::FROM_OBJECT_ID());
155 AttributeDoublePtr anAttrFromOffset = aBase->real(FeaturesPlugin_Extrusion::FROM_OFFSET_ID());
157 theDumper << ", " << anAttrToObject << ", " << anAttrToOffset <<
158 ", " << anAttrFromObject << ", " << anAttrFromOffset;
161 AttributeSelectionListPtr anAttrBoolObjects =
162 aBase->selectionList(FeaturesPlugin_CompositeBoolean::OBJECTS_ID());
163 theDumper << ", " << anAttrBoolObjects << ")" << std::endl;
165 if(anAttrSketch->isInitialized()) {
166 theDumper << aBase << ".setNestedSketch(" << anAttrSketch << ")" << std::endl;
170 //==================================================================================================
171 void FeaturesAPI_ExtrusionBoolean::execIfBaseNotEmpty()
173 if(mybaseObjects->size() > 0) {
179 //==================================================================================================
180 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
181 const std::shared_ptr<ModelAPI_Feature>& theFeature)
182 : FeaturesAPI_ExtrusionBoolean(theFeature)
187 //==================================================================================================
188 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
189 const std::shared_ptr<ModelAPI_Feature>& theFeature,
190 const std::list<ModelHighAPI_Selection>& theBaseObjects,
191 const ModelHighAPI_Double& theSize,
192 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
193 : FeaturesAPI_ExtrusionBoolean(theFeature)
196 fillAttribute(theBaseObjects, mybaseObjects);
198 setBooleanObjects(theBooleanObjects);
202 //==================================================================================================
203 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
204 const std::shared_ptr<ModelAPI_Feature>& theFeature,
205 const std::list<ModelHighAPI_Selection>& theBaseObjects,
206 const ModelHighAPI_Selection& theDirection,
207 const ModelHighAPI_Double& theSize,
208 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
209 : FeaturesAPI_ExtrusionBoolean(theFeature)
212 fillAttribute(theBaseObjects, mybaseObjects);
213 fillAttribute(theDirection, mydirection);
215 setBooleanObjects(theBooleanObjects);
219 //==================================================================================================
220 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
221 const std::shared_ptr<ModelAPI_Feature>& theFeature,
222 const std::list<ModelHighAPI_Selection>& theBaseObjects,
223 const ModelHighAPI_Double& theToSize,
224 const ModelHighAPI_Double& theFromSize,
225 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
226 : FeaturesAPI_ExtrusionBoolean(theFeature)
229 fillAttribute(theBaseObjects, mybaseObjects);
230 setSizes(theToSize, theFromSize);
231 setBooleanObjects(theBooleanObjects);
235 //==================================================================================================
236 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
237 const std::shared_ptr<ModelAPI_Feature>& theFeature,
238 const std::list<ModelHighAPI_Selection>& theBaseObjects,
239 const ModelHighAPI_Selection& theDirection,
240 const ModelHighAPI_Double& theToSize,
241 const ModelHighAPI_Double& theFromSize,
242 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
243 : FeaturesAPI_ExtrusionBoolean(theFeature)
246 fillAttribute(theBaseObjects, mybaseObjects);
247 fillAttribute(theDirection, mydirection);
248 setSizes(theToSize, theFromSize);
249 setBooleanObjects(theBooleanObjects);
253 //==================================================================================================
254 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
255 const std::shared_ptr<ModelAPI_Feature>& theFeature,
256 const std::list<ModelHighAPI_Selection>& theBaseObjects,
257 const ModelHighAPI_Selection& theToObject,
258 const ModelHighAPI_Double& theToOffset,
259 const ModelHighAPI_Selection& theFromObject,
260 const ModelHighAPI_Double& theFromOffset,
261 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
262 : FeaturesAPI_ExtrusionBoolean(theFeature)
265 fillAttribute(theBaseObjects, mybaseObjects);
266 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
267 fillAttribute(theToObject, mytoObject);
268 fillAttribute(theToOffset, mytoOffset);
269 fillAttribute(theFromObject, myfromObject);
270 fillAttribute(theFromOffset, myfromOffset);
271 setBooleanObjects(theBooleanObjects);
275 //==================================================================================================
276 FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(
277 const std::shared_ptr<ModelAPI_Feature>& theFeature,
278 const std::list<ModelHighAPI_Selection>& theBaseObjects,
279 const ModelHighAPI_Selection& theDirection,
280 const ModelHighAPI_Selection& theToObject,
281 const ModelHighAPI_Double& theToOffset,
282 const ModelHighAPI_Selection& theFromObject,
283 const ModelHighAPI_Double& theFromOffset,
284 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
285 : FeaturesAPI_ExtrusionBoolean(theFeature)
288 fillAttribute(theBaseObjects, mybaseObjects);
289 fillAttribute(theDirection, mydirection);
290 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
291 fillAttribute(theToObject, mytoObject);
292 fillAttribute(theToOffset, mytoOffset);
293 fillAttribute(theFromObject, myfromObject);
294 fillAttribute(theFromOffset, myfromOffset);
295 setBooleanObjects(theBooleanObjects);
299 //==================================================================================================
300 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
301 const std::list<ModelHighAPI_Selection>& theBaseObjects,
302 const ModelHighAPI_Double& theSize,
303 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
305 std::shared_ptr<ModelAPI_Feature> aFeature =
306 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
307 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects,
308 theSize, theBooleanObjects));
311 //==================================================================================================
312 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
313 const std::list<ModelHighAPI_Selection>& theBaseObjects,
314 const ModelHighAPI_Selection& theDirection,
315 const ModelHighAPI_Double& theSize,
316 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
318 std::shared_ptr<ModelAPI_Feature> aFeature =
319 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
320 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theDirection,
321 theSize, theBooleanObjects));
324 //==================================================================================================
325 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
326 const std::list<ModelHighAPI_Selection>& theBaseObjects,
327 const ModelHighAPI_Double& theToSize,
328 const ModelHighAPI_Double& theFromSize,
329 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
331 std::shared_ptr<ModelAPI_Feature> aFeature =
332 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
333 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects,
334 theToSize, theFromSize, theBooleanObjects));
337 //==================================================================================================
338 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
339 const std::list<ModelHighAPI_Selection>& theBaseObjects,
340 const ModelHighAPI_Selection& theDirection,
341 const ModelHighAPI_Double& theToSize,
342 const ModelHighAPI_Double& theFromSize,
343 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
345 std::shared_ptr<ModelAPI_Feature> aFeature =
346 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
347 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
355 //==================================================================================================
356 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
357 const std::list<ModelHighAPI_Selection>& theBaseObjects,
358 const ModelHighAPI_Selection& theToObject,
359 const ModelHighAPI_Double& theToOffset,
360 const ModelHighAPI_Selection& theFromObject,
361 const ModelHighAPI_Double& theFromOffset,
362 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
364 std::shared_ptr<ModelAPI_Feature> aFeature =
365 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
366 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
375 //==================================================================================================
376 ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
377 const std::list<ModelHighAPI_Selection>& theBaseObjects,
378 const ModelHighAPI_Selection& theDirection,
379 const ModelHighAPI_Selection& theToObject,
380 const ModelHighAPI_Double& theToOffset,
381 const ModelHighAPI_Selection& theFromObject,
382 const ModelHighAPI_Double& theFromOffset,
383 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
385 std::shared_ptr<ModelAPI_Feature> aFeature =
386 thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
387 return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
398 //==================================================================================================
399 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
400 const std::shared_ptr<ModelAPI_Feature>& theFeature)
401 : FeaturesAPI_ExtrusionBoolean(theFeature)
406 //==================================================================================================
407 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
408 const std::shared_ptr<ModelAPI_Feature>& theFeature,
409 const std::list<ModelHighAPI_Selection>& theBaseObjects,
410 const ModelHighAPI_Double& theSize,
411 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
412 : FeaturesAPI_ExtrusionBoolean(theFeature)
415 fillAttribute(theBaseObjects, mybaseObjects);
417 setBooleanObjects(theBooleanObjects);
421 //==================================================================================================
422 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
423 const std::shared_ptr<ModelAPI_Feature>& theFeature,
424 const std::list<ModelHighAPI_Selection>& theBaseObjects,
425 const ModelHighAPI_Selection& theDirection,
426 const ModelHighAPI_Double& theSize,
427 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
428 : FeaturesAPI_ExtrusionBoolean(theFeature)
431 fillAttribute(theBaseObjects, mybaseObjects);
432 fillAttribute(theDirection, mydirection);
434 setBooleanObjects(theBooleanObjects);
438 //==================================================================================================
439 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
440 const std::shared_ptr<ModelAPI_Feature>& theFeature,
441 const std::list<ModelHighAPI_Selection>& theBaseObjects,
442 const ModelHighAPI_Double& theToSize,
443 const ModelHighAPI_Double& theFromSize,
444 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
445 : FeaturesAPI_ExtrusionBoolean(theFeature)
448 fillAttribute(theBaseObjects, mybaseObjects);
449 setSizes(theToSize, theFromSize);
450 setBooleanObjects(theBooleanObjects);
454 //==================================================================================================
455 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
456 const std::shared_ptr<ModelAPI_Feature>& theFeature,
457 const std::list<ModelHighAPI_Selection>& theBaseObjects,
458 const ModelHighAPI_Selection& theDirection,
459 const ModelHighAPI_Double& theToSize,
460 const ModelHighAPI_Double& theFromSize,
461 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
462 : FeaturesAPI_ExtrusionBoolean(theFeature)
465 fillAttribute(theBaseObjects, mybaseObjects);
466 fillAttribute(theDirection, mydirection);
467 setSizes(theToSize, theFromSize);
468 setBooleanObjects(theBooleanObjects);
472 //==================================================================================================
473 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
474 const std::shared_ptr<ModelAPI_Feature>& theFeature,
475 const std::list<ModelHighAPI_Selection>& theBaseObjects,
476 const ModelHighAPI_Selection& theToObject,
477 const ModelHighAPI_Double& theToOffset,
478 const ModelHighAPI_Selection& theFromObject,
479 const ModelHighAPI_Double& theFromOffset,
480 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
481 : FeaturesAPI_ExtrusionBoolean(theFeature)
484 fillAttribute(theBaseObjects, mybaseObjects);
485 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
486 fillAttribute(theToObject, mytoObject);
487 fillAttribute(theToOffset, mytoOffset);
488 fillAttribute(theFromObject, myfromObject);
489 fillAttribute(theFromOffset, myfromOffset);
490 setBooleanObjects(theBooleanObjects);
494 //==================================================================================================
495 FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(
496 const std::shared_ptr<ModelAPI_Feature>& theFeature,
497 const std::list<ModelHighAPI_Selection>& theBaseObjects,
498 const ModelHighAPI_Selection& theDirection,
499 const ModelHighAPI_Selection& theToObject,
500 const ModelHighAPI_Double& theToOffset,
501 const ModelHighAPI_Selection& theFromObject,
502 const ModelHighAPI_Double& theFromOffset,
503 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
504 : FeaturesAPI_ExtrusionBoolean(theFeature)
507 fillAttribute(theBaseObjects, mybaseObjects);
508 fillAttribute(theDirection, mydirection);
509 fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
510 fillAttribute(theToObject, mytoObject);
511 fillAttribute(theToOffset, mytoOffset);
512 fillAttribute(theFromObject, myfromObject);
513 fillAttribute(theFromOffset, myfromOffset);
514 setBooleanObjects(theBooleanObjects);
518 //==================================================================================================
519 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
520 const std::list<ModelHighAPI_Selection>& theBaseObjects,
521 const ModelHighAPI_Double& theSize,
522 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
524 std::shared_ptr<ModelAPI_Feature> aFeature =
525 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
526 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects,
527 theSize, theBooleanObjects));
530 //==================================================================================================
531 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
532 const std::list<ModelHighAPI_Selection>& theBaseObjects,
533 const ModelHighAPI_Selection& theDirection,
534 const ModelHighAPI_Double& theSize,
535 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
537 std::shared_ptr<ModelAPI_Feature> aFeature =
538 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
539 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects,
540 theDirection, theSize, theBooleanObjects));
543 //==================================================================================================
544 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
545 const std::list<ModelHighAPI_Selection>& theBaseObjects,
546 const ModelHighAPI_Double& theToSize,
547 const ModelHighAPI_Double& theFromSize,
548 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
550 std::shared_ptr<ModelAPI_Feature> aFeature =
551 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
552 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects,
553 theToSize, theFromSize, theBooleanObjects));
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_Double& theToSize,
561 const ModelHighAPI_Double& theFromSize,
562 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
564 std::shared_ptr<ModelAPI_Feature> aFeature =
565 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
566 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
574 //==================================================================================================
575 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
576 const std::list<ModelHighAPI_Selection>& theBaseObjects,
577 const ModelHighAPI_Selection& theToObject,
578 const ModelHighAPI_Double& theToOffset,
579 const ModelHighAPI_Selection& theFromObject,
580 const ModelHighAPI_Double& theFromOffset,
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,
594 //==================================================================================================
595 ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
596 const std::list<ModelHighAPI_Selection>& theBaseObjects,
597 const ModelHighAPI_Selection& theDirection,
598 const ModelHighAPI_Selection& theToObject,
599 const ModelHighAPI_Double& theToOffset,
600 const ModelHighAPI_Selection& theFromObject,
601 const ModelHighAPI_Double& theFromOffset,
602 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
604 std::shared_ptr<ModelAPI_Feature> aFeature =
605 thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
606 return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,