OpenLexocad  27.1
Geom::BrepData Class Reference

The BrepData class holds the boundary representation of a FacetedBrep in the form of a model description and unique points. Each added point has an index. The model is formed by using the indices where '-1' indicates the end of a face and '-2' indicates the end of a loop. More...

#include <BrepData.h>

Inheritance diagram for Geom::BrepData:

Public Member Functions

 BrepData ()
 
 BrepData (double tolerance)
 
 ~BrepData (void)
 
 BrepData::BrepData (const BrepData &p)
 
 BrepData (const std::vector< Geom::Pnt > &baseFace, const Geom::Vec &extrude)
 
std::vector< Geom::PntgetPoints () const
 
int64_t getUniquePointsCnt () const
 
std::vector< int > getModel () const
 
void setModel (const std::vector< int > &model)
 
bool checkLoop (const std::vector< int > &model) const
 
bool hasDegeneratedLoops () const
 
void add (pConstBrepData data)
 Adds BrepData to this BrepData. More...
 
int addUniquePoint (const Geom::Pnt &p)
 Adds a unique point and returns the position of the point. More...
 
int addModelIndex (int idx)
 Adds a model index and returns the position of the point. More...
 
int getModelIndexAt (int idx) const
 Throws Base::OutOfRange if index is out of range. More...
 
const Geom::PntgetPointAt (int idx) const
 Throws Base::OutOfRange if index is out of range. More...
 
bool hasPoint (const Geom::Pnt &p)
 Checks if a point is already in BrepData. More...
 
void setEmpty ()
 Sets the data structure empty. More...
 
bool isEmpty () const
 Checks if the data structure is empty. More...
 
int getFaceCount () const
 Returns the number of faces in the Brep. More...
 
std::vector< pConstBrepFacegetFaces () const
 Returns all faces. More...
 
double getModelingTolerance () const
 Returns the modeling tolerance of the Brep. More...
 
bool hasVoids () const
 Checks if the BrepData has voids (holes) More...
 
void reverse ()
 Reverses the orientation of all faces. More...
 
void lock ()
 Lock mutex. More...
 
void unlock ()
 Unlock mutex. More...
 
Geom::BrepDataoperator= (const Geom::BrepData &rhs)
 
bool operator== (const Geom::BrepData &other) const
 
bool operator!= (const Geom::BrepData &other) const
 
void addFace (std::vector< int > index)
 
size_t getHash () const
 
int64_t addUniquePointCheckIsNew (const Geom::Pnt &p, bool &r_is_new)
 
void transform (const Geom::Trsf &T)
 
Geom::BrepData transformed (const Geom::Trsf &T) const
 Transforms a vector with the transformation T.
More...
 
void dump ()
 
void _addPointAtIndex (const Geom::Pnt &p, int idx)
 Adds a point at position 'idx'. This is only for fast restoring of saved data. For internal use. More...
 

Friends

class Core::PropertyBrepData
 
class Core::PropertyBrepDataSet
 
class BrepFace
 
class BrepLoop
 
class Topo::FaceTool
 

Detailed Description

The BrepData class holds the boundary representation of a FacetedBrep in the form of a model description and unique points. Each added point has an index. The model is formed by using the indices where '-1' indicates the end of a face and '-2' indicates the end of a loop.

Example: model = { 0, 1, 2, 3, -2, -1 }

In the BrepData class all points are unique within a given tolerance. The face normals and the outer loop normals must always point outwards (away from the material) while inner loops point inwards. The FacetedBrep can be open or closed.

Since
24.0

Constructor & Destructor Documentation

◆ BrepData() [1/3]

Geom::BrepData::BrepData ( )

◆ BrepData() [2/3]

Geom::BrepData::BrepData ( double  tolerance)

◆ ~BrepData()

Geom::BrepData::~BrepData ( void  )

◆ BrepData() [3/3]

Geom::BrepData::BrepData ( const std::vector< Geom::Pnt > &  baseFace,
const Geom::Vec extrude 
)

Member Function Documentation

◆ _addPointAtIndex()

