StdMeshers_FaceSide Class Reference

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. More...

#include <StdMeshers_FaceSide.hxx>

Public Member Functions

void dump (const char *msg=0) const
 Show side features. More...
 
const TopoDS_Edge & Edge (int i) const
 Return i-th edge (count starts from zero) More...
 
int EdgeID (int i) const
 Return ID of i-th wrapped edge (count starts from zero) More...
 
int EdgeIndex (double U) const
 Return edge index corresponding to normalized parameter. More...
 
double EdgeLength (int i) const
 Return length of i-th wrapped edge (count starts from zero) More...
 
const std::vector< TopoDS_Edge > & Edges () const
 Return all edges. More...
 
double FirstParameter (int i) const
 Return first 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). EDGE orientation is taken into account. More...
 
TopoDS_Vertex FirstVertex (int i=0) const
 Return 1st vertex of the i-th edge (count starts from zero) More...
 
Adaptor2d_Curve2dGetCurve2d () const
 Creates a Adaptor2d_Curve2d to be used in SMESH_Block. More...
 
BRepAdaptor_CompCurve * GetCurve3d () const
 Creates a fully functional Adaptor_Curve. 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. Nodes moved to other geometry by MergeNodes() are also returned. More...
 
SMESH_MeshGetMesh () const
 Return mesh. More...
 
std::vector< const SMDS_MeshNode * > GetOrderedNodes (int iE=-1) 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. More...
 
const UVPtStructVec & GetUVPtStruct (bool isXConst=0, double constValue=0) const
 Return detailed data on nodes. More...
 
 Handle (Geom2d_Curve) Curve2d(int i) const
 Return p-curve of i-th wrapped edge (count starts from zero) More...
 
bool IsClosed () const
 Return true if the chain of EDGEs is closed. More...
 
bool IsReversed (int i) const
 Return orientation of i-th wrapped 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 LastU (int i) const
 Return last parameter of the i-th edge (count starts from zero). EDGE orientation is taken into account. More...
 
TopoDS_Vertex LastVertex (int i=-1) const
 Return last vertex of the i-th edge (count starts from zero) More...
 
double Length () const
 Return side length. More...
 
bool MissVertexNode () const
 Return true if there are vertices without nodes. More...
 
int NbEdges () const
 Return nb of wrapped edges. More...
 
int NbPoints (const bool update=false) const
 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. 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...
 
double Parameter (double U, TopoDS_Edge &edge) const
 Return edge and parameter on edge by normalized parameter. More...
 
void Reverse ()
 Change orientation of side geometry. More...
 
void SetIgnoreMediumNodes (bool toIgnore)
 Make ignore medium nodes. More...
 
const UVPtStructVec & SimulateUVPtStruct (int nbSeg, bool isXConst=0, double constValue=0) const
 Simulates detailed data on nodes. 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 (const TopoDS_Face &theFace, const TopoDS_Edge &theEdge, SMESH_Mesh *theMesh, const bool theIsForward, const bool theIgnoreMediumNodes, 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_ProxyMesh::Ptr theProxyMesh=SMESH_ProxyMesh::Ptr())
 Wrap several edges. Edges must be properly ordered and oriented. More...
 
 StdMeshers_FaceSide (UVPtStructVec &theSideNodes, const TopoDS_Face &theFace=TopoDS_Face())
 Create a side from an UVPtStructVec. 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...
 
