Version: 8.3.0
SMESH_MesherHelper Class Reference

It helps meshers to add elements and provides other utilities. More...

#include <SMESH_MesherHelper.hxx>

Data Structures

struct  TBiQuad
 

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)
 Constructor. More...
 
SMESH_GenGetGen () const
 Return SMESH_Gen. More...
 
SMESH_MeshGetMesh () const
 
SMESHDS_MeshGetMeshDS () const
 Return mesh DS. More...
 
bool IsQuadraticSubMesh (const TopoDS_Shape &theShape)
 Check submesh for given shape: if all elements on this shape are quadratic, quadratic elements will be created. More...
 
void SetIsQuadratic (const bool theBuildQuadratic)
 Set order of elements to create without calling IsQuadraticSubMesh() More...
 
void SetIsBiQuadratic (const bool theBuildBiQuadratic)
 Set myCreateBiQuadratic flag. More...
 
bool GetIsQuadratic () const
 Return myCreateQuadratic flag. More...
 
bool IsReversedSubMesh (const TopoDS_Face &theFace)
 Find out elements orientation on a geometrical face. More...
 
bool GetIsBiQuadratic () const
 Return myCreateBiQuadratic flag. More...
 
void FixQuadraticElements (SMESH_ComputeErrorPtr &error, bool volumeOnly=true)
 Move medium nodes of faces and volumes to fix distorted elements. More...
 
bool SetElementsOnShape (bool toSet)
 To set created elements on the shape set by IsQuadraticSubMesh() or the next methods. 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...
 
const TopoDS_Shape & GetSubShape () const
 Return the shape set by IsQuadraticSubMesh() or SetSubShape() More...
 
void CopySubShapeInfo (const SMESH_MesherHelper &other)
 Copy shape information from another helper to improve performance since SetSubShape() can be time consuming if there are many edges. More...
 
int ShapeToIndex (const TopoDS_Shape &S) const
 Convert a shape to its index in the SMESHDS_Mesh. More...
 
SMDS_MeshNodeAddNode (double x, double y, double z, int ID=0, double u=0., double v=0.)
 Creates a node (!Note ID before u=0.,v0.) More...
 
SMDS_MeshEdgeAddEdge (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const int id=0, const bool force3d=true)
 Creates quadratic or linear edge. More...
 
