Medial axis (MA) is defined as the loci of centres of locally maximal balls inside 2D representation of a face. More...
#include <SMESH_MAT2d.hxx>
Public Member Functions | |
MedialAxis (const TopoDS_Face &face, const std::vector< TopoDS_Edge > &edges, const double minSegLen, const bool ignoreCorners=false) | |
MedialAxis constructor. More... | |
std::size_t | nbBranches () const |
const Branch * | getBranch (size_t i) const |
Returns the i-th branch. More... | |
const std::vector< const BranchEnd * > & | getBranchPoints () const |
const Boundary & | getBoundary () const |
void | getPoints (const Branch *branch, std::vector< gp_XY > &points) const |
Return UVs of ends of MA edges of a branch. More... | |
Adaptor3d_Curve * | make3DCurve (const Branch &branch) const |
Creates a 3d curve corresponding to a Branch. More... | |
Private Attributes | |
TopoDS_Face | _face |
TVD | _vd |
std::vector< Branch > | _branch |
std::size_t | _nbBranches |
std::vector< const BranchEnd * > | _branchPnt |
Boundary | _boundary |
double | _scale [2] |
Medial axis (MA) is defined as the loci of centres of locally maximal balls inside 2D representation of a face.
This class implements a piecewise approximation of MA.
SMESH_MAT2d::MedialAxis::MedialAxis | ( | const TopoDS_Face & | face, |
const std::vector< TopoDS_Edge > & | edges, | ||
const double | minSegLen, | ||
const bool | ignoreCorners = false |
||
) |
MedialAxis constructor.
[in] | face | - a face to create MA for |
[in] | edges | - edges of the face (possibly not all) on the order they encounter in the face boundary. |
[in] | minSegLen | - minimal length of a mesh segment used to discretize the edges. It is used to define precision of MA approximation |
References _boundary, _branch, _branchPnt, _nbBranches, _scale, _vd, and inSegmentsToFile.
const Boundary& SMESH_MAT2d::MedialAxis::getBoundary | ( | ) | const |
const SMESH_MAT2d::Branch * SMESH_MAT2d::MedialAxis::getBranch | ( | size_t | i | ) | const |
Returns the i-th branch.
const std::vector< const BranchEnd* >& SMESH_MAT2d::MedialAxis::getBranchPoints | ( | ) | const |
void SMESH_MAT2d::MedialAxis::getPoints | ( | const Branch * | branch, |
std::vector< gp_XY > & | points | ||
) | const |
Return UVs of ends of MA edges of a branch.
References SMESH_MAT2d::Branch::getPoints().
Adaptor3d_Curve * SMESH_MAT2d::MedialAxis::make3DCurve | ( | const Branch & | branch | ) | const |
Creates a 3d curve corresponding to a Branch.
[in] | branch | - the Branch |
References SMESH_MAT2d::Branch::getPoints(), and Handle().
std::size_t SMESH_MAT2d::MedialAxis::nbBranches | ( | ) | const |
|
private |
Referenced by MedialAxis().
|
private |
Referenced by MedialAxis().
|
private |
Referenced by MedialAxis().
|
private |
|
private |
Referenced by MedialAxis().
|
private |
Referenced by MedialAxis().
|
private |
Referenced by MedialAxis().