const SMDS_MeshNodeVertexNode (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...
 

Static Public Member Functions

static TSideVector GetFaceWires (const TopoDS_Face &theFace, SMESH_Mesh &theMesh, const bool theIgnoreMediumNodes, TError &theError, SMESH_ProxyMesh::Ptr theProxyMesh=SMESH_ProxyMesh::Ptr(), const bool theCheckVertexNodes=true)
 Return wires of a face as StdMeshers_FaceSide's. More...
 
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 (const TopoDS_Face &Face, const TopoDS_Edge &Edge, SMESH_Mesh *Mesh, const bool IsForward, const bool IgnoreMediumNodes, 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_ProxyMesh::Ptr ProxyMesh=SMESH_ProxyMesh::Ptr())
 
static StdMeshers_FaceSidePtr New (UVPtStructVec &theSideNodes, const TopoDS_Face &theFace=TopoDS_Face())
 

Protected Member Functions

void reverseProxySubmesh (const TopoDS_Edge &E)
 Reverse UVPtStructVec if a proxy sub-mesh of E. More...
 

Protected Attributes

std::vector< Handle(Geom2d_Curve)> myC2d
 
std::vector< GeomAdaptor_Curve > myC3dAdaptor
 
gp_Pnt2d myDefaultPnt2d
 
std::vector< TopoDS_Edge > myEdge
 
std::vector< intmyEdgeID
 
std::vector< double > myEdgeLength
 
TopoDS_Face myFace
 
std::vector< uvPtStructmyFalsePoints
 
std::vector< double > myFirst
 
bool myIgnoreMediumNodes
 
std::vector< intmyIsUniform
 
std::vector< double > myLast
 
double myLength
 
bool myMissingVertexNodes
 
int myNbPonits
 
int myNbSegments
 
std::vector< double > myNormPar
 
std::vector< uvPtStructmyPoints
 
SMESH_ProxyMesh::Ptr myProxyMesh
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ StdMeshers_FaceSide() [1/4]

StdMeshers_FaceSide::StdMeshers_FaceSide ( const TopoDS_Face &  theFace,
const TopoDS_Edge &  theEdge,
SMESH_Mesh theMesh,
const bool  theIsForward,
const bool  theIgnoreMediumNodes,
SMESH_ProxyMesh::Ptr  theProxyMesh = SMESH_ProxyMesh::Ptr() 
)

Wrap one edge.

Constructor of a side of one edge.

Parameters
theFace- the face
theEdge- the edge

References StdMeshers_FaceSide().

Referenced by GetFaceWires(), and StdMeshers_FaceSide().

◆ StdMeshers_FaceSide() [2/4]

StdMeshers_FaceSide::StdMeshers_FaceSide ( const TopoDS_Face &  theFace,
std::list< TopoDS_Edge > &  theEdges,
SMESH_Mesh theMesh,
const bool  theIsForward,
const bool  theIgnoreMediumNodes,
SMESH_ProxyMesh::Ptr  theProxyMesh = SMESH_ProxyMesh::Ptr() 
)

◆ StdMeshers_FaceSide() [3/4]

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(), myC2d, myDefaultPnt2d, myEdgeID, myFirst, myIsUniform, myLast, myLength, myNbPonits, myNbSegments, myNormPar, myPoints, and myProxyMesh.

◆ StdMeshers_FaceSide() [4/4]

StdMeshers_FaceSide::StdMeshers_FaceSide ( UVPtStructVec &  theSideNodes,
const TopoDS_Face &  theFace = TopoDS_Face() 
)

Member Function Documentation

◆ dump()

void StdMeshers_FaceSide::dump ( const char *  msg = 0) const

Show side features.

References myC2d, myEdge, myFalsePoints, myFirst, myLast, myNbPonits, myNormPar, and myPoints.

◆ Edge()

const TopoDS_Edge & StdMeshers_FaceSide::Edge ( int  i) const

Return i-th edge (count starts from zero)

Referenced by NETGENPlugin_Mesher::FillNgMesh().

◆ EdgeID()

int StdMeshers_FaceSide::EdgeID ( int  i) const

Return ID of i-th wrapped edge (count starts from zero)

References myEdgeID.

◆ EdgeIndex()

int StdMeshers_FaceSide::EdgeIndex ( double  U) const

Return edge index corresponding to normalized parameter.

Parameters
U- the parameter
Return values
int- index

References myNormPar.

Referenced by NETGENPlugin_Mesher::FillNgMesh(), Parameter(), SimulateUVPtStruct(), Value2d(), and Value3d().

◆ EdgeLength()

double StdMeshers_FaceSide::EdgeLength ( int  i) const

Return length of i-th wrapped edge (count starts from zero)

◆ Edges()

const std::vector< TopoDS_Edge > & StdMeshers_FaceSide::Edges ( ) const

Return all edges.

◆ FirstParameter()

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.

References myNormPar.

◆ FirstU()

double StdMeshers_FaceSide::FirstU ( int  i) const

Return first parameter of the i-th edge (count starts from zero). EDGE orientation is taken into account.

Return first parameter of the i-th edge.

References myFirst.

◆ FirstVertex()

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.

References myEdge, and NbEdges().

Referenced by IsClosed(), and VertexNode().

◆ GetCurve2d()

Adaptor2d_Curve2d * StdMeshers_FaceSide::GetCurve2d ( ) const

Creates a Adaptor2d_Curve2d to be used in SMESH_Block.

◆ GetCurve3d()

BRepAdaptor_CompCurve * StdMeshers_FaceSide::GetCurve3d ( ) const

Creates a fully functional Adaptor_Curve.

References IsClosed(), and myEdge.

◆ GetEdgeNodes()

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. Nodes moved to other geometry by MergeNodes() are also returned.

Return (unsorted) nodes of the i-th EDGE. Nodes moved to other geometry by MergeNodes() are also returned.

Return values
bool- is OK

References SMESHDS_SubMesh::GetElements(), SMDS_MeshElement::GetNode(), SMESHDS_SubMesh::GetNodes(), SMDS_MeshElement::GetType(), SMESH_MeshEditor::IsMedium(), SMESHDS_Mesh::MeshElements(), myEdge, myIgnoreMediumNodes, myProxyMesh, SMESHDS_SubMesh::NbElements(), SMESHDS_SubMesh::NbNodes(), and VertexNode().

Referenced by GetOrderedNodes(), GetUVPtStruct(), and NbPoints().

◆ GetFaceWires()

◆ GetMesh()

SMESH_Mesh * StdMeshers_FaceSide::GetMesh ( ) const

Return mesh.

◆ GetOrderedNodes()

std::vector< const SMDS_MeshNode * > StdMeshers_FaceSide::GetOrderedNodes ( int  iE = -1) const

◆ GetUVPtStruct()

const vector< UVPtStruct > & StdMeshers_FaceSide::GetUVPtStruct ( bool  isXConst = 0,
double  constValue = 0 
) const

◆ Handle()

StdMeshers_FaceSide::Handle ( Geom2d_Curve  ) const

Return p-curve of i-th wrapped edge (count starts from zero)

Referenced by Reverse(), and StdMeshers_FaceSide().

◆ IsClosed()

bool StdMeshers_FaceSide::IsClosed ( ) const

Return true if the chain of EDGEs is closed.

References FirstVertex(), LastVertex(), and myEdge.

Referenced by GetCurve3d(), GetOrderedNodes(), GetUVPtStruct(), NbPoints(), and VertexNode().

◆ IsReversed()

bool StdMeshers_FaceSide::IsReversed ( int  i) const

Return orientation of i-th wrapped edge (count starts from zero)

◆ LastParameter()

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.

References myNormPar.

◆ LastU()

double StdMeshers_FaceSide::LastU ( int  i) const

Return last parameter of the i-th edge (count starts from zero). EDGE orientation is taken into account.

Return last parameter of the i-th edge.

References myLast.

◆ LastVertex()

TopoDS_Vertex StdMeshers_FaceSide::LastVertex ( int  i = -1) const

Return last vertex of the i-th edge (count starts from zero)

Return last vertex of the i-the edge.

References myEdge, and NbEdges().

Referenced by IsClosed(), and VertexNode().

◆ Length()

◆ MissVertexNode()

bool StdMeshers_FaceSide::MissVertexNode ( ) const

Return true if there are vertices without nodes.

◆ NbEdges()

int StdMeshers_FaceSide::NbEdges ( ) const

◆ NbPoints()

int StdMeshers_FaceSide::NbPoints ( const bool  update = false) const

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 GetEdgeNodes(), IsClosed(), SMESH_MesherHelper::IsDegenShape(), SMESH_MesherHelper::IsRealSeam(), myEdge, myFace, myIgnoreMediumNodes, myMissingVertexNodes, myNbPonits, myNbSegments, myPoints, myProxyMesh, NbEdges(), SMESH_MesherHelper::SetSubShape(), and VertexNode().

Referenced by GetOrderedNodes(), GetUVPtStruct(), NbSegments(), SetIgnoreMediumNodes(), and StdMeshers_FaceSide().

◆ NbSegments()

int StdMeshers_FaceSide::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.

References myNbSegments, and NbPoints().

Referenced by NETGENPlugin_Mesher::FillNgMesh().

◆ New() [1/4]

static StdMeshers_FaceSidePtr StdMeshers_FaceSide::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

◆ New() [2/4]

static StdMeshers_FaceSidePtr StdMeshers_FaceSide::New ( const TopoDS_Face &  Face,
const TopoDS_Edge &  Edge,
SMESH_Mesh Mesh,
const bool  IsForward,
const bool  IgnoreMediumNodes,
SMESH_ProxyMesh::Ptr  ProxyMesh = SMESH_ProxyMesh::Ptr() 
)
static

◆ New() [3/4]

static StdMeshers_FaceSidePtr StdMeshers_FaceSide::New ( const TopoDS_Face &  Face,
std::list< TopoDS_Edge > &  Edges,
SMESH_Mesh Mesh,
const bool  IsForward,
const bool  IgnoreMediumNodes,
SMESH_ProxyMesh::Ptr  ProxyMesh = SMESH_ProxyMesh::Ptr() 
)
static

◆ New() [4/4]

static StdMeshers_FaceSidePtr StdMeshers_FaceSide::New ( UVPtStructVec &  theSideNodes,
const TopoDS_Face &  theFace = TopoDS_Face() 
)
static

◆ Parameter()

double StdMeshers_FaceSide::Parameter ( double  U,
TopoDS_Edge &  edge 
) const

Return edge and parameter on edge by normalized parameter.

Parameters
U- the parameter
Return values
double- pameter on a curve

References EdgeIndex(), myEdge, myFirst, myLast, and myNormPar.

◆ Reverse()

void StdMeshers_FaceSide::Reverse ( )

◆ reverseProxySubmesh()

void StdMeshers_FaceSide::reverseProxySubmesh ( const TopoDS_Edge &  E)
protected

Reverse UVPtStructVec if a proxy sub-mesh of E.

References myProxyMesh, uvPtStruct::normParam, uvPtStruct::x, and uvPtStruct::y.

Referenced by Reverse(), and StdMeshers_FaceSide().

◆ SetIgnoreMediumNodes()

void StdMeshers_FaceSide::SetIgnoreMediumNodes ( bool  toIgnore)

Make ignore medium nodes.

References myIgnoreMediumNodes, myPoints, and NbPoints().

◆ SimulateUVPtStruct()

const vector< UVPtStruct > & StdMeshers_FaceSide::SimulateUVPtStruct ( int  nbSeg,
bool  isXConst = 0,
double  constValue = 0 
) const

Simulates detailed data on nodes.

Falsificate info on nodes.

Parameters
isXConst- true if normalized parameter X is constant
constValue- constant parameter value
nbSeg- nb of segments on the side
Return values
UVPtStruct*- array of data structures

References EdgeIndex(), myC2d, myFalsePoints, myFirst, myLast, myNormPar, NbEdges(), uvPtStruct::node, uvPtStruct::normParam, uvPtStruct::param, uvPtStruct::u, uvPtStruct::v, uvPtStruct::x, and uvPtStruct::y.

◆ Value2d()

gp_Pnt2d StdMeshers_FaceSide::Value2d ( double  U) const

Return UV by normalized parameter.

Return 2D point by normalized parameter.

Parameters
U- normalized parameter value
Return values
gp_Pnt2d- point

References EdgeIndex(), myC2d, myC3dAdaptor, myDefaultPnt2d, myEdgeLength, myFirst, myIsUniform, myLast, myNormPar, and myPoints.

Referenced by Adaptor2dCurve2d::Value().

◆ Value3d()

gp_Pnt StdMeshers_FaceSide::Value3d ( double  U) const

Return XYZ by normalized parameter.

Parameters
U- normalized parameter value
Return values
gp_Pnt- point

References EdgeIndex(), myC3dAdaptor, myEdgeLength, myFirst, myIsUniform, myLast, and myNormPar.

◆ VertexNode()

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.

Parameters
[in]i- the VERTEX index
[out]isMoved- returns true if the found node is moved by MergeNodes()
Returns
const SMDS_MeshNode* - the found node

References FirstVertex(), SMESH_MesherHelper::GetSubShapeByNode(), IsClosed(), SMESH_MesherHelper::IsSubShape(), LastVertex(), myEdge, myEdgeID, myFace, myProxyMesh, NbEdges(), SMESH_Algo::VertexNode(), and SMESH_MesherHelper::WrapIndex().

Referenced by GetEdgeNodes(), GetOrderedNodes(), GetUVPtStruct(), and NbPoints().

Member Data Documentation

◆ myC2d

std::vector<Handle(Geom2d_Curve)> StdMeshers_FaceSide::myC2d
protected

◆ myC3dAdaptor

std::vector<GeomAdaptor_Curve> StdMeshers_FaceSide::myC3dAdaptor
protected

◆ myDefaultPnt2d

gp_Pnt2d StdMeshers_FaceSide::myDefaultPnt2d
protected

Referenced by StdMeshers_FaceSide(), and Value2d().

◆ myEdge

std::vector<TopoDS_Edge> StdMeshers_FaceSide::myEdge
protected

◆ myEdgeID

std::vector<int> StdMeshers_FaceSide::myEdgeID
protected

◆ myEdgeLength

std::vector<double> StdMeshers_FaceSide::myEdgeLength
protected

◆ myFace

TopoDS_Face StdMeshers_FaceSide::myFace
protected

◆ myFalsePoints

std::vector<uvPtStruct> StdMeshers_FaceSide::myFalsePoints
protected

Referenced by dump(), Reverse(), and SimulateUVPtStruct().

◆ myFirst

std::vector<double> StdMeshers_FaceSide::myFirst
protected

◆ myIgnoreMediumNodes

bool StdMeshers_FaceSide::myIgnoreMediumNodes
protected

◆ myIsUniform

std::vector<int> StdMeshers_FaceSide::myIsUniform
protected

◆ myLast

std::vector<double> StdMeshers_FaceSide::myLast
protected

◆ myLength

double StdMeshers_FaceSide::myLength
protected

Referenced by StdMeshers_FaceSide().

◆ myMissingVertexNodes

bool StdMeshers_FaceSide::myMissingVertexNodes
protected

Referenced by NbPoints(), and StdMeshers_FaceSide().

◆ myNbPonits

int StdMeshers_FaceSide::myNbPonits
protected

◆ myNbSegments

int StdMeshers_FaceSide::myNbSegments
protected

◆ myNormPar

◆ myPoints

std::vector<uvPtStruct> StdMeshers_FaceSide::myPoints
protected

◆ myProxyMesh


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