SMDS_MeshFaceAddFace (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. More...
 
SMDS_MeshFaceAddFace (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 bi-quadratic, quadratic or linear quadrangle. More...
 
SMDS_MeshFaceAddPolygonalFace (const std::vector< const SMDS_MeshNode * > &nodes, const int id=0, const bool force3d=false)
 Creates polygon, with additional nodes in quadratic mesh. More...
 
SMDS_MeshVolumeAddVolume (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 tetrahedron. More...
 
SMDS_MeshVolumeAddVolume (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. More...
 
SMDS_MeshVolumeAddVolume (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. More...
 
SMDS_MeshVolumeAddVolume (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 bi-quadratic, quadratic or linear hexahedron. More...
 
SMDS_MeshVolumeAddVolume (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 SMDS_MeshNode *n9, const SMDS_MeshNode *n10, const SMDS_MeshNode *n11, const SMDS_MeshNode *n12, const int id=0, bool force3d=true)
 Creates LINEAR!!!!!!!!! octahedron. More...
 
SMDS_MeshVolumeAddPolyhedralVolume (const std::vector< const SMDS_MeshNode * > &nodes, const std::vector< int > &quantities, const int ID=0, const bool force3d=true)
 Creates polyhedron. More...
 
void ToFixNodeParameters (bool toFix)
 Enables fixing node parameters on EDGEs and FACEs by GetNodeU(...,check=true), GetNodeUV(...,check=true), CheckNodeUV() and CheckNodeU() in case if a node lies on a shape set via SetSubShape(). More...
 
double GetNodeU (const TopoDS_Edge &theEdge, const SMDS_MeshNode *theNode, const SMDS_MeshNode *inEdgeNode=0, bool *check=0) const
 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 bool force=false, double distXYZ[4]=0) const
 Check and fix node UV on a face. More...
 
bool CheckNodeU (const TopoDS_Edge &E, const SMDS_MeshNode *n, double &u, const double tol, const bool force=false, double distXYZ[4]=0) const
 Check and fix node U on an edge. More...
 
void AdjustByPeriod (const TopoDS_Face &face, gp_XY uv[], const int nbUV)
 Move node positions on a FACE within surface period. More...
 
bool GetNodeUVneedInFaceNode (const TopoDS_Face &F=TopoDS_Face()) const
 Check if inFaceNode argument is necessary for call GetNodeUV(F,..) More...
 
GeomAPI_ProjectPointOnSurf & GetProjector (const TopoDS_Face &F, TopLoc_Location &loc, double tol=0) const
 Return projector intitialized by given face without location, which is returned. More...
 
 Handle (ShapeAnalysis_Surface) GetSurface(const TopoDS_Face &F) const
 Return a cached ShapeAnalysis_Surface of a FACE. More...
 
bool IsDegenShape (const int subShape) const
 Check if shape is a degenerated edge or it's vertex. More...
 
bool HasDegeneratedEdges () const
 Check if the shape set through IsQuadraticSubMesh() or SetSubShape() has a degenerated edges. 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, i.e. More...
 
bool HasRealSeam () const
 Check if the shape set through IsQuadraticSubMesh() or SetSubShape() has a seam edge that encounters twice in a wire. 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...
 
int IsOnSeam (const gp_XY &uv) const
 Check if UV is on seam. More...
 
const SMDS_MeshNodeGetMediumNode (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const bool force3d, TopAbs_ShapeEnum expectedSupport=TopAbs_SHAPE)
 Return existing or create new medium nodes between given ones. More...
 
const SMDS_MeshNodeGetCentralNode (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const SMDS_MeshNode *n3, const SMDS_MeshNode *n4, const SMDS_MeshNode *n12, const SMDS_MeshNode *n23, const SMDS_MeshNode *n34, const SMDS_MeshNode *n41, bool force3d)
 Return existing or create a new central node for a quardilateral quadratic face given its 8 nodes. More...
 
const SMDS_MeshNodeGetCentralNode (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const SMDS_MeshNode *n3, const SMDS_MeshNode *n12, const SMDS_MeshNode *n23, const SMDS_MeshNode *n31, bool force3d)
 Return existing or create a new central node for a quadratic triangle given its 6 nodes. More...
 
std::pair< int, TopAbs_ShapeEnum > GetMediumPos (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const bool useCurSubShape=false, TopAbs_ShapeEnum expectedSupport=TopAbs_SHAPE)
 Return index and type of the shape (EDGE or FACE only) to set a medium node on. More...
 
void AddTLinkNode (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const SMDS_MeshNode *n12)
 Add a link in my data structure. More...
 
void AddTLinkNodeMap (const TLinkNodeMap &aMap)
 Add many links in my data structure. More...
 
bool AddTLinks (const SMDS_MeshEdge *edge)
 Add quadratic links of edge to own data structure. More...
 
bool AddTLinks (const SMDS_MeshFace *face)
 Add quadratic links of face to own data structure. More...
 
bool AddTLinks (const SMDS_MeshVolume *vol)
 Add quadratic links of volume to own data structure. More...
 
const TLinkNodeMapGetTLinkNodeMap () const
 Returns myTLinkNodeMap. More...
 
MType IsQuadraticMesh ()
 
virtual ~SMESH_MesherHelper ()
 

Static Public Member Functions

static bool IsSameElemGeometry (const SMESHDS_SubMesh *smDS, SMDSAbs_GeometryType shape, const bool nullSubMeshRes=true)
 Returns true if all elements of a sub-mesh are of same shape. More...
 
static bool LoadNodeColumns (TParam2ColumnMap &theParam2ColumnMap, const TopoDS_Face &theFace, const std::list< TopoDS_Edge > &theBaseSide, SMESHDS_Mesh *theMesh, SMESH_ProxyMesh *theProxyMesh=0)
 Load nodes bound to face into a map of node columns. More...
 
static bool LoadNodeColumns (TParam2ColumnMap &theParam2ColumnMap, const TopoDS_Face &theFace, const TopoDS_Edge &theBaseEdge, SMESHDS_Mesh *theMesh, SMESH_ProxyMesh *theProxyMesh=0)
 Variant of LoadNodeColumns() above with theBaseSide given by one edge. More...
 
static bool IsStructured (SMESH_subMesh *faceSM)
 Return true if 2D mesh on FACE is structured. More...
 
static bool IsDistorted2D (SMESH_subMesh *faceSM, bool checkUV=false, SMESH_MesherHelper *faceHelper=NULL)
 Return true if 2D mesh on FACE is distored. More...
 
static bool IsMedium (const SMDS_MeshNode *node, const SMDSAbs_ElementType typeToCheck=SMDSAbs_All)
 Returns true if given node is medium. More...
 
static TopoDS_Shape GetSubShapeByNode (const SMDS_MeshNode *node, const SMESHDS_Mesh *meshDS)
 Return support shape of a node. More...
 
static int WrapIndex (int ind, const int nbNodes)
 Return a valid node index, fixing the given one if necessary. More...
 
static gp_XY calcTFI (double x, double y, const gp_XY &a0, const gp_XY &a1, const gp_XY &a2, const gp_XY &a3, const gp_XY &p0, const gp_XY &p1, const gp_XY &p2, const gp_XY &p3)
 Return UV of a point inside a quadrilateral FACE by it's normalized parameters within a unit quadrangle and the corresponding projections on sub-shapes of the real-world FACE. More...
 
static gp_XYZ calcTFI (double x, double y, const gp_XYZ &a0, const gp_XYZ &a1, const gp_XYZ &a2, const gp_XYZ &a3, const gp_XYZ &p0, const gp_XYZ &p1, const gp_XYZ &p2, const gp_XYZ &p3)
 Same as "gp_XY calcTFI(...)" but in 3D. More...
 
static int Count (const TopoDS_Shape &shape, const TopAbs_ShapeEnum type, const bool ignoreSame)
 Count nb of sub-shapes. 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 PShapeIteratorPtr GetAncestors (const TopoDS_Shape &shape, const SMESH_Mesh &mesh, TopAbs_ShapeEnum ancestorType, const TopoDS_Shape *container=0)
 Return iterator on ancestors of the given type, included into a container shape. More...
 
static TopoDS_Shape GetCommonAncestor (const TopoDS_Shape &shape1, const TopoDS_Shape &shape2, const SMESH_Mesh &mesh, TopAbs_ShapeEnum ancestorType)
 Find a common ancestor, of the given type, of two shapes. More...
 
static TopAbs_Orientation GetSubShapeOri (const TopoDS_Shape &shape, const TopoDS_Shape &subShape)
 Return orientation of sub-shape in the main shape. More...
 
static bool IsSubShape (const TopoDS_Shape &shape, const TopoDS_Shape &mainShape)
 
static bool IsSubShape (const TopoDS_Shape &shape, SMESH_Mesh *aMesh)
 
static bool IsBlock (const TopoDS_Shape &shape)
 
static double MaxTolerance (const TopoDS_Shape &shape)
 Return maximal tolerance of shape. More...
 
static double GetAngle (const TopoDS_Edge &E1, const TopoDS_Edge &E2, const TopoDS_Face &F, const TopoDS_Vertex &V, gp_Vec *faceNormal=0)
 Return an angle between two EDGEs sharing a common VERTEX with reference of the FACE normal. More...
 
static bool IsClosedEdge (const TopoDS_Edge &anEdge)
 Check if the first and last vertices of an edge are the same. More...
 
static TopoDS_Vertex IthVertex (const bool is2nd, TopoDS_Edge anEdge, const bool CumOri=true)
 Wrapper over TopExp::FirstVertex() and TopExp::LastVertex() fixing them in the case of INTERNAL edge. More...
 
static TopAbs_ShapeEnum GetGroupType (const TopoDS_Shape &group, const bool avoidCompound=false)
 Return type of shape contained in a group. More...
 
static TopoDS_Shape GetShapeOfHypothesis (const SMESHDS_Hypothesis *hyp, const TopoDS_Shape &shape, SMESH_Mesh *mesh)
 Returns a shape, to which a hypothesis used to mesh a given shape is assigned. 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...
 
static gp_XY GetCenterUV (const gp_XY &uv1, const gp_XY &uv2, const gp_XY &uv3, const gp_XY &uv12, const gp_XY &uv23, const gp_XY &uv31, bool *isBadTria=0)
 Return UV for the central node of a biquadratic triangle. More...
 
static gp_XY ApplyIn2D (Handle(Geom_Surface) surface, const gp_XY &uv1, const gp_XY &uv2, xyFunPtr fun, const bool resultInPeriod=true)
 Perform given operation on two 2d points in parameric space of given surface. More...
 
static void WriteShape (const TopoDS_Shape &s)
 DEBUG. 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...
 
const SMDS_MeshNodegetMediumNodeOnComposedWire (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, bool force3d)
 Makes a medium node if nodes reside different edges. More...
 
double getFaceMaxTol (const TopoDS_Shape &face) const
 Return MaxTolerance( face ), probably cached. More...
 

Private Types

typedef std::map< int, Handle(ShapeAnalysis_Surface)> TID2Surface
 
typedef std::map< int,
GeomAPI_ProjectPointOnSurf * > 
TID2ProjectorOnSurf
 
typedef std::map< int,
GeomAPI_ProjectPointOnCurve * > 
TID2ProjectorOnCurve
 

Private Member Functions

 SMESH_MesherHelper (const SMESH_MesherHelper &theOther)
 
bool toCheckPosOnShape (int shapeID) const
 Return true if position of nodes on the shape hasn't yet been checked or the positions proved to be invalid. More...
 
void setPosOnShapeValidity (int shapeID, bool ok) const
 Set validity of positions of nodes on the shape. More...
 

Private Attributes

TLinkNodeMap myTLinkNodeMap
 
std::map< TBiQuad, const
SMDS_MeshNode * > 
myMapWithCentralNode
 
std::set< intmyDegenShapeIds
 
std::set< intmySeamShapeIds
 
double myPar1 [2]
 
double myPar2 [2]
 
int myParIndex
 
std::map< int, double > myFaceMaxTol
 
TID2Surface myFace2Surface
 
TID2ProjectorOnSurf myFace2Projector
 
TID2ProjectorOnCurve myEdge2Projector
 
TopoDS_Shape myShape
 
SMESH_MeshmyMesh
 
int myShapeID
 
bool myCreateQuadratic
 
bool myCreateBiQuadratic
 
bool mySetElemOnShape
 
bool myFixNodeParameters
 
std::map< int, boolmyNodePosShapesValidity
 

Detailed Description

It helps meshers to add elements and provides other utilities.

  • It allows meshers not to care about creation of medium nodes when filling a quadratic mesh. Helper does it itself. It defines order of elements to create when IsQuadraticSubMesh() is called.
  • It provides information on a shape it is initialized with: periodicity, presence of singularities etc.
  • ...

Member Typedef Documentation

typedef std::map< int, GeomAPI_ProjectPointOnCurve* > SMESH_MesherHelper::TID2ProjectorOnCurve
private
typedef std::map< int, GeomAPI_ProjectPointOnSurf* > SMESH_MesherHelper::TID2ProjectorOnSurf
private
typedef std::map< int, Handle(ShapeAnalysis_Surface)> SMESH_MesherHelper::TID2Surface
private

Member Enumeration Documentation

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 

Constructor & Destructor Documentation

SMESH_MesherHelper::SMESH_MesherHelper ( SMESH_Mesh theMesh)

Constructor.

References myMesh, myPar1, myPar2, and mySetElemOnShape.

SMESH_MesherHelper::~SMESH_MesherHelper ( )
virtual
SMESH_MesherHelper::SMESH_MesherHelper ( const SMESH_MesherHelper theOther)
private

Member Function Documentation

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 
)
SMDS_MeshVolume * SMESH_MesherHelper::AddPolyhedralVolume ( const std::vector< const SMDS_MeshNode * > &  nodes,
const std::vector< int > &  quantities,
const int  ID = 0,
const bool  force3d = true 
)
void SMESH_MesherHelper::AddTLinkNode ( const SMDS_MeshNode n1,
const SMDS_MeshNode n2,
const SMDS_MeshNode n12 
)

Add a link in my data structure.

References myTLinkNodeMap.

Referenced by AddTLinks(), and IsQuadraticSubMesh().

void SMESH_MesherHelper::AddTLinkNodeMap ( const TLinkNodeMap aMap)

Add many links in my data structure.

bool SMESH_MesherHelper::AddTLinks ( const SMDS_MeshFace face)

Add quadratic links of face to own data structure.

References AddTLinkNode(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::IsPoly(), and SMDS_MeshElement::NbNodes().

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 
)
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 
)
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 SMDS_MeshNode n9,
const SMDS_MeshNode n10,
const SMDS_MeshNode n11,
const SMDS_MeshNode n12,
const int  id = 0,
bool  force3d = true 
)
void SMESH_MesherHelper::AdjustByPeriod ( const TopoDS_Face &  face,
gp_XY  uv[],
const int  nbUV 
)

Move node positions on a FACE within surface period.

Parameters
[in]face- the FACE
[in,out]uv- node positions to adjust
[in]nbUV- nb of uv

References GetPeriodicIndex(), myMesh, myPar1, myPar2, myShape, and SetSubShape().

Referenced by FixQuadraticElements(), and GetCentralNode().

gp_XY SMESH_MesherHelper::ApplyIn2D ( Handle(Geom_Surface)  surface,
const gp_XY &  uv1,
const gp_XY &  uv2,
xyFunPtr  fun,
const bool  resultInPeriod = true 
)
static

Perform given operation on two 2d points in parameric space of given surface.

It takes into account period of the surface. Use gp_XY_FunPtr macro to easily define pointer to function of gp_XY class.

References SMESH::DownCast(), and Handle().

Referenced by FixQuadraticElements(), and GetMiddleUV().

gp_XY SMESH_MesherHelper::calcTFI ( double  x,
double  y,
const gp_XY &  a0,
const gp_XY &  a1,
const gp_XY &  a2,
const gp_XY &  a3,
const gp_XY &  p0,
const gp_XY &  p1,
const gp_XY &  p2,
const gp_XY &  p3 
)
static

Return UV of a point inside a quadrilateral FACE by it's normalized parameters within a unit quadrangle and the corresponding projections on sub-shapes of the real-world FACE.

   The used calculation method is called Trans-Finite Interpolation (TFI).
Parameters
x,y- normalized parameters that should be in range [0,1]
a0,a1,a2,a3- UV of VERTEXes of the FACE == projections on VERTEXes
p0,p1,p2,p3- UV of the point projections on EDGEs of the FACE
Returns
gp_XY - UV of the point on the FACE

Y ^ Order of those UV in the FACE is as follows. | a3 p2 a2 o—x--—o | : | | :UV | p3 x...O.....x p1 | : | o—x--—o -—> X a0 p0 a1

Referenced by FixQuadraticElements(), GetCentralNode(), SMESH_MeshEditor::QuadTo4Tri(), and VISCOUS_3D::_SmoothNode::Smooth().

gp_XYZ SMESH_MesherHelper::calcTFI ( double  x,
double  y,
const gp_XYZ &  a0,
const gp_XYZ &  a1,
const gp_XYZ &  a2,
const gp_XYZ &  a3,
const gp_XYZ &  p0,
const gp_XYZ &  p1,
const gp_XYZ &  p2,
const gp_XYZ &  p3 
)
static

Same as "gp_XY calcTFI(...)" but in 3D.

bool SMESH_MesherHelper::CheckNodeU ( const TopoDS_Edge &  E,
const SMDS_MeshNode n,
double &  u,
const double  tol,
const bool  force = false,
double  distXYZ[4] = 0 
) const
bool SMESH_MesherHelper::CheckNodeUV ( const TopoDS_Face &  F,
const SMDS_MeshNode n,
gp_XY &  uv,
const double  tol,
const bool  force = false,
double  distXYZ[4] = 0 
) const

Check and fix node UV on a face.

Parameters
force- check even if checks of other nodes on this face passed OK
distXYZ- returns result distance and point coordinates
Return values
bool- false if UV is bad and could not be fixed

References GetProjector(), SMDS_MeshElement::getshapeId(), Handle(), MESSAGE, myFixNodeParameters, myShape, myShapeID, setPosOnShapeValidity(), and toCheckPosOnShape().

Referenced by StdMeshers_Import_1D2D::Compute(), StdMeshers_Import_1D2D::Evaluate(), FixQuadraticElements(), GetMediumNode(), GetNodeUV(), VISCOUS_3D::_LayerEdge::SetNewLength(), VISCOUS_3D::_LayerEdge::SmoothOnEdge(), SMESH_MeshEditor::SplitVolumes(), and StdMeshers_PrismAsBlock::TPCurveOnHorFaceAdaptor::TPCurveOnHorFaceAdaptor().

void SMESH_MesherHelper::CopySubShapeInfo ( const SMESH_MesherHelper other)

Copy shape information from another helper to improve performance since SetSubShape() can be time consuming if there are many edges.

Copy shape information from another helper.

Used to improve performance since SetSubShape() can be time consuming if there are many edges

References myDegenShapeIds, myFace2Surface, myPar1, myPar2, myParIndex, mySeamShapeIds, myShape, and myShapeID.

Referenced by StdMeshers_Quadrangle_2D::getCorners(), StdMeshers_FaceSide::GetFaceWires(), IsDistorted2D(), and StdMeshers_FaceSide::StdMeshers_FaceSide().

int SMESH_MesherHelper::Count ( const TopoDS_Shape &  shape,
const TopAbs_ShapeEnum  type,
const bool  ignoreSame 
)
static
void SMESH_MesherHelper::FixQuadraticElements ( SMESH_ComputeErrorPtr compError,
bool  volumeOnly = true 
)

Move medium nodes of faces and volumes to fix distorted elements.

Parameters
error- container of fixed distorted elements
volumeOnly- fix nodes on geom faces or not if the shape is solid
error- container of fixed distorted elements
volumeOnly- to fix nodes on faces or not, if the shape is solid

Issue 0020307: EDF 992 SMESH : Linea/Quadratic with Medium Node on Geometry

References AdjustByPeriod(), ApplyIn2D(), SMDS_MeshElement::begin_nodes(), calcTFI(), CheckNodeUV(), EDITERR_NO_MEDIUM_ON_GEOM, SMDS_MeshElement::end_nodes(), Face, SMDS_Mesh::FindFace(), FixQuadraticElements(), GetCenterUV(), SMDS_MeshElement::GetEntityType(), SMDS_VolumeTool::GetFaceNodes(), GetMeshDS(), GetMiddleUV(), SMDS_MeshElement::GetNode(), SMDS_VolumeTool::GetNodes(), GetNodeUV(), SMDS_MeshElement::getshapeId(), GetSubShape(), GetSubShapeByNode(), Handle(), SMESH_Block::ID_E00z, SMESH_Block::ID_E01z, SMESH_Block::ID_E0y0, SMESH_Block::ID_E0y1, SMESH_Block::ID_E10z, SMESH_Block::ID_E11z, SMESH_Block::ID_E1y0, SMESH_Block::ID_E1y1, SMESH_Block::ID_Ex00, SMESH_Block::ID_Ex01, SMESH_Block::ID_Ex10, SMESH_Block::ID_Ex11, SMESH_Block::ID_F0yz, SMESH_Block::ID_F1yz, SMESH_Block::ID_Fx0z, SMESH_Block::ID_Fx1z, SMESH_Block::ID_Fxy0, SMESH_Block::ID_Fxy1, SMESH_Block::ID_Shell, SMESH_Block::ID_V000, SMESH_Block::ID_V001, SMESH_Block::ID_V010, SMESH_Block::ID_V011, SMESH_Block::ID_V100, SMESH_Block::ID_V101, SMESH_Block::ID_V110, SMESH_Block::ID_V111, SMESHDS_Mesh::IndexToShape(), SMDS_MeshElement::IsQuadratic(), SMDS_VolumeTool::MinLinearSize2(), SMESHDS_Mesh::MoveNode(), MSG, MSGBEG, myMesh, myShape, myShapeID, SMDS_MeshElement::NbCornerNodes(), SMDS_VolumeTool::NbFaceNodes(), SMDS_VolumeTool::NbFaces(), SMDS_MeshElement::NbNodes(), SMDS_VolumeTool::Set(), SetSubShape(), ShapeToIndex(), SMESH_Block::ShellPoint(), SMDS_TOP_3DSPACE, SMDS_TOP_EDGE, SMDS_TOP_FACE, SMDSAbs_All, SMDSAbs_Face, SMDSAbs_Volume, SMDSEntity_BiQuad_Quadrangle, SMDSEntity_BiQuad_Triangle, SMDSEntity_TriQuad_Hexa, ToFixNodeParameters(), and SMDS_MeshNode::X().

Referenced by SMESH_MeshEditor::ConvertToQuadratic(), and FixQuadraticElements().

double SMESH_MesherHelper::GetAngle ( const TopoDS_Edge &  theE1,
const TopoDS_Edge &  theE2,
const TopoDS_Face &  theFace,
const TopoDS_Vertex &  theCommonV,
gp_Vec *  theFaceNormal = 0 
)
static

Return an angle between two EDGEs sharing a common VERTEX with reference of the FACE normal.

Returns
double - the angle (between -Pi and Pi), negative if the angle is concave, 1e100 in case of failure
Warning
Care about order of the EDGEs and their orientation to be as they are within the FACE! Don't pass degenerated EDGEs neither!

References Abs(), and Handle().

Referenced by VISCOUS_3D::getConcaveVertices(), StdMeshers_Quadrangle_2D::getCorners(), and VISCOUS_3D::getFaceDir().

gp_XY SMESH_MesherHelper::GetCenterUV ( const gp_XY &  uv1,
const gp_XY &  uv2,
const gp_XY &  uv3,
const gp_XY &  uv12,
const gp_XY &  uv23,
const gp_XY &  uv31,
bool isBadTria = 0 
)
static

Return UV for the central node of a biquadratic triangle.

Referenced by FixQuadraticElements(), and GetCentralNode().

const SMDS_MeshNode * SMESH_MesherHelper::GetCentralNode ( const SMDS_MeshNode n1,
const SMDS_MeshNode n2,
const SMDS_MeshNode n3,
const SMDS_MeshNode n4,
const SMDS_MeshNode n12,
const SMDS_MeshNode n23,
const SMDS_MeshNode n34,
const SMDS_MeshNode n41,
bool  force3d 
)

Return existing or create a new central node for a quardilateral quadratic face given its 8 nodes.

Parameters
force3d- true means node creation in between the given nodes, else node position is found on a geometrical face if any.

References SMESHDS_Mesh::AddNode(), AdjustByPeriod(), calcTFI(), Face, faceID, GetAncestors(), GetMesh(), GetMeshDS(), GetNodeUV(), SMDS_MeshElement::getshapeId(), GetSubShapeByNode(), Handle(), HasDegeneratedEdges(), SMESHDS_Mesh::IndexToShape(), myMapWithCentralNode, mySetElemOnShape, myShapeID, SMESHDS_Mesh::SetMeshElementOnShape(), SMESHDS_Mesh::SetNodeInVolume(), SMESHDS_Mesh::SetNodeOnFace(), and SMESHDS_Mesh::ShapeToIndex().

Referenced by AddFace(), AddVolume(), and SMESH_MeshEditor::QuadToTri().

const SMDS_MeshNode * SMESH_MesherHelper::GetCentralNode ( const SMDS_MeshNode n1,
const SMDS_MeshNode n2,
const SMDS_MeshNode n3,
const SMDS_MeshNode n12,
const SMDS_MeshNode n23,
const SMDS_MeshNode n31,
bool  force3d 
)

Return existing or create a new central node for a quadratic triangle given its 6 nodes.

Parameters
force3d- true means node creation in between the given nodes, else node position is found on a geometrical face if any.

References SMESHDS_Mesh::AddNode(), AdjustByPeriod(), Face, faceID, GetAncestors(), GetCenterUV(), GetMesh(), GetMeshDS(), GetNodeUV(), SMDS_MeshElement::getshapeId(), GetSubShapeByNode(), Handle(), SMESHDS_Mesh::IndexToShape(), myMapWithCentralNode, mySetElemOnShape, myShapeID, SMESHDS_Mesh::SetMeshElementOnShape(), SMESHDS_Mesh::SetNodeInVolume(), SMESHDS_Mesh::SetNodeOnFace(), and SMESHDS_Mesh::ShapeToIndex().

TopoDS_Shape SMESH_MesherHelper::GetCommonAncestor ( const TopoDS_Shape &  shape1,
const TopoDS_Shape &  shape2,
const SMESH_Mesh mesh,
TopAbs_ShapeEnum  ancestorType 
)
static
double SMESH_MesherHelper::getFaceMaxTol ( const TopoDS_Shape &  face) const
protected

Return MaxTolerance( face ), probably cached.

References faceID, GetMeshDS(), MaxTolerance(), me, myFaceMaxTol, and SMESHDS_Mesh::ShapeToIndex().

Referenced by GetMediumNode(), and GetNodeUV().

SMESH_Gen * SMESH_MesherHelper::GetGen ( ) const

Return SMESH_Gen.

References GetMesh().

TopAbs_ShapeEnum SMESH_MesherHelper::GetGroupType ( const TopoDS_Shape &  group,
const bool  avoidCompound = false 
)
static

Return type of shape contained in a group.

Parameters
group- a shape of type TopAbs_COMPOUND
avoidCompound- not to return TopAbs_COMPOUND

Referenced by getSubMeshes().

bool SMESH_MesherHelper::GetIsBiQuadratic ( ) const

Return myCreateBiQuadratic flag.

Referenced by SMESH_MeshEditor::convertElemToQuadratic().

bool SMESH_MesherHelper::GetIsQuadratic ( ) const

Return myCreateQuadratic flag.

Referenced by SMESH_MeshEditor::QuadTo4Tri().

const SMDS_MeshNode * SMESH_MesherHelper::GetMediumNode ( const SMDS_MeshNode n1,
const SMDS_MeshNode n2,
const bool  force3d,
TopAbs_ShapeEnum  expectedSupport = TopAbs_SHAPE 
)

Return existing or create new medium nodes between given ones.

Parameters
force3d- true means node creation at the middle between the two given nodes, else node position is found on its supporting geometrical shape, if any.
expectedSupport- shape type corresponding to element being created , e.g TopAbs_EDGE if SMDSAbs_Edge is created basing on n1 and n2

References SMESHDS_Mesh::AddNode(), CheckNodeU(), CheckNodeUV(), Edge, Face, faceID, getFaceMaxTol(), getMediumNodeOnComposedWire(), GetMediumPos(), GetMeshDS(), GetMiddleUV(), GetNodeU(), GetNodeUV(), SMDS_MeshNode::GetPosition(), SMDS_MeshElement::getshapeId(), SMDS_Position::GetTypeOfPosition(), Handle(), HasDegeneratedEdges(), SMESHDS_Mesh::IndexToShape(), IsDegenShape(), IsSeamShape(), myParIndex, mySetElemOnShape, myShape, myShapeID, myTLinkNodeMap, SMESHDS_Mesh::SetMeshElementOnShape(), SMESHDS_Mesh::SetNodeOnEdge(), SMESHDS_Mesh::SetNodeOnFace(), SMDS_TOP_EDGE, SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().

Referenced by AddEdge(), AddFace(), AddPolygonalFace(), AddPolyhedralVolume(), and AddVolume().

const SMDS_MeshNode * SMESH_MesherHelper::getMediumNodeOnComposedWire ( const SMDS_MeshNode n1,
const SMDS_MeshNode n2,
bool  force3d 
)
protected
std::pair< int, TopAbs_ShapeEnum > SMESH_MesherHelper::GetMediumPos ( const SMDS_MeshNode n1,
const SMDS_MeshNode n2,
const bool  useCurSubShape = false,
TopAbs_ShapeEnum  expectedSupport = TopAbs_SHAPE 
)
gp_XY SMESH_MesherHelper::GetMiddleUV ( const Handle(Geom_Surface)&  surface,
const gp_XY &  uv1,
const gp_XY &  uv2 
)
static

Return middle UV taking in account surface period.

References ApplyIn2D().

Referenced by FixQuadraticElements(), GetMediumNode(), and SMESH_MeshEditor::QuadTo4Tri().

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.

Parameters
inFaceNode- a node of element being created located inside a face
check- if provided, returns result of UV check that it enforces

References Abs(), CheckNodeUV(), Edge, getFaceMaxTol(), GetMeshDS(), SMDS_MeshNode::GetPosition(), SMDS_MeshElement::getshapeId(), SMDS_Position::GetTypeOfPosition(), SMDS_EdgePosition::GetUParameter(), SMDS_FacePosition::GetUParameter(), getUVOnSeam(), SMDS_FacePosition::GetVParameter(), Handle(), IsSeamShape(), IsSubShape(), IthVertex(), MESSAGE, myMesh, myShape, SetSubShape(), ShapeToIndex(), SMDS_TOP_EDGE, SMDS_TOP_FACE, and SMDS_TOP_VERTEX.

Referenced by SMESH_Pattern::Apply(), StdMeshers_Projection_2D::Compute(), StdMeshers_Import_1D2D::Compute(), VISCOUS_3D::_LayerEdge::Copy(), StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), FixQuadraticElements(), VISCOUS_3D::_ConvexFace::GetCenterOfCurvature(), GetCentralNode(), VISCOUS_3D::getFaceDir(), VISCOUS_3D::_ViscousBuilder::getFaceNormal(), GetMediumNode(), StdMeshers_PrismAsBlock::TSideFace::GetNodeUV(), SMESH_MeshEditor::InverseDiag(), VISCOUS_3D::_Simplex::IsForward(), IsReversedSubMesh(), VISCOUS_3D::_ViscousBuilder::limitStepSizeByCurvature(), StdMeshers_Penta_3D::MakeNodes(), SMESH_MeshEditor::QuadTo4Tri(), VISCOUS_2D::_ViscousBuilder2D::refine(), VISCOUS_3D::_ViscousBuilder::refine(), VISCOUS_3D::_ViscousBuilder::setEdgeData(), VISCOUS_3D::_LayerEdge::SetNewLength2d(), VISCOUS_3D::_ViscousBuilder::shrink(), VISCOUS_3D::_SmoothNode::Smooth(), StdMeshers_PrismAsBlock::TPCurveOnHorFaceAdaptor::TPCurveOnHorFaceAdaptor(), and StdMeshers_PrismAsBlock::TSideFace::Value().

bool SMESH_MesherHelper::GetNodeUVneedInFaceNode ( const TopoDS_Face &  F = TopoDS_Face()) const

Check if inFaceNode argument is necessary for call GetNodeUV(F,..)

Return values
bool- return true if the face is periodic

If F is Null, answer about subshape set through IsQuadraticSubMesh() or SetSubShape()

References Handle(), mySeamShapeIds, and myShape.

Referenced by SMESH_Pattern::Apply().

double SMESH_MesherHelper::GetOtherParam ( const double  param) const

Return an alternative parameter for a node on seam.

References myPar1, myPar2, and myParIndex.

Referenced by StdMeshers_Import_1D2D::Compute(), and VISCOUS_3D::_Smoother1D::smoothAnalyticEdge().

int SMESH_MesherHelper::GetPeriodicIndex ( ) const

Return index of periodic parametric direction of a closed face.

Return values
int- 1 for U, 2 for V direction

Referenced by AdjustByPeriod(), StdMeshers_Import_1D2D::Compute(), VISCOUS_2D::_ViscousBuilder2D::refine(), and VISCOUS_3D::_Smoother1D::smoothAnalyticEdge().

GeomAPI_ProjectPointOnSurf & SMESH_MesherHelper::GetProjector ( const TopoDS_Face &  F,
TopLoc_Location &  loc,
double  tol = 0 
) const
TopoDS_Shape SMESH_MesherHelper::GetShapeOfHypothesis ( const SMESHDS_Hypothesis hyp,
const TopoDS_Shape &  shape,
SMESH_Mesh mesh 
)
static

Returns a shape, to which a hypothesis used to mesh a given shape is assigned.

Parameters
[in]hyp- the hypothesis
[in]shape- the shape, for meshing which the hyp is used
[in]mesh- the mesh
Returns
TopoDS_Shape - the shape the hyp is assigned to

References SMESH_HypoFilter::Is().

Referenced by SMESH_subMesh::cleanDependsOn().

TopAbs_Orientation SMESH_MesherHelper::GetSubShapeOri ( const TopoDS_Shape &  shape,
const TopoDS_Shape &  subShape 
)
static
const TLinkNodeMap& SMESH_MesherHelper::GetTLinkNodeMap ( ) const

Returns myTLinkNodeMap.

gp_Pnt2d SMESH_MesherHelper::getUVOnSeam ( const gp_Pnt2d &  uv1,
const gp_Pnt2d &  uv2 
) const
protected

Select UV on either of 2 pcurves of a seam edge, closest to the given UV.

Parameters
uv1- UV on the seam
uv2- UV within a face
Return values
gp_Pnt2d- selected UV

References Abs(), myPar1, myPar2, and myParIndex.

Referenced by GetNodeUV().

SMESH_MesherHelper::Handle ( ShapeAnalysis_Surface  ) const
bool SMESH_MesherHelper::HasDegeneratedEdges ( ) const

Check if the shape set through IsQuadraticSubMesh() or SetSubShape() has a degenerated edges.

Return values
bool- true if it has

Referenced by StdMeshers_Projection_2D::Compute(), GetCentralNode(), GetMediumNode(), and VISCOUS_3D::_ViscousBuilder::refine().

bool SMESH_MesherHelper::HasRealSeam ( ) const

Check if the shape set through IsQuadraticSubMesh() or SetSubShape() has a seam edge that encounters twice in a wire.

Return values
bool- true if it has

Referenced by StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), and VISCOUS_3D::_ViscousBuilder::limitStepSizeByCurvature().

