20 #ifndef FeaturesPlugin_VersionedBoolean_H_
21 #define FeaturesPlugin_VersionedBoolean_H_
23 #include "FeaturesPlugin.h"
24 #include "FeaturesPlugin_Tools.h"
26 #include <GeomAPI_ShapeHierarchy.h>
27 #include <GeomAlgoAPI_Tools.h>
29 #include <ModelAPI_Feature.h>
30 #include <ModelAPI_Tools.h>
42 static const std::string& BOP_VERSION_9_4()
44 static const std::string VERSION(
"v9.4");
55 const std::shared_ptr<ModelAPI_Attribute> theObjectsAttr
56 = std::shared_ptr<ModelAPI_Attribute>(),
57 const std::shared_ptr<ModelAPI_Attribute> theToolsAttr
58 = std::shared_ptr<ModelAPI_Attribute>());
63 ListOfShape& thePlanesList);
69 bool processObject(
const GeomAlgoAPI_Tools::BOPType theBooleanType,
70 const GeomShapePtr& theObject,
71 const ListOfShape& theTools,
72 const ListOfShape& thePlanes,
73 const double theFuzzy,
75 std::vector<ModelAPI_Tools::ResultBaseAlgo>& theResultBaseAlgoList,
76 ListOfShape& theResultShapesList,
77 GeomShapePtr theResulCompound = GeomShapePtr());
85 const GeomShapePtr& theCompsolid,
86 const ListOfShape& theTools,
87 const ListOfShape& thePlanes,
88 const double theFuzzy,
90 std::vector<ModelAPI_Tools::ResultBaseAlgo>& theResultBaseAlgoList,
91 ListOfShape& theResultShapesList,
92 GeomShapePtr theResulCompound = GeomShapePtr());
100 const GeomShapePtr& theCompound,
101 const ListOfShape& theTools,
102 const double theFuzzy,
104 std::vector<ModelAPI_Tools::ResultBaseAlgo>& theResultBaseAlgoList,
105 ListOfShape& theResultShapesList,
106 GeomShapePtr theResulCompound = GeomShapePtr());
110 ListOfShape& thePlanes,
111 std::shared_ptr<GeomAlgoAPI_MakeShapeList>& theMakeShapeList);
117 const GeomShapePtr& theResult,
120 std::shared_ptr<GeomAlgoAPI_MakeShapeList> theMakeShapeList);
Feature controls a version of Boolean operations.
Definition: FeaturesPlugin_VersionedBoolean.h:40
GeomShapePtr keepUnusedSubsOfCompound(const GeomShapePtr &theResult, const GeomAPI_ShapeHierarchy &theObjectsHierarchy, const GeomAPI_ShapeHierarchy &theToolsHierarchy, std::shared_ptr< GeomAlgoAPI_MakeShapeList > theMakeShapeList)
Process unused sub-shapes of compounds.
Definition: FeaturesPlugin_VersionedBoolean.cpp:402
bool processAttribute(const std::string &theAttributeName, GeomAPI_ShapeHierarchy &theObjects, ListOfShape &thePlanesList)
Process SelectionList attribute and fill the objects hierarchy.
Definition: FeaturesPlugin_VersionedBoolean.cpp:95
bool processObject(const GeomAlgoAPI_Tools::BOPType theBooleanType, const GeomShapePtr &theObject, const ListOfShape &theTools, const ListOfShape &thePlanes, const double theFuzzy, int &theResultIndex, std::vector< ModelAPI_Tools::ResultBaseAlgo > &theResultBaseAlgoList, ListOfShape &theResultShapesList, GeomShapePtr theResulCompound=GeomShapePtr())
Perform Boolean operation of the object with the tools.
Definition: FeaturesPlugin_VersionedBoolean.cpp:123
static void resizePlanes(const ListOfShape &theObjects, ListOfShape &thePlanes, std::shared_ptr< GeomAlgoAPI_MakeShapeList > &theMakeShapeList)
Resize planes to fit them to the bounding box of the given lins of objects.
Definition: FeaturesPlugin_VersionedBoolean.cpp:425
bool processCompound(const GeomAlgoAPI_Tools::BOPType theBooleanType, GeomAPI_ShapeHierarchy &theCompoundHierarchy, const GeomShapePtr &theCompound, const ListOfShape &theTools, const double theFuzzy, int &theResultIndex, std::vector< ModelAPI_Tools::ResultBaseAlgo > &theResultBaseAlgoList, ListOfShape &theResultShapesList, GeomShapePtr theResulCompound=GeomShapePtr())
Perform Boolean operation of the Compound with the tools In case of theResultCompound is not empty,...
Definition: FeaturesPlugin_VersionedBoolean.cpp:312
void initVersion(const std::string &theVersion, const std::shared_ptr< ModelAPI_Attribute > theObjectsAttr=std::shared_ptr< ModelAPI_Attribute >(), const std::shared_ptr< ModelAPI_Attribute > theToolsAttr=std::shared_ptr< ModelAPI_Attribute >())
Initialize version field of the Boolean feature.
Definition: FeaturesPlugin_VersionedBoolean.cpp:77
FeaturesPlugin_VersionedBoolean()
Use plugin manager for features creation.
Definition: FeaturesPlugin_VersionedBoolean.h:49
bool processCompsolid(const GeomAlgoAPI_Tools::BOPType theBooleanType, GeomAPI_ShapeHierarchy &theCompsolidHierarchy, const GeomShapePtr &theCompsolid, const ListOfShape &theTools, const ListOfShape &thePlanes, const double theFuzzy, int &theResultIndex, std::vector< ModelAPI_Tools::ResultBaseAlgo > &theResultBaseAlgoList, ListOfShape &theResultShapesList, GeomShapePtr theResulCompound=GeomShapePtr())
Perform Boolean operation of the Compsolid with the tools In case of theResultCompound is not empty,...
Definition: FeaturesPlugin_VersionedBoolean.cpp:216
Storage for the hierarchy of shapes and their parents (compounds or compsolids)
Definition: GeomAPI_ShapeHierarchy.h:34
List of topological shapes constructions.
Definition: GeomAlgoAPI_MakeShapeList.h:33
Generic attribute of the Object.
Definition: ModelAPI_Attribute.h:34
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:41
The result of a feature.
Definition: ModelAPI_Result.h:37