void Geom::BrepData::_addPointAtIndex ( const Geom::Pnt p,
int  idx 
)

Adds a point at position 'idx'. This is only for fast restoring of saved data. For internal use.

◆ add()

void Geom::BrepData::add ( pConstBrepData  data)

Adds BrepData to this BrepData.

◆ addFace()

void Geom::BrepData::addFace ( std::vector< int >  index)

◆ addModelIndex()

int Geom::BrepData::addModelIndex ( int  idx)

Adds a model index and returns the position of the point.

◆ addUniquePoint()

int Geom::BrepData::addUniquePoint ( const Geom::Pnt p)

Adds a unique point and returns the position of the point.

◆ addUniquePointCheckIsNew()

int64_t Geom::BrepData::addUniquePointCheckIsNew ( const Geom::Pnt p,
bool &  r_is_new 
)

◆ BrepData::BrepData()

Geom::BrepData::BrepData::BrepData ( const BrepData p)

◆ checkLoop()

bool Geom::BrepData::checkLoop ( const std::vector< int > &  model) const

◆ dump()

void Geom::BrepData::dump ( )

◆ getFaceCount()

int Geom::BrepData::getFaceCount ( ) const

Returns the number of faces in the Brep.

◆ getFaces()

std::vector<pConstBrepFace> Geom::BrepData::getFaces ( ) const

Returns all faces.

◆ getHash()

size_t Geom::BrepData::getHash ( ) const

◆ getModel()

std::vector<int> Geom::BrepData::getModel ( ) const

◆ getModelIndexAt()

int Geom::BrepData::getModelIndexAt ( int  idx) const

Throws Base::OutOfRange if index is out of range.

◆ getModelingTolerance()

double Geom::BrepData::getModelingTolerance ( ) const
inline

Returns the modeling tolerance of the Brep.

◆ getPointAt()

const Geom::Pnt* Geom::BrepData::getPointAt ( int  idx) const

Throws Base::OutOfRange if index is out of range.

◆ getPoints()

std::vector<Geom::Pnt> Geom::BrepData::getPoints ( ) const

◆ getUniquePointsCnt()

int64_t Geom::BrepData::getUniquePointsCnt ( ) const

◆ hasDegeneratedLoops()

bool Geom::BrepData::hasDegeneratedLoops ( ) const

◆ hasPoint()

bool Geom::BrepData::hasPoint ( const Geom::Pnt p)

Checks if a point is already in BrepData.

◆ hasVoids()

bool Geom::BrepData::hasVoids ( ) const

Checks if the BrepData has voids (holes)

◆ isEmpty()

bool Geom::BrepData::isEmpty ( ) const

Checks if the data structure is empty.

◆ lock()

void Geom::BrepData::lock ( )

Lock mutex.

◆ operator!=()

bool Geom::BrepData::operator!= ( const Geom::BrepData other) const

◆ operator=()

Geom::BrepData& Geom::BrepData::operator= ( const Geom::BrepData rhs)

◆ operator==()

bool Geom::BrepData::operator== ( const Geom::BrepData other) const

◆ reverse()

void Geom::BrepData::reverse ( )

Reverses the orientation of all faces.

◆ setEmpty()

void Geom::BrepData::setEmpty ( )

Sets the data structure empty.

◆ setModel()

void Geom::BrepData::setModel ( const std::vector< int > &  model)

◆ transform()

void Geom::BrepData::transform ( const Geom::Trsf T)

◆ transformed()

Geom::BrepData Geom::BrepData::transformed ( const Geom::Trsf T) const

Transforms a vector with the transformation T.

◆ unlock()

void Geom::BrepData::unlock ( )

Unlock mutex.

Friends And Related Function Documentation

◆ BrepFace

friend class BrepFace
friend

◆ BrepLoop

friend class BrepLoop
friend

◆ Core::PropertyBrepData

friend class Core::PropertyBrepData
friend

◆ Core::PropertyBrepDataSet

friend class Core::PropertyBrepDataSet
friend

◆ Topo::FaceTool

friend class Topo::FaceTool
friend

The documentation for this class was generated from the following file: