SHAPER  9.12.0
ModelAPI_BodyBuilder Class Referenceabstract

Extra API for the ResultBody that allows to work with naming. More...

Inheritance diagram for ModelAPI_BodyBuilder:
Inheritance graph

Public Member Functions

virtual void store (const GeomShapePtr &theShape, const bool theIsStoreSameShapes=true)=0
 Stores the shape (called by the execution method). More...
 
virtual void storeGenerated (const GeomShapePtr &theFromShape, const GeomShapePtr &theToShape, const bool theIsCleanStored=true)=0
 Stores the generated shape (called by the execution method). More...
 
virtual void storeGenerated (const std::list< GeomShapePtr > &theFromShapes, const GeomShapePtr &theToShape, const std::shared_ptr< GeomAlgoAPI_MakeShape > theMakeShape)=0
 Stores the root generated shapes (called by the execution method). More...
 
virtual void storeModified (const GeomShapePtr &theOldShape, const GeomShapePtr &theNewShape, const bool theIsCleanStored=true)=0
 Stores the modified shape (called by the execution method). More...
 
virtual void storeModified (const std::list< GeomShapePtr > &theOldShapes, const GeomShapePtr &theNewShape, const std::shared_ptr< GeomAlgoAPI_MakeShape > theMakeShape)=0
 Stores the root modified shapes (called by the execution method). More...
 
virtual GeomShapePtr shape ()=0
 Returns the shape-result produced by this feature. More...
 
virtual bool generated (const GeomShapePtr &theNewShape, const std::string &theName, const bool theCheckIsInResult=true)=0
 Records the subshape newShape which was generated during a topological construction. More...
 
virtual void generated (const GeomShapePtr &theOldShape, const GeomShapePtr &theNewShape, const std::string &theName="")=0
 Records the shape newShape which was generated from the shape oldShape during a topological construction. More...
 
virtual void modified (const GeomShapePtr &theOldShape, const GeomShapePtr &theNewShape, const std::string &theName="")=0
 Records the shape newShape which is a modification of the shape oldShape. More...
 
virtual void loadDeletedShapes (const GeomMakeShapePtr &theAlgo, const GeomShapePtr &theOldShape, const GeomAPI_Shape::ShapeType theShapeTypeToExplore, const GeomShapePtr &theShapesToAvoid=GeomShapePtr())=0
 load deleted shapes More...
 
virtual void loadModifiedShapes (const GeomMakeShapePtr &theAlgo, const GeomShapePtr &theOldShape, const GeomAPI_Shape::ShapeType theShapeTypeToExplore, const std::string &theName="")=0
 load and orient modified shapes More...
 
virtual void loadGeneratedShapes (const GeomMakeShapePtr &theAlgo, const GeomShapePtr &theOldShape, const GeomAPI_Shape::ShapeType theShapeTypeToExplore, const std::string &theName="", const bool theSaveOldIfNotInTree=false)=0
 load and orient generated shapes More...
 
virtual void loadFirstLevel (GeomShapePtr theShape, const std::string &theName)=0
 load shapes of the first level (to be used during shape import) More...
 
virtual MODELAPI_EXPORT void cleanCash ()=0
 Cleans cash related to the already stored elements. More...
 

Protected Member Functions

virtual MODELAPI_EXPORT std::shared_ptr< ModelAPI_Datadata () const
 Returns the data manager of this object: attributes. More...
 
virtual MODELAPI_EXPORT std::shared_ptr< ModelAPI_Documentdocument () const
 Returns document this feature belongs to. More...
 
MODELAPI_EXPORT ModelAPI_BodyBuilder (ModelAPI_Object *theOwner)
 Default constructor accessible only from Model_Object. More...
 

Protected Attributes

ModelAPI_ObjectmyOwner
 the owner object this builder belongs to More...
 

Detailed Description

Extra API for the ResultBody that allows to work with naming.

Constructor & Destructor Documentation

◆ ModelAPI_BodyBuilder()

ModelAPI_BodyBuilder::ModelAPI_BodyBuilder ( ModelAPI_Object theOwner)
protected

Default constructor accessible only from Model_Object.

Member Function Documentation

◆ store()

virtual void ModelAPI_BodyBuilder::store ( const GeomShapePtr &  theShape,
const bool  theIsStoreSameShapes = true 
)
pure virtual

Stores the shape (called by the execution method).

Implemented in Model_BodyBuilder.

◆ storeGenerated() [1/2]

virtual void ModelAPI_BodyBuilder::storeGenerated ( const GeomShapePtr &  theFromShape,
const GeomShapePtr &  theToShape,
const bool  theIsCleanStored = true 
)
pure virtual

Stores the generated shape (called by the execution method).

Implemented in Model_BodyBuilder.

◆ storeGenerated() [2/2]

