SHAPER  9.12.0
GeomAlgoAPI_MakeVolume Class Reference

Perform building solid (compsolid) from a list of faces. More...

Inheritance diagram for GeomAlgoAPI_MakeVolume:
Inheritance graph

Public Types

enum  BuilderType { Unknown , OCCT_BRepBuilderAPI_MakeShape , OCCT_BOPAlgo_Builder }
 Builder type enum. More...
 

Public Member Functions

GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeVolume (const ListOfShape &theFaces, const bool theAvoidInternal)
 Constructor. More...
 
virtual GEOMALGOAPI_EXPORT void modified (const GeomShapePtr theOldShape, ListOfShape &theNewShapes)
 
template<class T >
void initialize (T *theBuilder, const BuilderType theBuilderType=OCCT_BRepBuilderAPI_MakeShape)
 Initializes internals. More...
 
virtual GEOMALGOAPI_EXPORT void build ()
 Execute the algorithm. More...
 
GEOMALGOAPI_EXPORT bool isDone () const
 
virtual GEOMALGOAPI_EXPORT const GeomShapePtr shape () const
 
GEOMALGOAPI_EXPORT bool isValid () const
 
GEOMALGOAPI_EXPORT std::shared_ptr< GeomAPI_DataMapOfShapeShapemapOfSubShapes () const
 
virtual GEOMALGOAPI_EXPORT void generated (const GeomShapePtr theOldShape, ListOfShape &theNewShapes)
 
virtual GEOMALGOAPI_EXPORT bool isDeleted (const GeomShapePtr theOldShape)
 
virtual GEOMALGOAPI_EXPORT bool check ()
 
virtual GEOMALGOAPI_EXPORT void prepareNamingFaces ()
 Prepare the naming of faces. More...
 
GEOMALGOAPI_EXPORT std::map< std::string, GeomShapePtr > getCreatedFaces ()
 
GEOMALGOAPI_EXPORT std::string getError ()
 
GEOMALGOAPI_EXPORT bool checkValid (std::string theMessage)
 Check the validity of the produced shape. More...
 
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. More...
 
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. More...
 
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. More...
 
GEOMALGOAPI_EXPORT void fixOrientation (GeomShapePtr &theShape)
 Replaces theShape with shape from myMap. More...
 
template<class T >
T * implPtr ()
 Returns the pointer to the impl. More...
 
template<class T >
const T * implPtr () const
 Returns the pointer to the impl. More...
 
template<class T >
const T & impl () const
 Returns the reference object of the impl. More...
 
template<class T >
void setImpl (T *theImpl)
 Updates the impl (deletes the old one) More...
 
GEOMAPI_EXPORT bool empty () const
 Returns true if the impl is empty. More...
 

Static Public Member Functions

static GEOMALGOAPI_EXPORT std::shared_ptr< GeomAPI_Shapemake (const ListOfShape &theFaces)
 Perform making volume. More...
 

Protected Member Functions

GEOMALGOAPI_EXPORT void setBuilderType (const BuilderType theBuilderType)
 Sets builder type. More...
 
GEOMALGOAPI_EXPORT void setDone (const bool theFlag)
 Sets status of builder. More...
 
GEOMALGOAPI_EXPORT void setShape (const GeomShapePtr theShape)
 Sets result shape. More...
 
bool isValidForHistory (const GeomShapePtr theShape)
 

Protected Attributes

std::shared_ptr< GeomAPI_DataMapOfShapeShapemyMap
 Data map to keep correct orientation of sub-shapes. More...
 
std::string myError
 Error occurred during the execution of an algorithm. More...
 
std::map< std::string, GeomShapePtr > myCreatedFaces
 Map of created faces with their name for naming. More...
 

Detailed Description

Perform building solid (compsolid) from a list of faces.

Member Enumeration Documentation

◆ BuilderType

Builder type enum.

Constructor & Destructor Documentation

