20 #ifndef GeomAlgoAPI_MakeShape_H_
21 #define GeomAlgoAPI_MakeShape_H_
23 #include <GeomAlgoAPI.h>
24 #include <GeomAPI_DataMapOfShapeShape.h>
40 OCCT_BRepBuilderAPI_MakeShape,
56 const BuilderType theBuilderType = OCCT_BRepBuilderAPI_MakeShape)
58 myBuilderType(theBuilderType)
68 const BuilderType theBuilderType = OCCT_BRepBuilderAPI_MakeShape)
71 myBuilderType = theBuilderType;
76 GEOMALGOAPI_EXPORT
virtual void build() {}
79 GEOMALGOAPI_EXPORT
bool isDone()
const;
82 GEOMALGOAPI_EXPORT
virtual const GeomShapePtr
shape()
const;
85 GEOMALGOAPI_EXPORT
bool isValid()
const;
88 GEOMALGOAPI_EXPORT std::shared_ptr<GeomAPI_DataMapOfShapeShape>
mapOfSubShapes()
const;
93 GEOMALGOAPI_EXPORT
virtual void generated(
const GeomShapePtr theOldShape,
94 ListOfShape& theNewShapes);
99 GEOMALGOAPI_EXPORT
virtual void modified(
const GeomShapePtr theOldShape,
100 ListOfShape& theNewShapes);
104 GEOMALGOAPI_EXPORT
virtual bool isDeleted(
const GeomShapePtr theOldShape);
107 GEOMALGOAPI_EXPORT
virtual bool check() {
return true; };
121 GEOMALGOAPI_EXPORT
bool checkValid(std::string theMessage);
128 const int theShapeType);
135 const int theShapeType);
142 GEOMALGOAPI_EXPORT GeomShapePtr
oldShapesForNew(GeomShapePtr theWholeOld,
143 GeomShapePtr theNewShape,
144 const int theShapeType);
156 GEOMALGOAPI_EXPORT
void setDone(
const bool theFlag);
160 GEOMALGOAPI_EXPORT
void setShape(
const GeomShapePtr theShape);
167 std::shared_ptr<GeomAPI_DataMapOfShapeShape>
myMap;
180 GeomShapePtr myShape;
187 typedef std::shared_ptr<GeomAlgoAPI_MakeShape> GeomMakeShapePtr;
188 typedef std::list<GeomMakeShapePtr> ListOfMakeShape;
General base class for all interfaces in this package.
Definition: GeomAPI_Interface.h:38
void setImpl(T *theImpl)
Updates the impl (deletes the old one)
Definition: GeomAPI_Interface.h:71
Interface to the root class of all topological shapes constructions.
Definition: GeomAlgoAPI_MakeShape.h:35
virtual GEOMALGOAPI_EXPORT void generated(const GeomShapePtr theOldShape, ListOfShape &theNewShapes)
Definition: GeomAlgoAPI_MakeShape.cpp:88
virtual GEOMALGOAPI_EXPORT const GeomShapePtr shape() const
Definition: GeomAlgoAPI_MakeShape.cpp:69
GEOMALGOAPI_EXPORT void setBuilderType(const BuilderType theBuilderType)
Sets builder type.
Definition: GeomAlgoAPI_MakeShape.cpp:148
BuilderType
Builder type enum.
Definition: GeomAlgoAPI_MakeShape.h:38
GEOMALGOAPI_EXPORT std::shared_ptr< GeomAPI_DataMapOfShapeShape > mapOfSubShapes() const
Definition: GeomAlgoAPI_MakeShape.cpp:82
GEOMALGOAPI_EXPORT ~GeomAlgoAPI_MakeShape()
Destructor for remove myHist.
Definition: GeomAlgoAPI_MakeShape.cpp:55
bool isValidForHistory(const GeomShapePtr theShape)
Definition: GeomAlgoAPI_MakeShape.cpp:200
GEOMALGOAPI_EXPORT GeomShapePtr oldShapesForNew(GeomShapePtr theWholeOld, GeomShapePtr theNewShape, const int theShapeType)
Optimization of access the new shapes by old shapes for the limited set of needed new shapes.
Definition: GeomAlgoAPI_MakeShape.cpp:355
std::string myError
Error occurred during the execution of an algorithm.
Definition: GeomAlgoAPI_MakeShape.h:169
GEOMALGOAPI_EXPORT void setShape(const GeomShapePtr theShape)
Sets result shape.
Definition: GeomAlgoAPI_MakeShape.cpp:160
GEOMALGOAPI_EXPORT void setDone(const bool theFlag)
Sets status of builder.
Definition: GeomAlgoAPI_MakeShape.cpp:154
std::map< std::string, GeomShapePtr > myCreatedFaces
Map of created faces with their name for naming.
Definition: GeomAlgoAPI_MakeShape.h:171
void initialize(T *theBuilder, const BuilderType theBuilderType=OCCT_BRepBuilderAPI_MakeShape)
Initializes internals.
Definition: GeomAlgoAPI_MakeShape.h:66
virtual GEOMALGOAPI_EXPORT bool check()
Definition: GeomAlgoAPI_MakeShape.h:107
virtual GEOMALGOAPI_EXPORT void build()
Execute the algorithm.
Definition: GeomAlgoAPI_MakeShape.h:76
GEOMALGOAPI_EXPORT bool isValid() const
Definition: GeomAlgoAPI_MakeShape.cpp:75
virtual GEOMALGOAPI_EXPORT void modified(const GeomShapePtr theOldShape, ListOfShape &theNewShapes)
Definition: GeomAlgoAPI_MakeShape.cpp:109
GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape()
Empty constructor.
Definition: GeomAlgoAPI_MakeShape.cpp:47
GEOMALGOAPI_EXPORT bool isNewShapesCollected(GeomShapePtr theWholeOld, const int theShapeType)
Optimization of access the new shapes by old shapes for the limited set of needed new shapes.
Definition: GeomAlgoAPI_MakeShape.cpp:293
GEOMALGOAPI_EXPORT std::map< std::string, GeomShapePtr > getCreatedFaces()
Definition: GeomAlgoAPI_MakeShape.h:113
GEOMALGOAPI_EXPORT void collectNewShapes(GeomShapePtr theWholeOld, const int theShapeType)
Optimization of access the new shapes by old shapes for the limited set of needed new shapes.
Definition: GeomAlgoAPI_MakeShape.cpp:304
GEOMALGOAPI_EXPORT std::string getError()
Definition: GeomAlgoAPI_MakeShape.h:118
virtual GEOMALGOAPI_EXPORT bool isDeleted(const GeomShapePtr theOldShape)
Definition: GeomAlgoAPI_MakeShape.cpp:133
std::shared_ptr< GeomAPI_DataMapOfShapeShape > myMap
Data map to keep correct orientation of sub-shapes.
Definition: GeomAlgoAPI_MakeShape.h:167
GEOMALGOAPI_EXPORT bool checkValid(std::string theMessage)
Check the validity of the produced shape.
Definition: GeomAlgoAPI_MakeShape.cpp:268
virtual GEOMALGOAPI_EXPORT void prepareNamingFaces()
Prepare the naming of faces.
Definition: GeomAlgoAPI_MakeShape.cpp:257
GeomAlgoAPI_MakeShape(T *theBuilder, const BuilderType theBuilderType=OCCT_BRepBuilderAPI_MakeShape)
Constructor by builder and builder type.
Definition: GeomAlgoAPI_MakeShape.h:54
GEOMALGOAPI_EXPORT bool isDone() const
Definition: GeomAlgoAPI_MakeShape.cpp:63
GEOMALGOAPI_EXPORT void fixOrientation(GeomShapePtr &theShape)
Replaces theShape with shape from myMap.
Definition: GeomAlgoAPI_MakeShape.cpp:216