SMESH_MAT2d::Branch Class Reference

Branch is a set of MA edges enclosed between branch points and/or MA ends. It's main feature is to return two BoundaryPoint's per a point on it. Points on a Branch are defined by [0,1] parameter. More...

#include <SMESH_MAT2d.hxx>

Public Member Functions

bool getBoundaryPoints (const BranchPoint &p, BoundaryPoint &bp1, BoundaryPoint &bp2) const
 Returns points on two EDGEs, equidistant from a given point of this Branch. More...
 
bool getBoundaryPoints (double param, BoundaryPoint &bp1, BoundaryPoint &bp2) const
 Returns points on two EDGEs, equidistant from a given point of this Branch. More...
 
bool getBoundaryPoints (std::size_t iMAEdge, double maEdgeParam, BoundaryPoint &bp1, BoundaryPoint &bp2) const
 Returns points on two EDGEs, equidistant from a given point of this Branch. More...
 
const BranchEndgetEnd (bool the2nd) const
 
void getGeomEdges (std::vector< std::size_t > &edgeIDs1, std::vector< std::size_t > &edgeIDs2) const
 Return indices of EDGEs equidistant from this branch. More...
 
void getOppositeGeomEdges (std::vector< std::size_t > &edgeIDs1, std::vector< std::size_t > &edgeIDs2, std::vector< BranchPoint > &divPoints) const
 Return indices of opposite parts of EDGEs equidistant from this branch. More...
 
bool getParameter (const BranchPoint &p, double &u) const
 Return a parameter of a BranchPoint normalized within this Branch. More...
 
BranchPoint getPoint (const TVDVertex *vertex) const
 returns a BranchPoint corresponding to a TVDVertex More...
 
void getPoints (std::vector< gp_XY > &points, const double scale[2]) const
 Returns MA points. More...
 
bool hasEndOfType (BranchEndType type) const
 Check type of both ends. More...
 
void init (std::vector< const TVDEdge * > &maEdges, const Boundary *boundary, std::map< const TVDVertex *, BranchEndType > endType)
 Copy points of an EDGE. More...
 
bool isRemoved () const
 
std::size_t nbEdges () const
 
void setBranchesToEnds (const std::vector< Branch > &branches)
 fills BranchEnd::_branches of its ends More...
 
void setRemoved (const BranchPoint &proxyPoint)
 Sets a proxy point for a removed branch. More...
 

Static Public Member Functions

static std::size_t getBndSegment (const TVDEdge *maEdge)
 
static std::size_t getGeomEdge (const TVDEdge *maEdge)
 
static void setBndSegment (std::size_t segIndex, const TVDEdge *maEdge)
 
static void setGeomEdge (std::size_t geomIndex, const TVDEdge *maEdge)
 Store data of boundary segments in TVDEdge. More...
 

Detailed Description

Branch is a set of MA edges enclosed between branch points and/or MA ends. It's main feature is to return two BoundaryPoint's per a point on it. Points on a Branch are defined by [0,1] parameter.

Member Function Documentation

◆ getBndSegment()

std::size_t SMESH_MAT2d::Branch::getBndSegment ( const TVDEdge maEdge)
static

◆ getBoundaryPoints() [1/3]

bool SMESH_MAT2d::Branch::getBoundaryPoints ( const BranchPoint p,
BoundaryPoint bp1,
BoundaryPoint bp2 
) const

Returns points on two EDGEs, equidistant from a given point of this Branch.

◆ getBoundaryPoints() [2/3]

bool SMESH_MAT2d::Branch::getBoundaryPoints ( double  param,
BoundaryPoint bp1,
BoundaryPoint bp2 
) const

Returns points on two EDGEs, equidistant from a given point of this Branch.

Parameters
[in]param- [0;1] normalized param on the Branch
[out]bp1- BoundaryPoint on EDGE with a lower index
[out]bp2- BoundaryPoint on EDGE with a higher index
Returns
bool - true if the BoundaryPoint's found

References draftguitools.gui_annotationstyleeditor::param.

