SHAPER  9.12.0
Model_BodyBuilder Class Reference

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

Inheritance diagram for Model_BodyBuilder:
Inheritance graph

Public Member Functions

virtual void store (const GeomShapePtr &theShape, const bool theIsStoreSameShapes=true) override
 Stores the shape (called by the execution method). More...
 
virtual void storeGenerated (const GeomShapePtr &theFromShape, const GeomShapePtr &theToShape, const bool theIsCleanStored=true) override
 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) override
 Stores the root generated shapes (called by the execution method). More...
 
virtual void storeModified (const GeomShapePtr &theOldShape, const GeomShapePtr &theNewShape, const bool theIsCleanStored=true) override
 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) override
 Stores the root modified shape (called by the execution method). More...
 
virtual GeomShapePtr shape ()
 Returns the shape-result produced by this feature. More...
 
virtual bool generated (const GeomShapePtr &theNewShape, const std::string &theName, const bool theCheckIsInResult=true) override
 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="") override
 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="") override
 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 &theShapesToExclude=GeomShapePtr()) override
 load deleted shapes More...
 
virtual void loadModifiedShapes (const GeomMakeShapePtr &theAlgo, const GeomShapePtr &theOldShape, const GeomAPI_Shape::ShapeType theShapeTypeToExplore, const std::string &theName="") override
 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) override
 load and orient generated shapes More...
 
virtual void loadFirstLevel (GeomShapePtr theShape, const std::string &theName) override
 Loads shapes of the first level (to be used during shape import) More...
 
virtual ~Model_BodyBuilder ()
 Removes the stored builders. More...
 
virtual void cleanCash () override
 Cleans cash related to the already stored elements. More...
 

Protected Member Functions

 Model_BodyBuilder (ModelAPI_Object *theOwner)
 Default constructor accessible only by Model_Objects. More...
 
void clean ()
 Removes the stored builders. More...
 
TNaming_Builder * builder (const int theTag)
 Returns (creates if necessary) the builder created on the needed tag of sub-label. More...
 
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...
 

Protected Attributes

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

Friends

class Model_ResultBody
 
class Model_ResultCompSolid
 

Detailed Description

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

Constructor & Destructor Documentation

◆ ~Model_BodyBuilder()

Model_BodyBuilder::~Model_BodyBuilder ( )
virtual

Removes the stored builders.

◆ Model_BodyBuilder()

Model_BodyBuilder::Model_BodyBuilder ( ModelAPI_Object theOwner)
protected

Default constructor accessible only by Model_Objects.

Member Function Documentation

◆ store()

void Model_BodyBuilder::store ( const GeomShapePtr &  theShape,
const bool  theIsStoreSameShapes = true 
)
overridevirtual

Stores the shape (called by the execution method).

Implements ModelAPI_BodyBuilder.

◆ storeGenerated() [1/2]

void Model_BodyBuilder::storeGenerated ( const GeomShapePtr &  theFromShape,
const GeomShapePtr &  theToShape,
const bool  theIsCleanStored = true 
)
overridevirtual

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

Implements ModelAPI_BodyBuilder.

◆ storeGenerated() [2/2]

void Model_BodyBuilder::storeGenerated ( const std::list< GeomShapePtr > &  theFromShapes,
const GeomShapePtr &  theToShape,
const std::shared_ptr< GeomAlgoAPI_MakeShape theMakeShape 
)
overridevirtual

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

Implements ModelAPI_BodyBuilder.

◆ storeModified() [1/2]

void Model_BodyBuilder::storeModified ( const GeomShapePtr &  theOldShape,
const GeomShapePtr &  theNewShape,
const bool  theIsCleanStored = true 
)
overridevirtual

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

Parameters
theOldShapeshape that produces result
theNewShaperesulting shape
theIsCleanStorederases all previous data structure of this body if true

Implements ModelAPI_BodyBuilder.

◆ storeModified() [2/2]

void Model_BodyBuilder::storeModified ( const std::list< GeomShapePtr > &  theOldShapes,
const GeomShapePtr &  theNewShape,
const std::shared_ptr< GeomAlgoAPI_MakeShape theMakeShape 
)
overridevirtual

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

Parameters
theOldShapesall shapes that produce result
theNewShaperesulting shape
theIsCleanStorederases all previous data structure of this body if true

Implements ModelAPI_BodyBuilder.

◆ shape()

GeomShapePtr Model_BodyBuilder::shape ( )
virtual

Returns the shape-result produced by this feature.

Implements ModelAPI_BodyBuilder.

◆ generated() [1/2]

bool Model_BodyBuilder::generated ( const GeomShapePtr &  theNewShape,
const std::string &  theName,
const bool  theCheckIsInResult = true 
)
overridevirtual

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)

Implements ModelAPI_BodyBuilder.

◆ generated() [2/2]

void Model_BodyBuilder::generated ( const GeomShapePtr &  theOldShape,
const GeomShapePtr &  theNewShape,
const std::string &  theName = "" 
)
overridevirtual

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.

Implements ModelAPI_BodyBuilder.

◆ modified()

void Model_BodyBuilder::modified ( const GeomShapePtr &  theOldShape,
const GeomShapePtr &  theNewShape,
const std::string &  theName = "" 
)
overridevirtual

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.

Implements ModelAPI_BodyBuilder.

◆ loadDeletedShapes()

void Model_BodyBuilder::loadDeletedShapes ( const GeomMakeShapePtr &  theAlgo,
const GeomShapePtr &  theOldShape,
const GeomAPI_Shape::ShapeType  theShapeTypeToExplore,
const GeomShapePtr &  theShapesToExclude = GeomShapePtr() 
)
overridevirtual

load deleted shapes

Implements ModelAPI_BodyBuilder.

◆ loadModifiedShapes()

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

load and orient modified shapes

Implements ModelAPI_BodyBuilder.

◆ loadGeneratedShapes()

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

load and orient generated shapes

Implements ModelAPI_BodyBuilder.

◆ loadFirstLevel()

void Model_BodyBuilder::loadFirstLevel ( GeomShapePtr  theShape,
const std::string &  theName 
)
overridevirtual

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

Implements ModelAPI_BodyBuilder.

◆ cleanCash()

void Model_BodyBuilder::cleanCash ( )
overridevirtual

Cleans cash related to the already stored elements.

Implements ModelAPI_BodyBuilder.

◆ clean()

void Model_BodyBuilder::clean ( )
protected

Removes the stored builders.

◆ builder()

TNaming_Builder * Model_BodyBuilder::builder ( const int  theTag)
protected

Returns (creates if necessary) the builder created on the needed tag of sub-label.

◆ data()

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

Returns the data manager of this object: attributes.

◆ document()

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

Returns document this feature belongs to.

Field Documentation

◆ myOwner

ModelAPI_Object* ModelAPI_BodyBuilder::myOwner
protectedinherited

the owner object this builder belongs to