bool SMESH_MesherHelper::HasSeam ( ) const

Check if the shape set through IsQuadraticSubMesh() or SetSubShape() has a seam edge, i.e.

an edge that has two parametric representations on a surface

Return values
bool- true if it has

Referenced by StdMeshers_Projection_1D2D::Compute(), and StdMeshers_Import_1D2D::Compute().

bool SMESH_MesherHelper::IsBlock ( const TopoDS_Shape &  shape)
static
bool SMESH_MesherHelper::IsClosedEdge ( const TopoDS_Edge &  anEdge)
static
bool SMESH_MesherHelper::IsDegenShape ( const int  subShape) const

Check if shape is a degenerated edge or it's vertex.

Parameters
subShape- edge or vertex index in SMESHDS
Return values
bool- true if subShape is a degenerated shape

It works only if IsQuadraticSubMesh() or SetSubShape() has been called

Referenced by StdMeshers_Projection_2D::Compute(), VISCOUS_3D::_ViscousBuilder::getFaceNormal(), GetMediumNode(), VISCOUS_3D::_ViscousBuilder::makeLayer(), and StdMeshers_FaceSide::NbPoints().

bool SMESH_MesherHelper::IsDistorted2D ( SMESH_subMesh faceSM,
bool  checkUV = false,
SMESH_MesherHelper faceHelper = NULL 
)
static

