SHAPER  9.12.0
GeomAlgoAPI_Translation Class Reference

Creates a copy of the object by moving it along the axis. More...

Inheritance diagram for GeomAlgoAPI_Translation:
Inheritance graph

Public Types

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

Public Member Functions

GEOMALGOAPI_EXPORT GeomAlgoAPI_Translation (std::shared_ptr< GeomAPI_Shape > theSourceShape, std::shared_ptr< GeomAPI_Ax1 > theAxis, double theDistance)
 Creates an object which is obtained from current object by moving it along the axis. More...
 
GEOMALGOAPI_EXPORT GeomAlgoAPI_Translation (std::shared_ptr< GeomAPI_Shape > theSourceShape, double theDx, double theDy, double theDz)
 Creates an object which is obtained from current object by moving it along a vector defined by its dimensions in X, Y and Z. More...
 
GEOMALGOAPI_EXPORT GeomAlgoAPI_Translation (std::shared_ptr< GeomAPI_Shape > theSourceShape, std::shared_ptr< GeomAPI_Pnt > theStartPoint, std::shared_ptr< GeomAPI_Pnt > theEndPoint)
 Creates an object which is obtained from current object by moving it along a vector defined by two points. More...
 
virtual GEOMALGOAPI_EXPORT void build ()
 Execute the algorithm. More...
 
template<class T >
void initialize (T *theBuilder, const BuilderType theBuilderType=OCCT_BRepBuilderAPI_MakeShape)
 Initializes internals. 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 void modified (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...
 

Protected Member Functions

void build (std::shared_ptr< GeomAPI_Shape > theSourceShape, std::shared_ptr< GeomAPI_Trsf > theTrsf)
 Builds resulting shape. More...
 
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

Creates a copy of the object by moving it along the axis.

Member Enumeration Documentation

◆ BuilderType

Builder type enum.

Constructor & Destructor Documentation

◆ GeomAlgoAPI_Translation() [1/3]

GeomAlgoAPI_Translation::GeomAlgoAPI_Translation ( std::shared_ptr< GeomAPI_Shape theSourceShape,
std::shared_ptr< GeomAPI_Ax1 theAxis,
double  theDistance 
)

Creates an object which is obtained from current object by moving it along the axis.

Parameters
[in]theSourceShapea shape to be moved.
[in]theAxismovement axis.
[in]theDistancemovement distance.

◆ GeomAlgoAPI_Translation() [2/3]

GeomAlgoAPI_Translation::GeomAlgoAPI_Translation ( std::shared_ptr< GeomAPI_Shape theSourceShape,
double  theDx,
double  theDy,
double  theDz 
)

Creates an object which is obtained from current object by moving it along a vector defined by its dimensions in X, Y and Z.

Parameters
[in]theSourceShapethe shape to be moved.
[in]theDXthe movement dimension in X.
[in]theDYthe movement dimension in Y.
[in]theDZthe movement dimension in Z.

◆ GeomAlgoAPI_Translation() [3/3]

GeomAlgoAPI_Translation::GeomAlgoAPI_Translation ( std::shared_ptr< GeomAPI_Shape theSourceShape,
std::shared_ptr< GeomAPI_Pnt theStartPoint,
std::shared_ptr< GeomAPI_Pnt theEndPoint 
)

Creates an object which is obtained from current object by moving it along a vector defined by two points.

Parameters
[in]theSourceShapethe shape to be moved.
[in]theStartPointthe movement start point.
[in]theEndPointthe movement end point.

Member Function Documentation

◆ build() [1/2]

void GeomAlgoAPI_Transform::build ( std::shared_ptr< GeomAPI_Shape theSourceShape,
std::shared_ptr< GeomAPI_Trsf theTrsf 
)
protectedinherited

Builds resulting shape.

◆ build() [2/2]

virtual GEOMALGOAPI_EXPORT void GeomAlgoAPI_MakeShape::build ( )
inlinevirtualinherited

◆ 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.

◆ 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.

◆ modified()

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

Reimplemented in GeomAlgoAPI_UnifySameDomain, GeomAlgoAPI_Sewing, GeomAlgoAPI_MakeShapeCustom, GeomAlgoAPI_MakeShapeSet, GeomAlgoAPI_MakeShapeList, GeomAlgoAPI_MakeVolume, GeomAlgoAPI_Fillet1D, and GeomAlgoAPI_Boolean.

◆ 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.