◆ getBoundaryPoints() [3/3]

bool SMESH_MAT2d::Branch::getBoundaryPoints ( std::size_t  iMAEdge,
double  maEdgeParam,
BoundaryPoint bp1,
BoundaryPoint bp2 
) const

Returns points on two EDGEs, equidistant from a given point of this Branch.

Parameters
[in]iMAEdge- index of a MA edge within this Branch
[in]maEdgeParam- [0;1] normalized param on the iMAEdge
[out]bp1- BoundaryPoint on EDGE with a lower index
[out]bp2- BoundaryPoint on EDGE with a higher index
Returns
bool - true if the BoundaryPoint's found

◆ getEnd()

const BranchEnd * SMESH_MAT2d::Branch::getEnd ( bool  the2nd) const

◆ getGeomEdge()

std::size_t SMESH_MAT2d::Branch::getGeomEdge ( const TVDEdge maEdge)
static

◆ getGeomEdges()

void SMESH_MAT2d::Branch::getGeomEdges ( std::vector< std::size_t > &  edgeIDs1,
std::vector< std::size_t > &  edgeIDs2 
) const

Return indices of EDGEs equidistant from this branch.

◆ getOppositeGeomEdges()

void SMESH_MAT2d::Branch::getOppositeGeomEdges ( std::vector< std::size_t > &  edgeIDs1,
std::vector< std::size_t > &  edgeIDs2,
std::vector< BranchPoint > &  divPoints 
) const

Return indices of opposite parts of EDGEs equidistant from this branch.

Parameters
[out]edgeIDs1- EDGE index opposite to the edgeIDs2[i]-th EDGE
[out]edgeIDs2- EDGE index opposite to the edgeIDs1[i]-th EDGE
[out]divPoints- BranchPoint's located between two successive unique pairs of EDGE indices. A divPoints[i] can separate e.g. two following pairs of EDGE indices < 0, 2 > and < 0, 1 >. Number of divPoints is one less than number of edgeIDs

◆ getParameter()

bool SMESH_MAT2d::Branch::getParameter ( const BranchPoint p,
double &  u 
) const

Return a parameter of a BranchPoint normalized within this Branch.

◆ getPoint()

◆ getPoints()

void SMESH_MAT2d::Branch::getPoints ( std::vector< gp_XY > &  points,
const double  scale[2] 
) const

Returns MA points.

Parameters
[out]points- the 2d points
[in]scale- the scale that was used to scale the 2d space of MA

Referenced by SMESH_MAT2d::MedialAxis::getPoints(), and SMESH_MAT2d::MedialAxis::make3DCurve().

◆ hasEndOfType()

bool SMESH_MAT2d::Branch::hasEndOfType ( BranchEndType  type) const

Check type of both ends.

◆ init()

void SMESH_MAT2d::Branch::init ( std::vector< const TVDEdge * > &  maEdges,
const Boundary boundary,
std::map< const TVDVertex *, BranchEndType endType 
)

Copy points of an EDGE.

Referenced by DocumentObject.DocumentObject::onChanged().

◆ isRemoved()

bool SMESH_MAT2d::Branch::isRemoved ( ) const

◆ nbEdges()

std::size_t SMESH_MAT2d::Branch::nbEdges ( ) const

◆ setBndSegment()

void SMESH_MAT2d::Branch::setBndSegment ( std::size_t  segIndex,
const TVDEdge maEdge 
)
static

◆ setBranchesToEnds()

void SMESH_MAT2d::Branch::setBranchesToEnds ( const std::vector< Branch > &  branches)

fills BranchEnd::_branches of its ends

◆ setGeomEdge()

void SMESH_MAT2d::Branch::setGeomEdge ( std::size_t  geomIndex,
const TVDEdge maEdge 
)
static

Store data of boundary segments in TVDEdge.

◆ setRemoved()

void SMESH_MAT2d::Branch::setRemoved ( const BranchPoint proxyPoint)

Sets a proxy point for a removed branch.

Parameters
[in]proxyPoint- a point of another branch to which all points of this branch are mapped

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