Return true if 2D mesh on FACE is distored.

References SMDS_MeshElement::begin_nodes(), CopySubShapeInfo(), Face, and SMDS_MeshElement::NbCornerNodes().

Referenced by StdMeshers_Projection_2D::Compute().

bool SMESH_MesherHelper::IsMedium ( const SMDS_MeshNode node,
const SMDSAbs_ElementType  typeToCheck = SMDSAbs_All 
)
static

Returns true if given node is medium.

Parameters
n- node to check
typeToCheck- type of elements containing the node to ask about node status
Return values
bool- check result

References SMESH_MeshEditor::IsMedium().

Referenced by StdMeshers_Projection_1D::Compute(), SMESH_MeshEditor::FindCoincidentNodes(), StdMeshers_Penta_3D::FindNodeOnShape(), fixCommonVertexUV(), SMESH_Algo::GetSortedNodesOnEdge(), SMESH_Mesh_i::IsMediumNodeOfAnyElem(), StdMeshers_Penta_3D::LoadIJNodes(), StdMeshers_Penta_3D::MakeMeshOnFxy1(), and StdMeshers_Penta_3D::MakeNodes().

int SMESH_MesherHelper::IsOnSeam ( const gp_XY &  uv) const

Check if UV is on seam.

Return 0 if not, 1 for U seam, 2 for V seam