◆ GeomAlgoAPI_MakeVolume()

GeomAlgoAPI_MakeVolume::GeomAlgoAPI_MakeVolume ( const ListOfShape &  theFaces,
const bool  theAvoidInternal 
)

Constructor.

Parameters
theFacesfaces that will construct a solid
theAvoidInternalto remove internal faces from the result

Member Function Documentation

◆ make()

std::shared_ptr< GeomAPI_Shape > GeomAlgoAPI_MakeVolume::make ( const ListOfShape &  theFaces)
static

Perform making volume.

Parameters
[in]theObjectslist of faces.
Returns
a solid or a compsolid as result of operation.

◆ modified()

void GeomAlgoAPI_MakeVolume::modified ( const GeomShapePtr  theOldShape,
ListOfShape &  theNewShapes 
)
virtual
Returns
the list of shapes modified from the shape theShape.
Parameters
[in]theOldShapebase shape.
[out]theNewShapesshapes modified from theShape. Does not cleared!

Reimplemented from GeomAlgoAPI_MakeShape.

◆ initialize()

template<class T >
void GeomAlgoAPI_MakeShape::initialize ( T *  theBuilder,
const BuilderType  theBuilderType = OCCT_BRepBuilderAPI_MakeShape 
)
inlineinherited

Initializes internals.

Parameters
[in]theBuilderpointer to the builder.
[in]theBuilderTypebuilder type.

◆ build()

virtual GEOMALGOAPI_EXPORT void GeomAlgoAPI_MakeShape::build ( )
inlinevirtualinherited

◆ isDone()

bool GeomAlgoAPI_MakeShape::isDone ( ) const
inherited
Returns
status of builder.

◆ shape()

const GeomShapePtr GeomAlgoAPI_MakeShape::shape ( ) const
virtualinherited
Returns
a shape built by the shape construction algorithm.

Reimplemented in GeomAlgoAPI_MakeShapeList.

◆ isValid()

bool GeomAlgoAPI_MakeShape::isValid ( ) const
inherited
Returns
true if resulting shape is valid.

◆ mapOfSubShapes()

std::shared_ptr< GeomAPI_DataMapOfShapeShape > GeomAlgoAPI_MakeShape::mapOfSubShapes ( ) const
inherited
Returns
map of sub-shapes of the result. To be used for History keeping.

◆ generated()

void GeomAlgoAPI_MakeShape::generated ( const GeomShapePtr  theOldShape,
ListOfShape &  theNewShapes 
)
virtualinherited
Returns
the list of shapes generated from the shape theShape.
Parameters
[in]theOldShapebase shape.
[out]theNewShapesshapes generated from theShape. Does not cleared!

Reimplemented in GeomAlgoAPI_Pipe, GeomAlgoAPI_MakeShapeSet, GeomAlgoAPI_MakeShapeList, GeomAlgoAPI_Offset, GeomAlgoAPI_MakeShapeCustom, and GeomAlgoAPI_Fillet1D.

◆ isDeleted()

bool GeomAlgoAPI_MakeShape::isDeleted ( const GeomShapePtr  theOldShape)
virtualinherited
Returns
true if theShape was deleted.
Parameters
[in]theOldShapebase shape.

Reimplemented in GeomAlgoAPI_MakeShapeList, and GeomAlgoAPI_MakeShapeCustom.

◆ check()

virtual GEOMALGOAPI_EXPORT bool GeomAlgoAPI_MakeShape::check ( )
inlinevirtualinherited

◆ prepareNamingFaces()

void GeomAlgoAPI_MakeShape::prepareNamingFaces ( )
virtualinherited

Prepare the naming of faces.

Reimplemented in GeomAlgoAPI_Box.

◆ getCreatedFaces()

GEOMALGOAPI_EXPORT std::map< std::string, GeomShapePtr > GeomAlgoAPI_MakeShape::getCreatedFaces ( )
inlineinherited
Returns
the list of created faces.

