20 #ifndef FeaturesPlugin_CompositeBoolean_H_
21 #define FeaturesPlugin_CompositeBoolean_H_
23 #include "FeaturesPlugin.h"
25 #include <ModelAPI_Feature.h>
26 #include <ModelAPI_ResultBody.h>
27 #include <GeomAlgoAPI_MakeShape.h>
28 #include <GeomAlgoAPI_MakeShapeList.h>
46 static const std::string MY_OBJECTS_ID(
"main_objects");
53 const OperationType& operationType()
const {
return myOperationType; }
57 ResultBodyPtr resultBody;
58 GeomShapePtr baseShape;
59 std::shared_ptr<GeomAlgoAPI_MakeShape> makeShape;
70 ListOfMakeShape& theMakeShapes) = 0;
78 ListOfShape& theObjects,
79 ListOfMakeShape& theMakeShapes);
83 const GeomShapePtr theBaseShape,
84 const GeomMakeShapePtr theMakeShape) = 0;
88 const GeomShapePtr theObject,
89 const ListOfShape& theTools,
90 const std::shared_ptr<GeomAlgoAPI_MakeShape> theMakeShape);
94 const ListOfShape& theTools,
95 const GeomShapePtr theResultShapesCompound);
105 bool cutRecursiveCompound (
const GeomShapePtr theCompound,
106 const ListOfShape& theTools,
107 std::shared_ptr<GeomAlgoAPI_MakeShapeList>& theMakeShapeList,
108 GeomShapePtr& theResult);
116 void addSubShapes (
const GeomShapePtr theCompound,
117 const ListOfShape& theSubShapesToAvoid,
118 ListOfShape& theSubShapesToAdd);
122 OperationType myOperationType;
Interface for the composite boolean feature.
Definition: FeaturesPlugin_CompositeBoolean.h:34
virtual void storeGenerationHistory(ResultBodyPtr theResultBody, const GeomShapePtr theBaseShape, const GeomMakeShapePtr theMakeShape)=0
Stores generation history.
virtual bool makeGeneration(ListOfShape &theBaseShapes, ListOfMakeShape &theMakeShapes)=0
This function need to be defined for extrusion/revolution generation.
static const std::string & OBJECTS_ID()
Attribute name of main objects.
Definition: FeaturesPlugin_CompositeBoolean.h:44
void initBooleanAttributes()
Initializes boolean attributes.
Definition: FeaturesPlugin_CompositeBoolean.cpp:37
virtual void executeCompositeBoolean()
Performs the algorithm and stores results it in the data structure.
Definition: FeaturesPlugin_CompositeBoolean.cpp:43
bool makeBoolean(const ListOfShape &theTools, ListOfShape &theObjects, ListOfMakeShape &theMakeShapes)
Makes boolean operation.
Definition: FeaturesPlugin_CompositeBoolean.cpp:229
void storeDeletedShapes(std::vector< ResultBaseAlgo > &theResultBaseAlgoList, const ListOfShape &theTools, const GeomShapePtr theResultShapesCompound)
Stores deleted shapes.
Definition: FeaturesPlugin_CompositeBoolean.cpp:555
void storeModificationHistory(ResultBodyPtr theResultBody, const GeomShapePtr theObject, const ListOfShape &theTools, const std::shared_ptr< GeomAlgoAPI_MakeShape > theMakeShape)
Stores modification history.
Definition: FeaturesPlugin_CompositeBoolean.cpp:538
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:41
Definition: FeaturesPlugin_CompositeBoolean.h:56