References Abs(), myPar1, myPar2, and myParIndex.

SMESH_MesherHelper::MType SMESH_MesherHelper::IsQuadraticMesh ( )
bool SMESH_MesherHelper::IsRealSeam ( const int  subShape) const
bool SMESH_MesherHelper::IsRealSeam ( const TopoDS_Shape &  subShape) const

Return true if an edge or a vertex encounters twice in face wire.

Parameters
subShape- edge or vertex

References IsRealSeam().

Referenced by IsRealSeam().

bool SMESH_MesherHelper::IsSameElemGeometry ( const SMESHDS_SubMesh smDS,
SMDSAbs_GeometryType  shape,
const bool  nullSubMeshRes = true 
)
static

Returns true if all elements of a sub-mesh are of same shape.

Parameters
smDS- sub-mesh to check elements of
shape- expected shape of elements
nullSubMeshRes- result value for the case of smDS == NULL
Return values
bool- check result

References SMESHDS_SubMesh::GetElements(), and SMDS_MeshElement::GetGeomType().

Referenced by StdMeshers_Hexa_3D::Compute(), and StdMeshers_Prism_3D::Compute().

bool SMESH_MesherHelper::IsSeamShape ( const int  subShape) const

Check if shape is a seam edge or it's vertex.

Parameters
subShape- edge or vertex index in SMESHDS
Return values
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

