Version: 8.3.0
_QuadFaceGrid Class Reference

Class corresponding to a meshed composite face of a box. More...

Public Types

typedef SMDS_SetIterator
< const _QuadFaceGrid
&, TChildren::const_iterator,
SMDS::SimpleAccessor< const
_QuadFaceGrid
&, TChildren::const_iterator >
, SMDS::PassAllValueFilter
< _QuadFaceGrid > > 
TChildIterator
 

Public Member Functions

 _QuadFaceGrid ()
 constructor of non-initialized _QuadFaceGrid More...
 
bool Init (const TopoDS_Face &f, SMESH_Mesh &mesh)
 < initialization More...
 
bool AddContinuousFace (const _QuadFaceGrid &f, const TopTools_MapOfShape &internalEdges)
 Try to set the side as bottom hirizontal side. More...
 
bool SetBottomSide (const _FaceSide &side, int *sideIndex=0)
 Return face adjacent to zero-based i-th side of this face. More...
 
_QuadFaceGridFindAdjacentForSide (int i, list< _QuadFaceGrid > &faces, EBoxSides id) const
 Reverse edges in order to have the bottom edge going along axes of the unit box. More...
 
void ReverseEdges ()
 Reverse edges in order to have them oriented along axes of the unit box. More...
 
bool IsComplex () const
 
int NbChildren () const
 
TChildIterator GetChildren () const
 
bool LoadGrid (SMESH_Mesh &mesh)
 < Load nodes of a mesh More...
 
void ComputeIJK (int i1, int i2, double v3)
 Return number of segments on the hirizontal sides. More...
 
int GetNbHoriSegments (SMESH_Mesh &mesh, bool withBrothers=false) const
 Return number of segments on the vertical sides. More...
 
int GetNbVertSegments (SMESH_Mesh &mesh, bool withBrothers=false) const
 Return edge on the hirizontal bottom sides. More...
 
int GetHoriEdges (vector< TopoDS_Edge > &edges) const
 Return a node by its position. More...
 
const SMDS_MeshNodeGetNode (int iHori, int iVert) const
 Return node coordinates by its position. More...
 
gp_XYZ GetXYZ (int iHori, int iVert) const
 Return normalized parameters of nodes within the unitary cube. More...
 
gp_XYZ & GetIJK (int iCol, int iRow)
 
const _FaceSideGetSide (int i) const
 < Return i-th face side (0<i<4) More...
 
TopoDS_Face GetFace () const
 Return normal to the face at vertex v. More...
 
bool GetNormal (const TopoDS_Vertex &v, gp_Vec &n) const
 Return normal to the face at vertex v. More...
 
SMESH_ComputeErrorPtr GetError () const
 
void SetID (EBoxSides id)
 
void DumpGrid () const
 Dumps coordinates of grid nodes. More...
 
void DumpVertices () const
 Dump vertices. More...
 

Private Types

typedef list< _QuadFaceGridTChildren
 

Private Member Functions

bool error (const std::string &text, int code=COMPERR_ALGO_FAILED)
 
bool error (const SMESH_ComputeErrorPtr &err)
 
bool loadCompositeGrid (SMESH_Mesh &mesh)
 Fill myGrid with nodes of patches. More...
 
bool fillGrid (SMESH_Mesh &theMesh, vector< const SMDS_MeshNode * > &theGrid, const _Indexer &theIndexer, int theX, int theY)
 Store nodes of a simple face into grid starting from (x,y) position. More...
 
bool locateChildren ()
 Find out mutual location of children: find their right and up brothers. More...
 
void setBrothers (set< _QuadFaceGrid * > &notLocatedBrothers)
 Find right an upper brothers among notLocatedBrothers. More...
 

Private Attributes

TopoDS_Face myFace
 
_FaceSide mySides
 
bool myReverse
 
TChildren myChildren
 
_QuadFaceGridmyLeftBottomChild
 
_QuadFaceGridmyRightBrother
 
_QuadFaceGridmyUpBrother
 
_Indexer myIndexer
 
vector< const SMDS_MeshNode * > myGrid
 
vector< gp_XYZ > myIJK
 
SMESH_ComputeErrorPtr myError
 
EBoxSides myID
 

Detailed Description

Class corresponding to a meshed composite face of a box.

Provides simplified access to it's sub-mesh data.

Member Typedef Documentation

typedef SMDS_SetIterator< const _QuadFaceGrid&, TChildren::const_iterator, SMDS::SimpleAccessor<const _QuadFaceGrid&,TChildren::const_iterator>, SMDS::PassAllValueFilter<_QuadFaceGrid> > _QuadFaceGrid::TChildIterator
typedef list< _QuadFaceGrid > _QuadFaceGrid::TChildren
private

Constructor & Destructor Documentation

_QuadFaceGrid::_QuadFaceGrid ( )

constructor of non-initialized _QuadFaceGrid

Member Function Documentation

bool _QuadFaceGrid::AddContinuousFace ( const _QuadFaceGrid f,
const TopTools_MapOfShape &  internalEdges 
)
void _QuadFaceGrid::ComputeIJK ( int  i1,
int  i2,
double  v3 
)

Return number of segments on the hirizontal sides.

Fill myIJK with normalized parameters of nodes in myGrid.

Parameters
[in]i1- coordinate index along rows of myGrid
[in]i2- coordinate index along columns of myGrid
[in]v3- value of the constant parameter

References GetIJK(), GetXYZ(), myIJK, and myIndexer.

Referenced by StdMeshers_CompositeHexa_3D::Compute().

void _QuadFaceGrid::DumpGrid ( ) const

Dumps coordinates of grid nodes.

References myChildren, myGrid, myID, myIndexer, SetID(), SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().

Referenced by loadCompositeGrid(), and LoadGrid().

void _QuadFaceGrid::DumpVertices ( ) const

Dump vertices.

References B_BACK, B_BOTTOM, _FaceSide::Dump(), _FaceSide::GetSide(), myChildren, myID, mySides, and SetID().

Referenced by ReverseEdges().

bool _QuadFaceGrid::error ( const std::string &  text,
int  code = COMPERR_ALGO_FAILED 
)
private
bool _QuadFaceGrid::error ( const SMESH_ComputeErrorPtr err)
private
bool _QuadFaceGrid::fillGrid ( SMESH_Mesh theMesh,
vector< const SMDS_MeshNode * > &  theGrid,
const _Indexer theIndexer,
int  theX,
int  theY 
)
private

Store nodes of a simple face into grid starting from (x,y) position.

References error(), fillGrid(), GetError(), LoadGrid(), myGrid, myIndexer, myReverse, myRightBrother, and myUpBrother.

Referenced by fillGrid(), and loadCompositeGrid().

_QuadFaceGrid * _QuadFaceGrid::FindAdjacentForSide ( int  i,
list< _QuadFaceGrid > &  faces,
EBoxSides  id 
) const

Reverse edges in order to have the bottom edge going along axes of the unit box.

Return face adjacent to i-th side of this face, (0<i<4)

References GetSide(), SetBottomSide(), and SetID().

Referenced by StdMeshers_CompositeHexa_3D::Evaluate(), and StdMeshers_CompositeHexa_3D::findBoxFaces().

SMESH_ComputeErrorPtr _QuadFaceGrid::GetError ( ) const
TopoDS_Face _QuadFaceGrid::GetFace ( ) const

Return normal to the face at vertex v.

Referenced by StdMeshers_CompositeHexa_3D::Evaluate().

int _QuadFaceGrid::GetHoriEdges ( vector< TopoDS_Edge > &  edges) const

Return a node by its position.

Return edge on the hirizontal bottom sides.

References _FaceSide::Edge(), GetHoriEdges(), _FaceSide::GetSide(), myLeftBottomChild, myRightBrother, mySides, and Q_BOTTOM.

Referenced by StdMeshers_CompositeHexa_3D::Evaluate(), and GetHoriEdges().

gp_XYZ& _QuadFaceGrid::GetIJK ( int  iCol,
int  iRow 
)
int _QuadFaceGrid::GetNbHoriSegments ( SMESH_Mesh mesh,
bool  withBrothers = false 
) const

Return number of segments on the vertical sides.

Return number of segments on the hirizontal sides.

