1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesAPI_RemoveSubShapes.cpp
4 // Created: 09 June 2016
5 // Author: Dmitry Bobylev
7 #include "FeaturesAPI_RemoveSubShapes.h"
9 #include <ModelHighAPI_Tools.h>
11 //==================================================================================================
12 FeaturesAPI_RemoveSubShapes::FeaturesAPI_RemoveSubShapes(const std::shared_ptr<ModelAPI_Feature>& theFeature)
13 : ModelHighAPI_Interface(theFeature)
18 //==================================================================================================
19 FeaturesAPI_RemoveSubShapes::FeaturesAPI_RemoveSubShapes(const std::shared_ptr<ModelAPI_Feature>& theFeature,
20 const ModelHighAPI_Selection& theBase)
21 : ModelHighAPI_Interface(theFeature)
30 //==================================================================================================
31 FeaturesAPI_RemoveSubShapes::~FeaturesAPI_RemoveSubShapes()
36 //==================================================================================================
37 void FeaturesAPI_RemoveSubShapes::setBase(const ModelHighAPI_Selection& theBase)
39 fillAttribute(theBase, mybase);
44 //==================================================================================================
45 void FeaturesAPI_RemoveSubShapes::setSubShapesToKeep(const std::list<ModelHighAPI_Selection>& theSubShapes)
47 fillAttribute(theSubShapes, mysubshapes);
52 //==================================================================================================
53 RemoveSubShapesPtr addRemoveSubShapes(const std::shared_ptr<ModelAPI_Document>& thePart,
54 const ModelHighAPI_Selection& theBase)
56 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_RemoveSubShapes::ID());
57 return RemoveSubShapesPtr(new FeaturesAPI_RemoveSubShapes(aFeature, theBase));