Referenced by SMESH_Pattern::Apply(), StdMeshers_Import_1D2D::Evaluate(), StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), GetMediumNode(), GetNodeUV(), VISCOUS_3D::_ViscousBuilder::setEdgeData(), and SetSubShape().

bool SMESH_MesherHelper::IsSeamShape ( const TopoDS_Shape &  subShape) const

Check if shape is a seam edge or it's vertex.

Parameters
subShape- edge or vertex
Return values
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

References IsSeamShape().

Referenced by IsSeamShape().

bool SMESH_MesherHelper::IsStructured ( SMESH_subMesh faceSM)
static
bool SMESH_MesherHelper::IsSubShape ( const TopoDS_Shape &  shape,
SMESH_Mesh aMesh 
)
static
bool SMESH_MesherHelper::LoadNodeColumns ( TParam2ColumnMap theParam2ColumnMap,
const TopoDS_Face &  theFace,
const std::list< TopoDS_Edge > &  theBaseSide,
SMESHDS_Mesh theMesh,
SMESH_ProxyMesh theProxyMesh = 0 
)
static

Load nodes bound to face into a map of node columns.

Parameters
theParam2ColumnMap- map of node columns to fill
theFace- the face on which nodes are searched for
theBaseSide- the edges holding nodes on which columns' bases
theMesh- the mesh containing nodes
Return values
bool- false if something is wrong

