SHAPER  9.12.0
FeaturesPlugin_CompositeBoolean Class Referenceabstract

Interface for the composite boolean feature. More...

Inheritance diagram for FeaturesPlugin_CompositeBoolean:
Inheritance graph

Data Structures

struct  ResultBaseAlgo
 

Public Types

enum  OperationType { BOOL_CUT , BOOL_FUSE , BOOL_COMMON , BOOL_SMASH }
 

Public Member Functions

virtual void executeCompositeBoolean ()
 Performs the algorithm and stores results it in the data structure. More...
 
const OperationType & operationType () const
 

Static Public Member Functions

static const std::string & OBJECTS_ID ()
 Attribute name of main objects. More...
 

Protected Member Functions

void initBooleanAttributes ()
 Initializes boolean attributes. More...
 
virtual bool makeGeneration (ListOfShape &theBaseShapes, ListOfMakeShape &theMakeShapes)=0
 This function need to be defined for extrusion/revolution generation. More...
 
bool makeBoolean (const ListOfShape &theTools, ListOfShape &theObjects, ListOfMakeShape &theMakeShapes)
 Makes boolean operation. More...
 
virtual void storeGenerationHistory (ResultBodyPtr theResultBody, const GeomShapePtr theBaseShape, const GeomMakeShapePtr theMakeShape)=0
 Stores generation history. More...
 
void storeModificationHistory (ResultBodyPtr theResultBody, const GeomShapePtr theObject, const ListOfShape &theTools, const std::shared_ptr< GeomAlgoAPI_MakeShape > theMakeShape)
 Stores modification history. More...
 
void storeDeletedShapes (std::vector< ResultBaseAlgo > &theResultBaseAlgoList, const ListOfShape &theTools, const GeomShapePtr theResultShapesCompound)
 Stores deleted shapes. More...
 

Protected Attributes

ModelAPI_FeaturemyFeature
 
OperationType myOperationType
 

Detailed Description

Interface for the composite boolean feature.

Member Function Documentation

◆ OBJECTS_ID()

static const std::string& FeaturesPlugin_CompositeBoolean::OBJECTS_ID ( )
inlinestatic

Attribute name of main objects.

◆ executeCompositeBoolean()

void FeaturesPlugin_CompositeBoolean::executeCompositeBoolean ( )
virtual

Performs the algorithm and stores results it in the data structure.

◆ initBooleanAttributes()

void FeaturesPlugin_CompositeBoolean::initBooleanAttributes ( )
protected

Initializes boolean attributes.

◆ makeGeneration()

virtual bool FeaturesPlugin_CompositeBoolean::makeGeneration ( ListOfShape &  theBaseShapes,
ListOfMakeShape &  theMakeShapes 
)
protectedpure virtual

This function need to be defined for extrusion/revolution generation.

Implemented in FeaturesPlugin_RevolutionBoolean, and FeaturesPlugin_ExtrusionBoolean.

◆ makeBoolean()

bool FeaturesPlugin_CompositeBoolean::makeBoolean ( const ListOfShape &  theTools,
ListOfShape &  theObjects,
ListOfMakeShape &  theMakeShapes 
)
protected

Makes boolean operation.

Parameters
[in]theToolslist of tools.
[out]theObjectslist of objects.
[out]theMakeShapeslist of according algos.
Returns
false if failed.

◆ storeGenerationHistory()

virtual void FeaturesPlugin_CompositeBoolean::storeGenerationHistory ( ResultBodyPtr  theResultBody,
const GeomShapePtr  theBaseShape,
const GeomMakeShapePtr  theMakeShape 
)
protectedpure virtual

Stores generation history.

Implemented in FeaturesPlugin_RevolutionBoolean, and FeaturesPlugin_ExtrusionBoolean.

◆ storeModificationHistory()

void FeaturesPlugin_CompositeBoolean::storeModificationHistory ( ResultBodyPtr  theResultBody,
const GeomShapePtr  theObject,
const ListOfShape &  theTools,
const std::shared_ptr< GeomAlgoAPI_MakeShape theMakeShape 
)
protected

Stores modification history.

◆ storeDeletedShapes()

void FeaturesPlugin_CompositeBoolean::storeDeletedShapes ( std::vector< ResultBaseAlgo > &  theResultBaseAlgoList,
const ListOfShape &  theTools,
const GeomShapePtr  theResultShapesCompound 
)
protected

Stores deleted shapes.