Branch is a set of MA edges enclosed between branch points and/or MA ends. More...
#include <SMESH_MAT2d.hxx>
Public Member Functions | |
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... | |
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 | getParameter (const BranchPoint &p, double &u) const |
Return a parameter of a BranchPoint normalized within this Branch. More... | |
std::size_t | nbEdges () const |
const BranchEnd * | getEnd (bool the2nd) const |
bool | hasEndOfType (BranchEndType type) const |
Check type of both ends. More... | |
void | getPoints (std::vector< gp_XY > &points, const double scale[2]) const |
Returns MA points. More... | |
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 | isRemoved () const |
void | init (std::vector< const TVDEdge * > &maEdges, const Boundary *boundary, std::map< const TVDVertex *, BranchEndType > &endType) |
Copy points of an EDGE. More... | |
void | setBranchesToEnds (const std::vector< Branch > &branches) |
fills BranchEnd::_branches of its ends More... | |
BranchPoint | getPoint (const TVDVertex *vertex) const |
returns a BranchPoint corresponding to a TVDVertex More... | |
void | setRemoved (const BranchPoint &proxyPoint) |
Sets a proxy point for a removed branch. More... | |
Static Public Member Functions | |
static void | setGeomEdge (std::size_t geomIndex, const TVDEdge *maEdge) |
Store data of boundary segments in TVDEdge. More... | |
static std::size_t | getGeomEdge (const TVDEdge *maEdge) |
static void | setBndSegment (std::size_t segIndex, const TVDEdge *maEdge) |
static std::size_t | getBndSegment (const TVDEdge *maEdge) |
Private Member Functions | |
bool | addDivPntForConcaVertex (std::vector< std::size_t > &edgeIDs1, std::vector< std::size_t > &edgeIDs2, std::vector< BranchPoint > &divPoints, const std::vector< const TVDEdge * > &maEdges, const std::vector< const TVDEdge * > &maEdgesTwin, int &i) const |
Looks for a BranchPoint position around a concave VERTEX. More... | |
Private Attributes | |
std::vector< const TVDEdge * > | _maEdges |
std::vector< double > | _params |
const Boundary * | _boundary |
BranchEnd | _endPoint1 |
BranchEnd | _endPoint2 |
BranchPoint | _proxyPoint |
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
|
private |
Looks for a BranchPoint position around a concave VERTEX.
References SMESH_MAT2d::BranchPoint::_branch, SMESH_MAT2d::BranchPoint::_edgeParam, and SMESH_MAT2d::BranchPoint::_iEdge.
|
static |
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.
[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 |
References Min().
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.
[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 |
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.
References SMESH_MAT2d::BranchPoint::_branch, SMESH_MAT2d::BranchPoint::_edgeParam, and SMESH_MAT2d::BranchPoint::_iEdge.
|
static |
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.
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.
[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 |
References SMESH_MAT2d::BranchPoint::_branch, SMESH_MAT2d::BranchPoint::_edgeParam, SMESH_MAT2d::BranchPoint::_iEdge, and Abs().
bool SMESH_MAT2d::Branch::getParameter | ( | const BranchPoint & | p, |
double & | u | ||
) | const |
Return a parameter of a BranchPoint normalized within this Branch.
References SMESH_MAT2d::BranchPoint::_branch, SMESH_MAT2d::BranchPoint::_edgeParam, SMESH_MAT2d::BranchPoint::_iEdge, and getParameter().
Referenced by getParameter().
SMESH_MAT2d::BranchPoint SMESH_MAT2d::Branch::getPoint | ( | const TVDVertex * | vertex | ) | const |
returns a BranchPoint corresponding to a TVDVertex
References SMESH_MAT2d::BranchPoint::_branch, SMESH_MAT2d::BranchPoint::_edgeParam, and SMESH_MAT2d::BranchPoint::_iEdge.
void SMESH_MAT2d::Branch::getPoints | ( | std::vector< gp_XY > & | points, |
const double | scale[2] | ||
) | const |
Returns MA points.
[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().
bool SMESH_MAT2d::Branch::hasEndOfType | ( | BranchEndType | type | ) | const |
Check type of both ends.
void SMESH_MAT2d::Branch::init | ( | std::vector< const TVDEdge * > & | maEdges, |
const Boundary * | boundary, | ||
std::map< const TVDVertex *, BranchEndType > & | endType | ||
) |
Copy points of an EDGE.
References if().
bool SMESH_MAT2d::Branch::isRemoved | ( | ) | const |
std::size_t SMESH_MAT2d::Branch::nbEdges | ( | ) | const |
|
static |
void SMESH_MAT2d::Branch::setBranchesToEnds | ( | const std::vector< Branch > & | branches | ) |
fills BranchEnd::_branches of its ends
|
static |
Store data of boundary segments in TVDEdge.
void SMESH_MAT2d::Branch::setRemoved | ( | const BranchPoint & | proxyPoint | ) |
Sets a proxy point for a removed branch.
[in] | proxyPoint | - a point of another branch to which all points of this branch are mapped |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |