|
SALOME - SMESH
|
#include <SMESH_MesherHelper.hxx>

Public Types | |
| enum | MType { LINEAR, QUADRATIC, COMP } |
| Check mesh without geometry for: if all elements on this shape are quadratic, quadratic elements will be created. More... | |
Public Member Functions | |
| SMESH_MesherHelper (SMESH_Mesh &theMesh) | |
| SMESH_Mesh * | GetMesh () const |
| SMESHDS_Mesh * | GetMeshDS () const |
| bool | IsQuadraticSubMesh (const TopoDS_Shape &theShape) |
| void | SetIsQuadratic (const bool theBuildQuadratic) |
| Set order of elements to create without calling IsQuadraticSubMesh() More... | |
| bool | GetIsQuadratic () const |
| Return myCreateQuadratic flag. More... | |
| void | FixQuadraticElements (bool volumeOnly=true) |
| Move medium nodes of faces and volumes to fix distorted elements. More... | |
| void | SetElementsOnShape (bool toSet) |
| To set created elements on the shape set by IsQuadraticSubMesh() or the next methods. By defaul elements are set on the shape if a mesh has no shape to be meshed. More... | |
| void | SetSubShape (const int subShapeID) |
| Set shape to make elements on without calling IsQuadraticSubMesh() More... | |
| void | SetSubShape (const TopoDS_Shape &subShape) |
| ==SMESHDS_Mesh::ShapeToIndex(shape) More... | |
| int | GetSubShapeID () const |
| Return ID of the shape set by IsQuadraticSubMesh() or SetSubShape() More... | |
| TopoDS_Shape | GetSubShape () const |
| Return the shape set by IsQuadraticSubMesh() or SetSubShape() More... | |
| SMDS_MeshNode * | AddNode (double x, double y, double z, int ID=0) |
| SMDS_MeshEdge * | AddEdge (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const int id=0, const bool force3d=true) |
| SMDS_MeshFace * | AddFace (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const SMDS_MeshNode *n3, const int id=0, const bool force3d=false) |
| SMDS_MeshFace * | AddFace (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const SMDS_MeshNode *n3, const SMDS_MeshNode *n4, const int id=0, const bool force3d=false) |
| SMDS_MeshVolume * | AddVolume (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const SMDS_MeshNode *n3, const SMDS_MeshNode *n4, const int id=0, const bool force3d=true) |
| SMDS_MeshVolume * | AddVolume (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const SMDS_MeshNode *n3, const SMDS_MeshNode *n4, const SMDS_MeshNode *n5, const int id=0, const bool force3d=true) |
| SMDS_MeshVolume * | AddVolume (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const SMDS_MeshNode *n3, const SMDS_MeshNode *n4, const SMDS_MeshNode *n5, const SMDS_MeshNode *n6, const int id=0, const bool force3d=true) |
| SMDS_MeshVolume * | AddVolume (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const SMDS_MeshNode *n3, const SMDS_MeshNode *n4, const SMDS_MeshNode *n5, const SMDS_MeshNode *n6, const SMDS_MeshNode *n7, const SMDS_MeshNode *n8, const int id=0, bool force3d=true) |
| double | GetNodeU (const TopoDS_Edge &theEdge, const SMDS_MeshNode *theNode, bool *check=0) |
| Return U of the given node on the edge. More... | |
| gp_XY | GetNodeUV (const TopoDS_Face &F, const SMDS_MeshNode *n, const SMDS_MeshNode *inFaceNode=0, bool *check=0) const |
| Return node UV on face. More... | |
| bool | CheckNodeUV (const TopoDS_Face &F, const SMDS_MeshNode *n, gp_XY &uv, const double tol) const |
| Check and fix node UV on a face. More... | |
| bool | GetNodeUVneedInFaceNode (const TopoDS_Face &F=TopoDS_Face()) const |
| Check if inFaceNode argument is necessary for call GetNodeUV(F,..) More... | |
| bool | IsDegenShape (const int subShape) const |
| Check if shape is a degenerated edge or it's vertex. More... | |
| bool | IsSeamShape (const int subShape) const |
| Check if shape is a seam edge or it's vertex. More... | |
| bool | IsSeamShape (const TopoDS_Shape &subShape) const |
| Check if shape is a seam edge or it's vertex. More... | |
| bool | IsRealSeam (const int subShape) const |
| Return true if an edge or a vertex encounters twice in face wire. More... | |
| bool | IsRealSeam (const TopoDS_Shape &subShape) const |
| Return true if an edge or a vertex encounters twice in face wire. More... | |
| bool | HasSeam () const |
| Check if the shape set through IsQuadraticSubMesh() or SetSubShape() has a seam edge. More... | |
| int | GetPeriodicIndex () const |
| Return index of periodic parametric direction of a closed face. More... | |
| double | GetOtherParam (const double param) const |
| Return an alternative parameter for a node on seam. More... | |
| const SMDS_MeshNode * | GetMediumNode (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const bool force3d) |
| Special function for search or creation medium node. More... | |
| void | AddTLinkNode (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const SMDS_MeshNode *n12) |
| void | AddTLinkNodeMap (const TLinkNodeMap &aMap) |
| Auxilary function for filling myTLinkNodeMap. More... | |
| const TLinkNodeMap & | GetTLinkNodeMap () const |
| Returns myTLinkNodeMap. More... | |
| MType | IsQuadraticMesh () |
Static Public Member Functions | |
| static bool | IsMedium (const SMDS_MeshNode *node, const SMDSAbs_ElementType typeToCheck=SMDSAbs_All) |
| Returns true if given node is medium. More... | |
| static bool | LoadNodeColumns (TParam2ColumnMap &theParam2ColumnMap, const TopoDS_Face &theFace, const TopoDS_Edge &theBaseEdge, SMESHDS_Mesh *theMesh) |
| Load nodes bound to face into a map of node columns. More... | |
| static TopoDS_Shape | GetSubShapeByNode (const SMDS_MeshNode *node, SMESHDS_Mesh *meshDS) |
| Return support shape of a node. More... | |
| static int | WrapIndex (const int ind, const int nbNodes) |
| Return a valid node index, fixing the given one if necessary. More... | |
| static int | NbAncestors (const TopoDS_Shape &shape, const SMESH_Mesh &mesh, TopAbs_ShapeEnum ancestorType=TopAbs_SHAPE) |
| Return number of unique ancestors of the shape. More... | |
| static gp_XY | GetMiddleUV (const Handle(Geom_Surface)&surface, const gp_XY &uv1, const gp_XY &uv2) |
| Return middle UV taking in account surface period. More... | |
Protected Member Functions | |
| gp_Pnt2d | GetUVOnSeam (const gp_Pnt2d &uv1, const gp_Pnt2d &uv2) const |
| Select UV on either of 2 pcurves of a seam edge, closest to the given UV. More... | |
Private Member Functions | |
| SMESH_MesherHelper (const SMESH_MesherHelper &theOther) | |
Private Attributes | |
| TLinkNodeMap | myTLinkNodeMap |
| std::set< int > | myDegenShapeIds |
| std::set< int > | mySeamShapeIds |
| double | myPar1 |
| double | myPar2 |
| int | myParIndex |
| TopoDS_Shape | myShape |
| SMESH_Mesh * | myMesh |
| int | myShapeID |
| bool | myCreateQuadratic |
| bool | mySetElemOnShape |
| std::set< int > | myOkNodePosShapes |
Definition at line 57 of file SMESH_MesherHelper.hxx.
Check mesh without geometry for: if all elements on this shape are quadratic, quadratic elements will be created.
Used then generated 3D mesh without geometry.
| Enumerator | |
|---|---|
| LINEAR | |
| QUADRATIC | |
| COMP | |
Definition at line 362 of file SMESH_MesherHelper.hxx.
| SMESH_MesherHelper::SMESH_MesherHelper | ( | SMESH_Mesh & | theMesh | ) |
|
private |
Definition at line 378 of file SMESH_MesherHelper.hxx.
|
static |
Returns true if given node is medium.
| n | - node to check |
| typeToCheck | - type of elements containing the node to ask about node status |
| bool | - check result |
|
static |
Load nodes bound to face into a map of node columns.
| theParam2ColumnMap | - map of node columns to fill |
| theFace | - the face on which nodes are searched for |
| theBaseEdge | - the edge nodes of which are columns' bases |
| theMesh | - the mesh containing nodes |
| bool | - false if something is wrong |
The key of the map is a normalized parameter of each base node on theBaseEdge. This method works in supposition that nodes on the face forms a rectangular grid and elements can be quardrangles or triangles
|
static |
Return support shape of a node.
| node | - the node |
| meshDS | - mesh DS |
| TopoDS_Shape | - found support shape |
Return a valid node index, fixing the given one if necessary.
| ind | - node index |
| nbNodes | - total nb of nodes |
| int | - valid node index |
Definition at line 103 of file SMESH_MesherHelper.hxx.
|
static |
Return number of unique ancestors of the shape.
| SMESH_Mesh* SMESH_MesherHelper::GetMesh | ( | ) | const |
Definition at line 122 of file SMESH_MesherHelper.hxx.
| SMESHDS_Mesh* SMESH_MesherHelper::GetMeshDS | ( | ) | const |
Definition at line 124 of file SMESH_MesherHelper.hxx.
| bool SMESH_MesherHelper::IsQuadraticSubMesh | ( | const TopoDS_Shape & | theShape | ) |
Check submesh for given shape: if all elements on this shape are quadratic, quadratic elements will be created. Also fill myTLinkNodeMap
| void SMESH_MesherHelper::SetIsQuadratic | ( | const bool | theBuildQuadratic | ) |
Set order of elements to create without calling IsQuadraticSubMesh()
Definition at line 134 of file SMESH_MesherHelper.hxx.
| bool SMESH_MesherHelper::GetIsQuadratic | ( | ) | const |
Return myCreateQuadratic flag.
Definition at line 139 of file SMESH_MesherHelper.hxx.
| void SMESH_MesherHelper::FixQuadraticElements | ( | bool | volumeOnly = true | ) |
Move medium nodes of faces and volumes to fix distorted elements.
| volumeOnly | - fix nodes on geom faces or not if the shape is solid |
| void SMESH_MesherHelper::SetElementsOnShape | ( | bool | toSet | ) |
To set created elements on the shape set by IsQuadraticSubMesh() or the next methods. By defaul elements are set on the shape if a mesh has no shape to be meshed.
Definition at line 152 of file SMESH_MesherHelper.hxx.
| void SMESH_MesherHelper::SetSubShape | ( | const int | subShapeID | ) |
Set shape to make elements on without calling IsQuadraticSubMesh()
| void SMESH_MesherHelper::SetSubShape | ( | const TopoDS_Shape & | subShape | ) |
==SMESHDS_Mesh::ShapeToIndex(shape)
| int SMESH_MesherHelper::GetSubShapeID | ( | ) | const |
Return ID of the shape set by IsQuadraticSubMesh() or SetSubShape()
| int | - shape index in SMESHDS |
Definition at line 163 of file SMESH_MesherHelper.hxx.
| TopoDS_Shape SMESH_MesherHelper::GetSubShape | ( | ) | const |
Return the shape set by IsQuadraticSubMesh() or SetSubShape()
Definition at line 167 of file SMESH_MesherHelper.hxx.
| SMDS_MeshNode* SMESH_MesherHelper::AddNode | ( | double | x, |
| double | y, | ||
| double | z, | ||
| int | ID = 0 |
||
| ) |
Creates a node
| SMDS_MeshEdge* SMESH_MesherHelper::AddEdge | ( | const SMDS_MeshNode * | n1, |
| const SMDS_MeshNode * | n2, | ||
| const int | id = 0, |
||
| const bool | force3d = true |
||
| ) |
Creates quadratic or linear edge
| SMDS_MeshFace* SMESH_MesherHelper::AddFace | ( | const SMDS_MeshNode * | n1, |
| const SMDS_MeshNode * | n2, | ||
| const SMDS_MeshNode * | n3, | ||
| const int | id = 0, |
||
| const bool | force3d = false |
||
| ) |
Creates quadratic or linear triangle
| SMDS_MeshFace* SMESH_MesherHelper::AddFace | ( | const SMDS_MeshNode * | n1, |
| const SMDS_MeshNode * | n2, | ||
| const SMDS_MeshNode * | n3, | ||
| const SMDS_MeshNode * | n4, | ||
| const int | id = 0, |
||
| const bool | force3d = false |
||
| ) |
Creates quadratic or linear quadrangle
| SMDS_MeshVolume* SMESH_MesherHelper::AddVolume | ( | const SMDS_MeshNode * | n1, |
| const SMDS_MeshNode * | n2, | ||
| const SMDS_MeshNode * | n3, | ||
| const SMDS_MeshNode * | n4, | ||
| const int | id = 0, |
||
| const bool | force3d = true |
||
| ) |
Creates quadratic or linear tetraahedron
| SMDS_MeshVolume* SMESH_MesherHelper::AddVolume | ( | const SMDS_MeshNode * | n1, |
| const SMDS_MeshNode * | n2, | ||
| const SMDS_MeshNode * | n3, | ||
| const SMDS_MeshNode * | n4, | ||
| const SMDS_MeshNode * | n5, | ||
| const int | id = 0, |
||
| const bool | force3d = true |
||
| ) |
Creates quadratic or linear pyramid
| SMDS_MeshVolume* SMESH_MesherHelper::AddVolume | ( | const SMDS_MeshNode * | n1, |
| const SMDS_MeshNode * | n2, | ||
| const SMDS_MeshNode * | n3, | ||
| const SMDS_MeshNode * | n4, | ||
| const SMDS_MeshNode * | n5, | ||
| const SMDS_MeshNode * | n6, | ||
| const int | id = 0, |
||
| const bool | force3d = true |
||
| ) |
Creates quadratic or linear pentahedron
| SMDS_MeshVolume* SMESH_MesherHelper::AddVolume | ( | const SMDS_MeshNode * | n1, |
| const SMDS_MeshNode * | n2, | ||
| const SMDS_MeshNode * | n3, | ||
| const SMDS_MeshNode * | n4, | ||
| const SMDS_MeshNode * | n5, | ||
| const SMDS_MeshNode * | n6, | ||
| const SMDS_MeshNode * | n7, | ||
| const SMDS_MeshNode * | n8, | ||
| const int | id = 0, |
||
| bool | force3d = true |
||
| ) |
Creates quadratic or linear hexahedron
| double SMESH_MesherHelper::GetNodeU | ( | const TopoDS_Edge & | theEdge, |
| const SMDS_MeshNode * | theNode, | ||
| bool * | check = 0 |
||
| ) |
Return U of the given node on the edge.
| gp_XY SMESH_MesherHelper::GetNodeUV | ( | const TopoDS_Face & | F, |
| const SMDS_MeshNode * | n, | ||
| const SMDS_MeshNode * | inFaceNode = 0, |
||
| bool * | check = 0 |
||
| ) | const |
Return node UV on face.
| inFaceNode | - a node of element being created located inside a face |
Referenced by StdMeshers_PrismAsBlock::TSideFace::GetNodeUV().