References GetNbHoriSegments(), _FaceSide::GetNbSegments(), _FaceSide::GetSide(), myLeftBottomChild, myRightBrother, mySides, and Q_BOTTOM.

Referenced by StdMeshers_CompositeHexa_3D::Compute(), GetNbHoriSegments(), and loadCompositeGrid().

int _QuadFaceGrid::GetNbVertSegments ( SMESH_Mesh mesh,
bool  withBrothers = false 
) const

Return edge on the hirizontal bottom sides.

Return number of segments on the vertical sides.

References _FaceSide::GetNbSegments(), GetNbVertSegments(), _FaceSide::GetSide(), myLeftBottomChild, mySides, myUpBrother, and Q_LEFT.

Referenced by StdMeshers_CompositeHexa_3D::Compute(), GetNbVertSegments(), and loadCompositeGrid().

const SMDS_MeshNode * _QuadFaceGrid::GetNode ( int  iHori,
int  iVert 
) const

Return node coordinates by its position.

Return a node by its position.

References myGrid, and myIndexer.

Referenced by StdMeshers_CompositeHexa_3D::Compute().

bool _QuadFaceGrid::GetNormal ( const TopoDS_Vertex &  v,
gp_Vec &  n 
) const

Return normal to the face at vertex v.

References _FaceSide::Contain(), myChildren, myFace, and mySides.

const _FaceSide & _QuadFaceGrid::GetSide ( int  i) const
gp_XYZ _QuadFaceGrid::GetXYZ ( int  iHori,
int  iVert 
) const

Return normalized parameters of nodes within the unitary cube.

Return node coordinates by its position.

References myGrid, and myIndexer.

Referenced by StdMeshers_CompositeHexa_3D::Compute(), and ComputeIJK().

bool _QuadFaceGrid::loadCompositeGrid ( SMESH_Mesh mesh)
private
bool _QuadFaceGrid::locateChildren ( )
private

Find out mutual location of children: find their right and up brothers.

References DUMP_VERT, ERR_LI, error(), _FaceSide::FirstVertex(), GetSide(), myChildren, myLeftBottomChild, Q_BOTTOM, and setBrothers().

Referenced by GetSide(), and loadCompositeGrid().

int _QuadFaceGrid::NbChildren ( ) const
void _QuadFaceGrid::ReverseEdges ( )

Reverse edges in order to have them oriented along axes of the unit box.

References DumpVertices(), myChildren, and myReverse.

Referenced by StdMeshers_CompositeHexa_3D::findBoxFaces().

bool _QuadFaceGrid::SetBottomSide ( const _FaceSide side,
int sideIndex = 0 
)

Return face adjacent to zero-based i-th side of this face.

Try to set the side as bottom hirizontal side.

References _FaceSide::Contain(), myChildren, myLeftBottomChild, myRightBrother, mySides, myUpBrother, and _FaceSide::SetBottomSide().

Referenced by FindAdjacentForSide(), and StdMeshers_CompositeHexa_3D::findBoxFaces().

void _QuadFaceGrid::setBrothers ( set< _QuadFaceGrid * > &  notLocatedBrothers)
private

Find right an upper brothers among notLocatedBrothers.

References DUMP_VERT, _FaceSide::FirstVertex(), GetSide(), _FaceSide::LastVertex(), myRightBrother, myUpBrother, Q_BOTTOM, Q_LEFT, and setBrothers().

Referenced by locateChildren(), and setBrothers().

Field Documentation

SMESH_ComputeErrorPtr _QuadFaceGrid::myError
private
TopoDS_Face _QuadFaceGrid::myFace
private
vector<const SMDS_MeshNode*> _QuadFaceGrid::myGrid
private
EBoxSides _QuadFaceGrid::myID
private

Referenced by DumpGrid(), DumpVertices(), and LoadGrid().

vector<gp_XYZ> _QuadFaceGrid::myIJK
private

Referenced by ComputeIJK().

_Indexer _QuadFaceGrid::myIndexer
private
bool _QuadFaceGrid::myReverse
private
_QuadFaceGrid* _QuadFaceGrid::myRightBrother
private
_QuadFaceGrid* _QuadFaceGrid::myUpBrother
private