1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesAPI_Intersection.cpp
4 // Created: 09 June 2016
5 // Author: Dmitry Bobylev
7 #include "FeaturesAPI_Intersection.h"
9 #include <ModelHighAPI_Tools.h>
11 //==================================================================================================
12 FeaturesAPI_Intersection::FeaturesAPI_Intersection(const std::shared_ptr<ModelAPI_Feature>& theFeature)
13 : ModelHighAPI_Interface(theFeature)
18 //==================================================================================================
19 FeaturesAPI_Intersection::FeaturesAPI_Intersection(const std::shared_ptr<ModelAPI_Feature>& theFeature,
20 const std::list<ModelHighAPI_Selection>& theObjects,
21 const std::list<ModelHighAPI_Selection>& theTools)
22 : ModelHighAPI_Interface(theFeature)
25 fillAttribute(theObjects, myobjects);
26 fillAttribute(theTools, mytools);
32 //==================================================================================================
33 FeaturesAPI_Intersection::~FeaturesAPI_Intersection()
38 //==================================================================================================
39 void FeaturesAPI_Intersection::setObjects(const std::list<ModelHighAPI_Selection>& theObjects)
41 fillAttribute(theObjects, myobjects);
46 //==================================================================================================
47 void FeaturesAPI_Intersection::setTools(const std::list<ModelHighAPI_Selection>& theTools)
49 fillAttribute(theTools, mytools);
54 //==================================================================================================
55 IntersectionPtr addIntersection(const std::shared_ptr<ModelAPI_Document>& thePart,
56 const std::list<ModelHighAPI_Selection>& theObjects,
57 const std::list<ModelHighAPI_Selection>& theTools)
59 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_Intersection::ID());
60 return IntersectionPtr(new FeaturesAPI_Intersection(aFeature, theObjects, theTools));