Represents a side of a quasi quadrilateral face. More...
#include <StdMeshers_FaceSide.hxx>
Public Types | |
enum | { ALL_EDGES = -1, LAST_EDGE = -1 } |
Public Member Functions | |
StdMeshers_FaceSide (const TopoDS_Face &theFace, const TopoDS_Edge &theEdge, SMESH_Mesh *theMesh, const bool theIsForward, const bool theIgnoreMediumNodes, SMESH_MesherHelper *theFaceHelper=NULL, SMESH_ProxyMesh::Ptr theProxyMesh=SMESH_ProxyMesh::Ptr()) | |
Wrap one edge. More... | |
StdMeshers_FaceSide (const TopoDS_Face &theFace, std::list< TopoDS_Edge > &theEdges, SMESH_Mesh *theMesh, const bool theIsForward, const bool theIgnoreMediumNodes, SMESH_MesherHelper *theFaceHelper=NULL, SMESH_ProxyMesh::Ptr theProxyMesh=SMESH_ProxyMesh::Ptr()) | |
Wrap several edges. More... | |
StdMeshers_FaceSide (const StdMeshers_FaceSide *theSide, const SMDS_MeshNode *theNode, const gp_Pnt2d *thePnt2d1, const gp_Pnt2d *thePnt2d2=NULL, const Handle(Geom2d_Curve)&theC2d=NULL, const double theUFirst=0., const double theULast=1.) | |
Simulate a side from a vertex using data from other FaceSide. More... | |
StdMeshers_FaceSide (UVPtStructVec &theSideNodes, const TopoDS_Face &theFace=TopoDS_Face(), const TopoDS_Edge &theEdge=TopoDS_Edge(), SMESH_Mesh *theMesh=0) | |
Create a side from an UVPtStructVec. More... | |
~StdMeshers_FaceSide () | |
Destructor. More... | |
void | Reverse () |
Change orientation of side geometry. More... | |
void | SetIgnoreMediumNodes (bool toIgnore) |
Make ignore medium nodes. More... | |
int | NbPoints (const bool update=false) const |
Return nb nodes on edges and vertices (+1 to be == GetUVPtStruct().size() ). More... | |
int | NbSegments (const bool update=false) const |
Return nb edges Call it with update == true if mesh of this side can be recomputed since creation of this side. More... | |
SMESH_Mesh * | GetMesh () const |
Return mesh. More... | |
bool | MissVertexNode () const |
Return true if there are vertices without nodes. More... | |
const UVPtStructVec & | GetUVPtStruct (bool isXConst=0, double constValue=0) const |
Return detailed data on nodes. More... | |
const UVPtStructVec & | SimulateUVPtStruct (int nbSeg, bool isXConst=0, double constValue=0) const |
Simulates detailed data on nodes. More... | |
std::vector< const SMDS_MeshNode * > | GetOrderedNodes (int iE=ALL_EDGES) const |
Return nodes in the order they encounter while walking along the while side or a specified EDGE. More... | |
bool | GetEdgeNodes (const size_t i, std::vector< const SMDS_MeshNode * > &nodes, bool inlude1stVertex=true, bool inludeLastVertex=true) const |
Return nodes of the i-th EDGE. More... | |
const SMDS_MeshNode * | VertexNode (std::size_t i, bool *isMoved=0) const |
Return a node from the i-th VERTEX (count starts from zero) Nodes moved to other geometry by MergeNodes() are also returned. More... | |
double | Parameter (double U, TopoDS_Edge &edge) const |
Return an edge and parameter on the edge by a normalized parameter. More... | |
double | Parameter (double U, int &edgeID) const |
Return an edge ID and parameter on the edge by a normalized parameter. More... | |
gp_Pnt2d | Value2d (double U) const |
Return UV by normalized parameter. More... | |
gp_Pnt | Value3d (double U) const |
Return XYZ by normalized parameter. More... | |
Adaptor2d_Curve2d * | GetCurve2d () const |
Creates a Adaptor2d_Curve2d to be used in SMESH_Block. More... | |
BRepAdaptor_CompCurve * | GetCurve3d () const |
Creates a fully functional Adaptor_Curve. More... | |
int | NbEdges () const |
Return nb of wrapped edges. More... | |
const TopoDS_Edge & | Edge (int i) const |
Return i-th edge (count starts from zero) More... | |
const std::vector< TopoDS_Edge > & | Edges () const |
Return all edges. More... | |
const TopoDS_Face & | Face () const |
Return the FACE. More... | |
TopoDS_Vertex | FirstVertex (int i=0) const |
Return 1st vertex of the i-th edge (count starts from zero) More... | |
TopoDS_Vertex | LastVertex (int i=LAST_EDGE) const |
Return last vertex of the i-th edge (count starts from zero) More... | |
bool | IsClosed () const |
Return true if the chain of EDGEs is closed. More... | |
double | Length () const |
Return side length. More... | |
int | EdgeIndex (double U) const |
Return edge index corresponding to normalized parameter. More... | |
void | dump (const char *msg=0) const |
Show side features. More... | |
int | EdgeID (int i) const |
Return ID of i-th wrapped edge (count starts from zero) More... | |
Handle (Geom2d_Curve) Curve2d(int i) const | |
Return p-curve of i-th wrapped edge (count starts from zero) More... | |
double | FirstParameter (int i) const |
Return first normalized parameter of the i-th edge (count starts from zero) More... | |
double | LastParameter (int i) const |
Return last normalized parameter of the i-th edge (count starts from zero) More... | |
double | FirstU (int i) const |
Return first parameter of the i-th edge (count starts from zero). More... | |
double | LastU (int i) const |
Return last parameter of the i-th edge (count starts from zero). More... | |
double | EdgeLength (int i) const |
Return length of i-th wrapped edge (count starts from zero) More... | |
bool | IsReversed (int i) const |
Return orientation of i-th wrapped edge (count starts from zero) More... | |
SMESH_MesherHelper * | FaceHelper () const |
Return a helper initialized with the FACE. More... | |
Static Public Member Functions | |
static StdMeshers_FaceSidePtr | New (const TopoDS_Face &Face, const TopoDS_Edge &Edge, SMESH_Mesh *Mesh, const bool IsForward, const bool IgnoreMediumNodes, SMESH_MesherHelper *FaceHelper=NULL, SMESH_ProxyMesh::Ptr ProxyMesh=SMESH_ProxyMesh::Ptr()) |
static StdMeshers_FaceSidePtr | New (const TopoDS_Face &Face, std::list< TopoDS_Edge > &Edges, SMESH_Mesh *Mesh, const bool IsForward, const bool IgnoreMediumNodes, SMESH_MesherHelper *FaceHelper=NULL, SMESH_ProxyMesh::Ptr ProxyMesh=SMESH_ProxyMesh::Ptr()) |
static StdMeshers_FaceSidePtr | New (const StdMeshers_FaceSide *Side, const SMDS_MeshNode *Node, const gp_Pnt2d *Pnt2d1, const gp_Pnt2d *Pnt2d2=NULL, const Handle(Geom2d_Curve)&C2d=NULL, const double UFirst=0., const double ULast=1.) |
static StdMeshers_FaceSidePtr | New (UVPtStructVec &theSideNodes, const TopoDS_Face &theFace=TopoDS_Face()) |
static TSideVector | GetFaceWires (const TopoDS_Face &theFace, SMESH_Mesh &theMesh, const bool theIgnoreMediumNodes, TError &theError, SMESH_MesherHelper *theFaceHelper=NULL, SMESH_ProxyMesh::Ptr theProxyMesh=SMESH_ProxyMesh::Ptr(), const bool theCheckVertexNodes=true) |
Return wires of a face as StdMeshers_FaceSide's. More... | |
Protected Member Functions | |
void | reverseProxySubmesh (const TopoDS_Edge &E) |
Reverse UVPtStructVec if a proxy sub-mesh of E. More... | |
Protected Attributes | |
TopoDS_Face | myFace |
std::vector< uvPtStruct > | myPoints |
std::vector< uvPtStruct > | myFalsePoints |
std::vector< TopoDS_Edge > | myEdge |
std::vector< int > | myEdgeID |
std::vector< Handle(Geom2d_Curve)> | myC2d |
std::vector< GeomAdaptor_Curve > | myC3dAdaptor |
std::vector< double > | myFirst |
std::vector< double > | myLast |
std::vector< double > | myNormPar |
std::vector< double > | myEdgeLength |
std::vector< int > | myIsUniform |
double | myLength |
int | myNbPonits |
int | myNbSegments |
SMESH_ProxyMesh::Ptr | myProxyMesh |
bool | myMissingVertexNodes |
bool | myIgnoreMediumNodes |
gp_Pnt2d | myDefaultPnt2d |
SMESH_MesherHelper * | myHelper |
Represents a side of a quasi quadrilateral face.
It can be composed of several edges. Gives access to geometry and 1D mesh of a side.
StdMeshers_FaceSide::StdMeshers_FaceSide | ( | const TopoDS_Face & | theFace, |
const TopoDS_Edge & | theEdge, | ||
SMESH_Mesh * | theMesh, | ||
const bool | theIsForward, | ||
const bool | theIgnoreMediumNodes, | ||
SMESH_MesherHelper * | theFaceHelper = NULL , |
||
SMESH_ProxyMesh::Ptr | theProxyMesh = SMESH_ProxyMesh::Ptr() |
||
) |
Wrap one edge.
Constructor of a side of one edge.
theFace | - the face |
theEdge | - the edge |
References myHelper.
StdMeshers_FaceSide::StdMeshers_FaceSide | ( | const TopoDS_Face & | theFace, |
std::list< TopoDS_Edge > & | theEdges, | ||
SMESH_Mesh * | theMesh, | ||
const bool | theIsForward, | ||
const bool | theIgnoreMediumNodes, | ||
SMESH_MesherHelper * | theFaceHelper = NULL , |
||
SMESH_ProxyMesh::Ptr | theProxyMesh = SMESH_ProxyMesh::Ptr() |
||
) |
Wrap several edges.
Constructor of a side of several edges.
Edges must be properly ordered and oriented.
References SMESH_MesherHelper::CopySubShapeInfo(), SMESH_Algo::EdgeLength(), SMESH_MesherHelper::GetSubShape(), Handle(), SMESH_MesherHelper::IthVertex(), and SMESHDS_Mesh::ShapeToIndex().
StdMeshers_FaceSide::StdMeshers_FaceSide | ( | const StdMeshers_FaceSide * | theSide, |
const SMDS_MeshNode * | theNode, | ||
const gp_Pnt2d * | thePnt2d1, | ||
const gp_Pnt2d * | thePnt2d2 = NULL , |
||
const Handle(Geom2d_Curve)& | theC2d = NULL , |
||
const double | theUFirst = 0. , |
||
const double | theULast = 1. |
||
) |
Simulate a side from a vertex using data from other FaceSide.
Constructor of a side for vertex using data from other FaceSide.
References GetUVPtStruct(), myNbSegments, myProxyMesh, and SMDS_MeshNode::X().
StdMeshers_FaceSide::StdMeshers_FaceSide | ( | UVPtStructVec & | theSideNodes, |
const TopoDS_Face & | theFace = TopoDS_Face() , |
||
const TopoDS_Edge & | theEdge = TopoDS_Edge() , |
||
SMESH_Mesh * | theMesh = 0 |
||
) |
Create a side from an UVPtStructVec.
References Handle().
StdMeshers_FaceSide::~StdMeshers_FaceSide | ( | ) |
Destructor.
void StdMeshers_FaceSide::dump | ( | const char * | msg = 0 | ) | const |
Show side features.
References MESSAGE, and MED::Print().
const TopoDS_Edge& StdMeshers_FaceSide::Edge | ( | int | i | ) | const |
Return i-th edge (count starts from zero)
Referenced by VISCOUS_2D::_ViscousBuilder2D::improve(), VISCOUS_2D::_ViscousBuilder2D::makePolyLines(), and VISCOUS_2D::_ViscousBuilder2D::shrink().
Return ID of i-th wrapped edge (count starts from zero)
Referenced by VISCOUS_2D::_ViscousBuilder2D::refine(), StdMeshers_ViscousLayers2D::SetProxyMeshOfEdge(), and VISCOUS_2D::_ViscousBuilder2D::shrink().
int StdMeshers_FaceSide::EdgeIndex | ( | double | U | ) | const |
Return edge index corresponding to normalized parameter.
U | - the parameter |
int | - index |
double StdMeshers_FaceSide::EdgeLength | ( | int | i | ) | const |
Return length of i-th wrapped edge (count starts from zero)
Referenced by VISCOUS_2D::_ViscousBuilder2D::shrink().
const std::vector<TopoDS_Edge>& StdMeshers_FaceSide::Edges | ( | ) | const |
Return all edges.
const TopoDS_Face& StdMeshers_FaceSide::Face | ( | ) | const |
Return the FACE.
Referenced by StdMeshers_ViscousLayers2D::SetProxyMeshOfEdge().
SMESH_MesherHelper * StdMeshers_FaceSide::FaceHelper | ( | ) | const |
Return a helper initialized with the FACE.
References me, myHelper, and SMESH_MesherHelper::SetSubShape().
double StdMeshers_FaceSide::FirstParameter | ( | int | i | ) | const |
Return first normalized parameter of the i-th edge (count starts from zero)
Return first normalized parameter of the i-th edge.
Referenced by VISCOUS_2D::_ViscousBuilder2D::refine().
double StdMeshers_FaceSide::FirstU | ( | int | i | ) | const |
Return first parameter of the i-th edge (count starts from zero).
Return first parameter of the i-th edge.
EDGE orientation is taken into account
Referenced by VISCOUS_2D::_ViscousBuilder2D::refine(), and VISCOUS_2D::_ViscousBuilder2D::shrink().
TopoDS_Vertex StdMeshers_FaceSide::FirstVertex | ( | int | i = 0 | ) | const |
Return 1st vertex of the i-th edge (count starts from zero)
Return 1st vertex of the i-the edge.
Referenced by StdMeshers_CompositeSegment_1D::Compute(), VISCOUS_2D::_ViscousBuilder2D::refine(), and VISCOUS_2D::_ViscousBuilder2D::shrink().
Adaptor2d_Curve2d * StdMeshers_FaceSide::GetCurve2d | ( | ) | const |
Creates a Adaptor2d_Curve2d to be used in SMESH_Block.
BRepAdaptor_CompCurve * StdMeshers_FaceSide::GetCurve3d | ( | ) | const |
Creates a fully functional Adaptor_Curve.
Referenced by StdMeshers_CompositeSegment_1D::Compute().
bool StdMeshers_FaceSide::GetEdgeNodes | ( | const size_t | i, |
std::vector< const SMDS_MeshNode * > & | nodes, | ||
bool | inlude1stVertex = true , |
||
bool | inludeLastVertex = true |
||
) | const |
Return nodes of the i-th EDGE.
Return (unsorted) nodes of the i-th EDGE.
Nodes moved to other geometry by MergeNodes() are also returned.
bool | - is OK |
References SMESHDS_SubMesh::GetElements(), SMDS_MeshElement::GetNode(), SMESHDS_SubMesh::GetNodes(), SMDS_MeshElement::GetType(), SMESH_MeshEditor::IsMedium(), SMESHDS_Mesh::MeshElements(), SMESHDS_SubMesh::NbElements(), SMESHDS_SubMesh::NbNodes(), and SMDSAbs_Edge.
|
static |
Return wires of a face as StdMeshers_FaceSide's.
References COMPERR_BAD_INPUT_MESH, SMESH_MesherHelper::CopySubShapeInfo(), SMESH_Block::GetOrderedEdges(), SMESH_MesherHelper::GetSubShape(), and SMESH_Algo::VertexNode().
Referenced by StdMeshers_Quadrangle_2D::check(), StdMeshers_ViscousLayers2D::CheckHypothesis(), StdMeshers_Projection_1D2D::Compute(), StdMeshers_PolygonPerFace_2D::Compute(), StdMeshers_MEFISTO_2D::Compute(), VISCOUS_2D::_ViscousBuilder2D::Compute(), VISCOUS_3D::getConcaveVertices(), and VISCOUS_2D::_ViscousBuilder2D::toShrinkForAdjacent().
SMESH_Mesh* StdMeshers_FaceSide::GetMesh | ( | ) | const |
Return mesh.
Referenced by StdMeshers_ViscousLayers2D::SetProxyMeshOfEdge().
std::vector< const SMDS_MeshNode * > StdMeshers_FaceSide::GetOrderedNodes | ( | int | iE = ALL_EDGES | ) | const |
Return nodes in the order they encounter while walking along the while side or a specified EDGE.
For a closed side, the 1st point repeats at end.
iE | - index of the EDGE. Default is "all EDGEs". |
References SMESH::GetEdgeNodes(), SMDS_MeshElement::getshapeId(), and SMESH_ProxyMesh::SubMesh::GetUVPtStructVec().
const std::vector< UVPtStruct > & StdMeshers_FaceSide::GetUVPtStruct | ( | bool | isXConst = 0 , |
double | constValue = 0 |
||
) | const |
Return detailed data on nodes.
isXConst | - true if normalized parameter X is constant |
constValue | - constant parameter value |
Missing nodes are allowed only on internal vertices. For a closed side, the 1st point repeats at end
References SMESH::GetEdgeNodes(), SMDS_MeshNode::GetPosition(), SMDS_MeshElement::getshapeId(), SMDS_EdgePosition::GetUParameter(), me, myC3dAdaptor, myPoints, uvPtStruct::node, uvPtStruct::normParam, uvPtStruct::param, reverse(), uvPtStruct::u, uvPtStruct::v, uvPtStruct::x, and uvPtStruct::y.
Referenced by VISCOUS_2D::_ViscousBuilder2D::adjustCommonEdge(), VISCOUS_2D::_ViscousBuilder2D::refine(), StdMeshers_ViscousLayers2D::SetProxyMeshOfEdge(), VISCOUS_2D::_ViscousBuilder2D::shrink(), and StdMeshers_FaceSide().
StdMeshers_FaceSide::Handle | ( | Geom2d_Curve | ) | const |
Return p-curve of i-th wrapped edge (count starts from zero)
bool StdMeshers_FaceSide::IsClosed | ( | ) | const |
Return true
if the chain of EDGEs is closed.
Return orientation of i-th wrapped edge (count starts from zero)
double StdMeshers_FaceSide::LastParameter | ( | int | i | ) | const |
Return last normalized parameter of the i-th edge (count starts from zero)
Return ast normalized parameter of the i-th edge.
Referenced by VISCOUS_2D::_ViscousBuilder2D::refine().
double StdMeshers_FaceSide::LastU | ( | int | i | ) | const |
Return last parameter of the i-th edge (count starts from zero).
Return last parameter of the i-th edge.
EDGE orientation is taken into account
Referenced by VISCOUS_2D::_ViscousBuilder2D::refine(), and VISCOUS_2D::_ViscousBuilder2D::shrink().
Return last vertex of the i-th edge (count starts from zero)
Return last vertex of the i-the edge.
Referenced by StdMeshers_CompositeSegment_1D::Compute(), VISCOUS_2D::_ViscousBuilder2D::refine(), and VISCOUS_2D::_ViscousBuilder2D::shrink().
double StdMeshers_FaceSide::Length | ( | ) | const |
Return side length.
Referenced by StdMeshers_CompositeSegment_1D::Compute().
bool StdMeshers_FaceSide::MissVertexNode | ( | ) | const |
Return true if there are vertices without nodes.
int StdMeshers_FaceSide::NbEdges | ( | ) | const |
Return nb of wrapped edges.
Referenced by StdMeshers_CompositeSegment_1D::Compute(), and StdMeshers_Quadrangle_2D::getCorners().
Return nb nodes on edges and vertices (+1 to be == GetUVPtStruct().size() ).
Call it with update == true if mesh of this side can be recomputed since creation of this side
References Edge, SMESH::GetEdgeNodes(), SMESH_MesherHelper::IsDegenShape(), SMESH_MesherHelper::IsRealSeam(), me, myMissingVertexNodes, myNbPonits, and myNbSegments.
Referenced by StdMeshers_Quadrangle_2D::getCorners().
Return nb edges Call it with update == true if mesh of this side can be recomputed since creation of this side.
Referenced by StdMeshers_Quadrangle_2D::getCorners().
|
static |
Referenced by StdMeshers_Quadrangle_2D::CheckNbEdges(), StdMeshers_RadialQuadrangle_1D2D::Compute(), StdMeshers_Quadrangle_2D::computeQuadPref(), StdMeshers_RadialQuadrangle_1D2D::Evaluate(), StdMeshers_Quadrangle_2D::splitQuad(), StdMeshers_Quadrangle_2D::updateDegenUV(), and StdMeshers_Quadrangle_2D::updateSideUV().
|
static |
|
static |
|
static |
double StdMeshers_FaceSide::Parameter | ( | double | U, |
TopoDS_Edge & | edge | ||
) | const |
Return an edge and parameter on the edge by a normalized parameter.
U | - normalized parameter |
double | - pameter on a curve \ warning The returned parameter can be inaccurate if the edge is non-uniformly parametrized. Use Value2d() to get a precise point on the edge |
double StdMeshers_FaceSide::Parameter | ( | double | U, |
int & | edgeID | ||
) | const |
Return an edge ID and parameter on the edge by a normalized parameter.
U | - normalized parameter |
double | - pameter on a curve \ warning The returned parameter can be inaccurate if the edge is non-uniformly parametrized. Use Value2d() to get a precise point on the edge |
void StdMeshers_FaceSide::Reverse | ( | ) |
Change orientation of side geometry.
References Handle(), uvPtStruct::normParam, reverse(), uvPtStruct::x, and uvPtStruct::y.
|
protected |
Reverse UVPtStructVec if a proxy sub-mesh of E.
References uvPtStruct::normParam, reverse(), uvPtStruct::x, and uvPtStruct::y.
void StdMeshers_FaceSide::SetIgnoreMediumNodes | ( | bool | toIgnore | ) |
Make ignore medium nodes.
const vector< UVPtStruct > & StdMeshers_FaceSide::SimulateUVPtStruct | ( | int | nbSeg, |
bool | isXConst = 0 , |
||
double | constValue = 0 |
||
) | const |
Simulates detailed data on nodes.
Falsificate info on nodes.
isXConst | - true if normalized parameter X is constant |
constValue | - constant parameter value |
nbSeg | - nb of segments on the side |
UVPtStruct* | - array of data structures |
References uvPtStruct::node, uvPtStruct::normParam, uvPtStruct::param, uvPtStruct::u, uvPtStruct::v, uvPtStruct::x, and uvPtStruct::y.
gp_Pnt2d StdMeshers_FaceSide::Value2d | ( | double | U | ) | const |
Return UV by normalized parameter.
Return 2D point by normalized parameter.
U | - normalized parameter value |
gp_Pnt2d | - point |
gp_Pnt StdMeshers_FaceSide::Value3d | ( | double | U | ) | const |
Return XYZ by normalized parameter.
U | - normalized parameter value |
gp_Pnt | - point |
const SMDS_MeshNode * StdMeshers_FaceSide::VertexNode | ( | std::size_t | i, |
bool * | isMoved = 0 |
||
) | const |
Return a node from the i-th VERTEX (count starts from zero) Nodes moved to other geometry by MergeNodes() are also returned.
[in] | i | - the VERTEX index |
[out] | isMoved | - returns true if the found node is moved by MergeNodes() |
References SMDS_Position::GetDim(), SMDS_MeshNode::GetPosition(), SMESH_MesherHelper::GetSubShapeByNode(), SMESH_MesherHelper::IsSubShape(), SMESH_Algo::VertexNode(), and SMESH_MesherHelper::WrapIndex().
Referenced by StdMeshers_Quadrangle_2D::getCorners().
|
protected |
|
protected |
Referenced by GetUVPtStruct().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by FaceHelper(), and StdMeshers_FaceSide().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by NbPoints().
|
protected |
Referenced by NbPoints().
|
protected |
Referenced by NbPoints(), and StdMeshers_FaceSide().
|
protected |
|
protected |
Referenced by GetUVPtStruct().
|
protected |
Referenced by StdMeshers_FaceSide().