virtual void ModelAPI_BodyBuilder::storeGenerated ( const std::list< GeomShapePtr > &  theFromShapes,
const GeomShapePtr &  theToShape,
const std::shared_ptr< GeomAlgoAPI_MakeShape theMakeShape 
)
pure virtual

Stores the root generated shapes (called by the execution method).

Implemented in Model_BodyBuilder.

◆ storeModified() [1/2]

virtual void ModelAPI_BodyBuilder::storeModified ( const GeomShapePtr &  theOldShape,
const GeomShapePtr &  theNewShape,
const bool  theIsCleanStored = true 
)
pure virtual

Stores the modified shape (called by the execution method).

Implemented in Model_BodyBuilder.

◆ storeModified() [2/2]

virtual void ModelAPI_BodyBuilder::storeModified ( const std::list< GeomShapePtr > &  theOldShapes,
const GeomShapePtr &  theNewShape,
const std::shared_ptr< GeomAlgoAPI_MakeShape theMakeShape 
)
pure virtual

Stores the root modified shapes (called by the execution method).

Implemented in Model_BodyBuilder.

◆ shape()

virtual GeomShapePtr ModelAPI_BodyBuilder::shape ( )
pure virtual

Returns the shape-result produced by this feature.

Implemented in Model_BodyBuilder.

◆ generated() [1/2]

virtual bool ModelAPI_BodyBuilder::generated ( const GeomShapePtr &  theNewShape,
const std::string &  theName,
const bool  theCheckIsInResult = true 
)
pure virtual

Records the subshape newShape which was generated during a topological construction.

As an example, consider the case of a face generated in construction of a box. Returns true if it is stored correctly (the final shape contains this new sub-shape)

Implemented in Model_BodyBuilder.

◆ generated() [2/2]

virtual void ModelAPI_BodyBuilder::generated ( const GeomShapePtr &  theOldShape,
const GeomShapePtr &  theNewShape,
const std::string &  theName = "" 
)
pure virtual

Records the shape newShape which was generated from the shape oldShape during a topological construction.

As an example, consider the case of a face generated from an edge in construction of a prism.

Implemented in Model_BodyBuilder.

◆ modified()

virtual void ModelAPI_BodyBuilder::modified ( const GeomShapePtr &  theOldShape,
const GeomShapePtr &  theNewShape,
const std::string &  theName = "" 
)
pure virtual

Records the shape newShape which is a modification of the shape oldShape.

As an example, consider the case of a face split or merged in a Boolean operation.

Implemented in Model_BodyBuilder.

◆ loadDeletedShapes()

virtual void ModelAPI_BodyBuilder::loadDeletedShapes ( const GeomMakeShapePtr &  theAlgo,
const GeomShapePtr &  theOldShape,
const GeomAPI_Shape::ShapeType  theShapeTypeToExplore,
const GeomShapePtr &  theShapesToAvoid = GeomShapePtr() 
)
pure virtual

load deleted shapes

Implemented in Model_BodyBuilder.

◆ loadModifiedShapes()

virtual void ModelAPI_BodyBuilder::loadModifiedShapes ( const GeomMakeShapePtr &  theAlgo,
const GeomShapePtr &  theOldShape,
const GeomAPI_Shape::ShapeType  theShapeTypeToExplore,
const std::string &  theName = "" 
)
pure virtual

load and orient modified shapes

Implemented in Model_BodyBuilder.

◆ loadGeneratedShapes()

virtual void ModelAPI_BodyBuilder::loadGeneratedShapes ( const GeomMakeShapePtr &  theAlgo,
const GeomShapePtr &  theOldShape,
const GeomAPI_Shape::ShapeType  theShapeTypeToExplore,
const std::string &  theName = "",
const bool  theSaveOldIfNotInTree = false 
)
pure virtual

load and orient generated shapes

Implemented in Model_BodyBuilder.

◆ loadFirstLevel()

virtual void ModelAPI_BodyBuilder::loadFirstLevel ( GeomShapePtr  theShape,
const std::string &  theName 
)
pure virtual

load shapes of the first level (to be used during shape import)

Implemented in Model_BodyBuilder.

◆ cleanCash()

virtual MODELAPI_EXPORT void ModelAPI_BodyBuilder::cleanCash ( )
pure virtual

Cleans cash related to the already stored elements.

Implemented in Model_BodyBuilder.

◆ data()

std::shared_ptr< ModelAPI_Data > ModelAPI_BodyBuilder::data ( ) const
protectedvirtual

Returns the data manager of this object: attributes.

◆ document()

std::shared_ptr< ModelAPI_Document > ModelAPI_BodyBuilder::document ( ) const
protectedvirtual

Returns document this feature belongs to.

Field Documentation

◆ myOwner

ModelAPI_Object* ModelAPI_BodyBuilder::myOwner
protected

the owner object this builder belongs to