◆ getError()

GEOMALGOAPI_EXPORT std::string GeomAlgoAPI_MakeShape::getError ( )
inlineinherited
Returns
the error.

◆ checkValid()

bool GeomAlgoAPI_MakeShape::checkValid ( std::string  theMessage)
inherited

Check the validity of the produced shape.

◆ isNewShapesCollected()

bool GeomAlgoAPI_MakeShape::isNewShapesCollected ( GeomShapePtr  theWholeOld,
const int  theShapeType 
)
inherited

Optimization of access the new shapes by old shapes for the limited set of needed new shapes.

Parameters
theWholeOldthe whole old shape
theShapeTypetype of the sub-shapes that is used for optimization
Returns
true if optimization containers are already filled

◆ collectNewShapes()

void GeomAlgoAPI_MakeShape::collectNewShapes ( GeomShapePtr  theWholeOld,
const int  theShapeType 
)
inherited

Optimization of access the new shapes by old shapes for the limited set of needed new shapes.

Parameters
theWholeOldthe whole old shape
theShapeTypetype of the sub-shapes that is used for optimization
Returns
true if optimization containers are already filled

◆ oldShapesForNew()

GeomShapePtr GeomAlgoAPI_MakeShape::oldShapesForNew ( GeomShapePtr  theWholeOld,
GeomShapePtr  theNewShape,
const int  theShapeType 
)
inherited

Optimization of access the new shapes by old shapes for the limited set of needed new shapes.

Parameters
theWholeOldthe whole old shape
theNewShapethe whole new shape
theShapeTypetype of the old sub-shapes
Returns
compound of all old shapes that were used for creation of the given new

◆ fixOrientation()

void GeomAlgoAPI_MakeShape::fixOrientation ( GeomShapePtr &  theShape)
inherited

Replaces theShape with shape from myMap.

◆ setBuilderType()

void GeomAlgoAPI_MakeShape::setBuilderType ( const BuilderType  theBuilderType)
protectedinherited

Sets builder type.

Parameters
[in]theBuilderTypenew builder type.

◆ setDone()

void GeomAlgoAPI_MakeShape::setDone ( const bool  theFlag)
protectedinherited

Sets status of builder.

Parameters
[in]theFlagnew status.

◆ setShape()

void GeomAlgoAPI_MakeShape::setShape ( const GeomShapePtr  theShape)
protectedinherited

Sets result shape.

Parameters
[in]theShapenew shape.

◆ isValidForHistory()

bool GeomAlgoAPI_MakeShape::isValidForHistory ( const GeomShapePtr  theShape)
protectedinherited
Returns
true if passed shape is valid for history.

◆ implPtr() [1/2]

template<class T >
T* GeomAPI_Interface::implPtr ( )
inlineinherited

Returns the pointer to the impl.

◆ implPtr() [2/2]

template<class T >
const T* GeomAPI_Interface::implPtr ( ) const
inlineinherited

Returns the pointer to the impl.

◆ impl()

template<class T >
const T& GeomAPI_Interface::impl ( ) const
inlineinherited

Returns the reference object of the impl.

◆ setImpl()

template<class T >
void GeomAPI_Interface::setImpl ( T *  theImpl)
inlineinherited

Updates the impl (deletes the old one)

◆ empty()

bool GeomAPI_Interface::empty ( ) const
inherited

Returns true if the impl is empty.

Field Documentation

◆ myMap

std::shared_ptr<GeomAPI_DataMapOfShapeShape> GeomAlgoAPI_MakeShape::myMap
protectedinherited

Data map to keep correct orientation of sub-shapes.

◆ myError

std::string GeomAlgoAPI_MakeShape::myError
protectedinherited

Error occurred during the execution of an algorithm.

◆ myCreatedFaces

std::map< std::string, GeomShapePtr > GeomAlgoAPI_MakeShape::myCreatedFaces
protectedinherited

Map of created faces with their name for naming.