| bool SMESH_MesherHelper::CheckNodeUV | ( | const TopoDS_Face & | F, |
| const SMDS_MeshNode * | n, | ||
| gp_XY & | uv, | ||
| const double | tol | ||
| ) | const |
Check and fix node UV on a face.
| bool | - false if UV is bad and could not be fixed |
|
static |
Return middle UV taking in account surface period.
| bool SMESH_MesherHelper::GetNodeUVneedInFaceNode | ( | const TopoDS_Face & | F = TopoDS_Face() | ) | const |
Check if inFaceNode argument is necessary for call GetNodeUV(F,..)
| bool | - return true if the face is periodic |
if F is Null, answer about subshape set through IsQuadraticSubMesh() or SetSubShape()
| bool SMESH_MesherHelper::IsDegenShape | ( | const int | subShape | ) | const |
Check if shape is a degenerated edge or it's vertex.
| subShape | - edge or vertex index in SMESHDS |
| bool | - true if subShape is a degenerated shape |
It works only if IsQuadraticSubMesh() or SetSubShape() has been called
Definition at line 284 of file SMESH_MesherHelper.hxx.
| bool SMESH_MesherHelper::IsSeamShape | ( | const int | subShape | ) | const |
Check if shape is a seam edge or it's vertex.
| subShape | - edge or vertex index in SMESHDS |
| bool | - true if subShape is a seam shape |
It works only if IsQuadraticSubMesh() or SetSubShape() has been called. Seam shape has two 2D alternative represenations on the face
Definition at line 294 of file SMESH_MesherHelper.hxx.
| bool SMESH_MesherHelper::IsSeamShape | ( | const TopoDS_Shape & | subShape | ) | const |
Check if shape is a seam edge or it's vertex.
| subShape | - edge or vertex |
| bool | - true if subShape is a seam shape |
It works only if IsQuadraticSubMesh() or SetSubShape() has been called. Seam shape has two 2D alternative represenations on the face
Definition at line 304 of file SMESH_MesherHelper.hxx.
| bool SMESH_MesherHelper::IsRealSeam | ( | const int | subShape | ) | const |
Return true if an edge or a vertex encounters twice in face wire.
| subShape | - Id of edge or vertex |
Definition at line 310 of file SMESH_MesherHelper.hxx.
| bool SMESH_MesherHelper::IsRealSeam | ( | const TopoDS_Shape & | subShape | ) | const |
Return true if an edge or a vertex encounters twice in face wire.
| subShape | - edge or vertex |
Definition at line 316 of file SMESH_MesherHelper.hxx.
| bool SMESH_MesherHelper::HasSeam | ( | ) | const |
Check if the shape set through IsQuadraticSubMesh() or SetSubShape() has a seam edge.
| bool | - true if it has |
Definition at line 323 of file SMESH_MesherHelper.hxx.
| int SMESH_MesherHelper::GetPeriodicIndex | ( | ) | const |
Return index of periodic parametric direction of a closed face.
| int | - 1 for U, 2 for V direction |
Definition at line 328 of file SMESH_MesherHelper.hxx.
| double SMESH_MesherHelper::GetOtherParam | ( | const double | param | ) | const |
Return an alternative parameter for a node on seam.
| const SMDS_MeshNode* SMESH_MesherHelper::GetMediumNode | ( | const SMDS_MeshNode * | n1, |
| const SMDS_MeshNode * | n2, | ||
| const bool | force3d | ||
| ) |
Special function for search or creation medium node.
| void SMESH_MesherHelper::AddTLinkNode | ( | const SMDS_MeshNode * | n1, |
| const SMDS_MeshNode * | n2, | ||
| const SMDS_MeshNode * | n12 | ||
| ) |
Auxilary function for filling myTLinkNodeMap
| void SMESH_MesherHelper::AddTLinkNodeMap | ( | const TLinkNodeMap & | aMap | ) |
Auxilary function for filling myTLinkNodeMap.
Definition at line 349 of file SMESH_MesherHelper.hxx.
| const TLinkNodeMap& SMESH_MesherHelper::GetTLinkNodeMap | ( | ) | const |
Returns myTLinkNodeMap.
Definition at line 355 of file SMESH_MesherHelper.hxx.
| MType SMESH_MesherHelper::IsQuadraticMesh | ( | ) |
|
protected |
Select UV on either of 2 pcurves of a seam edge, closest to the given UV.
| uv1 | - UV on the seam |
| uv2 | - UV within a face |
| gp_Pnt2d | - selected UV |
|
private |
Definition at line 378 of file SMESH_MesherHelper.hxx.
|
private |
Definition at line 383 of file SMESH_MesherHelper.hxx.
|
private |
Definition at line 384 of file SMESH_MesherHelper.hxx.
|
private |
Definition at line 385 of file SMESH_MesherHelper.hxx.
|
private |
Definition at line 385 of file SMESH_MesherHelper.hxx.
|
private |
Definition at line 386 of file SMESH_MesherHelper.hxx.
|
private |
Definition at line 388 of file SMESH_MesherHelper.hxx.
|
private |
Definition at line 389 of file SMESH_MesherHelper.hxx.
|
private |
Definition at line 390 of file SMESH_MesherHelper.hxx.
|
private |
Definition at line 393 of file SMESH_MesherHelper.hxx.
|
private |
Definition at line 394 of file SMESH_MesherHelper.hxx.
|
private |
Definition at line 395 of file SMESH_MesherHelper.hxx.