The key of the map is a normalized parameter of each base node on theBaseSide. Edges in theBaseSide must be sequenced. This method works in supposition that nodes on the face forms a structured grid and elements can be quardrangles or triangles

References SMESHDS_SubMesh::Contains(), SMESH_Algo::EdgeLength(), SMESH_MeshAlgos::FindFaceInSet(), SMESHDS_SubMesh::GetElements(), SMDS_MeshElement::GetNode(), SMESH_ProxyMesh::GetProxyNode(), SMESH_Algo::GetSortedNodesOnEdge(), SMESH_ProxyMesh::GetSubMesh(), SMESH_ProxyMesh::IsTemporary(), SMESHDS_Mesh::MeshElements(), SMESHDS_SubMesh::NbElements(), and second.

Referenced by StdMeshers_Hexa_3D::Compute(), StdMeshers_PrismAsBlock::Init(), and LoadNodeColumns().

bool SMESH_MesherHelper::LoadNodeColumns ( TParam2ColumnMap theParam2ColumnMap,
const TopoDS_Face &  theFace,
const TopoDS_Edge &  theBaseEdge,
SMESHDS_Mesh theMesh,
SMESH_ProxyMesh theProxyMesh = 0 
)
static

Variant of LoadNodeColumns() above with theBaseSide given by one edge.

References LoadNodeColumns().

double SMESH_MesherHelper::MaxTolerance ( const TopoDS_Shape &  shape)
static
int SMESH_MesherHelper::NbAncestors ( const TopoDS_Shape &  shape,
const SMESH_Mesh mesh,
TopAbs_ShapeEnum  ancestorType = TopAbs_SHAPE 
)
static
void SMESH_MesherHelper::SetIsBiQuadratic ( const bool  theBuildBiQuadratic)

Set myCreateBiQuadratic flag.

Referenced by SMESH_MeshEditor::ConvertToQuadratic(), and SMESH_MeshEditor::QuadTo4Tri().

void SMESH_MesherHelper::SetIsQuadratic ( const bool  theBuildQuadratic)

Set order of elements to create without calling IsQuadraticSubMesh()

Referenced by SMESH_MeshEditor::ConvertToQuadratic(), and SMESH_MeshEditor::QuadTo4Tri().

void SMESH_MesherHelper::setPosOnShapeValidity ( int  shapeID,
bool  ok 
) const
private

Set validity of positions of nodes on the shape.

Once set, validity is not changed

Referenced by CheckNodeU(), CheckNodeUV(), and SetSubShape().

void SMESH_MesherHelper::SetSubShape ( const int  subShapeID)

Set shape to make elements on without calling IsQuadraticSubMesh()

References GetMeshDS(), and myShapeID.

Referenced by VISCOUS_2D::_ViscousBuilder2D::_ViscousBuilder2D(), VISCOUS_3D::_ViscousBuilder::addBoundaryElements(), AdjustByPeriod(), SMESH_Pattern::Apply(), StdMeshers_Projection_1D2D::Compute(), StdMeshers_Projection_2D::Compute(), StdMeshers_Import_1D::Compute(), StdMeshers_Import_1D2D::Compute(), StdMeshers_QuadFromMedialAxis_1D2D::Compute(), StdMeshers_Hexa_3D::Compute(), StdMeshers_Cartesian_3D::Compute(), SMESH_subMesh::ComputeStateEngine(), SMESH_MeshEditor::ConvertToQuadratic(), StdMeshers_Import_1D2D::Evaluate(), StdMeshers_Prism_3D::Evaluate(), StdMeshers_FaceSide::FaceHelper(), VISCOUS_3D::_ViscousBuilder::findFacesWithLayers(), StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), VISCOUS_3D::_ViscousBuilder::findSolidsWithLayers(), FixQuadraticElements(), GetNodeUV(), SMESH_MeshEditor::InverseDiag(), IsQuadraticSubMesh(), IsStructured(), VISCOUS_3D::_ViscousBuilder::limitStepSizeByCurvature(), VISCOUS_3D::_ViscousBuilder::makeLayer(), StdMeshers_Penta_3D::MakeMeshOnFxy1(), StdMeshers_Prism_3D::projectBottomToTop(), SMESH_MeshEditor::QuadTo4Tri(), SMESH_MeshEditor::QuadToTri(), StdMeshers_Adaptive1D::SetParametersByMesh(), VISCOUS_2D::_ViscousBuilder2D::shrink(), VISCOUS_3D::_ViscousBuilder::shrink(), VISCOUS_3D::_ViscousBuilder::smoothAndCheck(), SMESH_MeshEditor::SplitVolumes(), StdMeshers_PrismAsBlock::TPCurveOnHorFaceAdaptor::TPCurveOnHorFaceAdaptor(), StdMeshers_PrismAsBlock::TSideFace::TSideFace(), and VISCOUS_3D::_ViscousBuilder::updateNormalsOfConvexFaces().

void SMESH_MesherHelper::SetSubShape ( const TopoDS_Shape &  subShape)
int SMESH_MesherHelper::ShapeToIndex ( const TopoDS_Shape &  S) const

Convert a shape to its index in the SMESHDS_Mesh.

References GetMeshDS(), and SMESHDS_Mesh::ShapeToIndex().

Referenced by FixQuadraticElements(), and GetNodeUV().

bool SMESH_MesherHelper::toCheckPosOnShape ( int  shapeID) const
private

Return true if position of nodes on the shape hasn't yet been checked or the positions proved to be invalid.

References myNodePosShapesValidity.

Referenced by CheckNodeU(), and CheckNodeUV().

void SMESH_MesherHelper::ToFixNodeParameters ( bool  toFix)

Enables fixing node parameters on EDGEs and FACEs by GetNodeU(...,check=true), GetNodeUV(...,check=true), CheckNodeUV() and CheckNodeU() in case if a node lies on a shape set via SetSubShape().

Default is False

References myFixNodeParameters.

Referenced by StdMeshers_Projection_1D2D::Compute(), StdMeshers_Hexa_3D::Compute(), SMESH_MeshEditor::ConvertToQuadratic(), FixQuadraticElements(), VISCOUS_3D::_ViscousBuilder::shrink(), and SMESH_MeshEditor::SplitVolumes().

void SMESH_MesherHelper::WriteShape ( const TopoDS_Shape &  s)
static

DEBUG.

References UNV164::Write().

Field Documentation

bool SMESH_MesherHelper::myCreateBiQuadratic
private

Referenced by AddFace(), and AddVolume().

bool SMESH_MesherHelper::myCreateQuadratic
private
std::set< int > SMESH_MesherHelper::myDegenShapeIds
private
TID2ProjectorOnCurve SMESH_MesherHelper::myEdge2Projector
private

Referenced by CheckNodeU(), and ~SMESH_MesherHelper().

TID2ProjectorOnSurf SMESH_MesherHelper::myFace2Projector
private
TID2Surface SMESH_MesherHelper::myFace2Surface
mutableprivate

Referenced by CopySubShapeInfo().

std::map< int, double > SMESH_MesherHelper::myFaceMaxTol
private

Referenced by getFaceMaxTol().

bool SMESH_MesherHelper::myFixNodeParameters
private
std::map< TBiQuad, const SMDS_MeshNode* > SMESH_MesherHelper::myMapWithCentralNode
private

Referenced by AddTLinks(), and GetCentralNode().

std::map< int,bool > SMESH_MesherHelper::myNodePosShapesValidity
private

Referenced by toCheckPosOnShape().

double SMESH_MesherHelper::myPar1[2]
private
double SMESH_MesherHelper::myPar2[2]
private
int SMESH_MesherHelper::myParIndex
private
std::set< int > SMESH_MesherHelper::mySeamShapeIds
private
TLinkNodeMap SMESH_MesherHelper::myTLinkNodeMap
private