It helps meshers to add elements and provides other utilities. More...
#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 | |
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_MeshNode * | AddNode (double x, double y, double z, int ID=0, double u=0., double v=0.) |
SMDS_MeshFace * | AddPolygonalFace (const std::vector< const SMDS_MeshNode * > &nodes, const int id=0, const bool force3d=false) |
SMDS_MeshVolume * | AddPolyhedralVolume (const std::vector< const SMDS_MeshNode * > &nodes, const std::vector< int > &quantities, const int ID=0, const bool force3d=true) |
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... | |
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) |
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 SMDS_MeshNode *n9, const SMDS_MeshNode *n10, const SMDS_MeshNode *n11, const SMDS_MeshNode *n12, const int id=0, bool force3d=true) |
void | AdjustByPeriod (const TopoDS_Face &face, gp_XY uv[], const int nbUV) |
Move node positions on a FACE within surface period. 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... | |
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... | |
void | FixQuadraticElements (SMESH_ComputeErrorPtr &error, bool volumeOnly=true) |
Move medium nodes of faces and volumes to fix distorted elements. More... | |
const SMDS_MeshNode * | 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. More... | |
const SMDS_MeshNode * | 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. More... | |
SMESH_Gen * | GetGen () const |
bool | GetIsBiQuadratic () const |
Return myCreateBiQuadratic flag. More... | |
bool | GetIsQuadratic () const |
Return myCreateQuadratic flag. More... | |
const SMDS_MeshNode * | 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. 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... | |
SMESH_Mesh * | GetMesh () const |
SMESHDS_Mesh * | GetMeshDS () const |
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 | GetNodeUVneedInFaceNode (const TopoDS_Face &F=TopoDS_Face()) const |
Check if inFaceNode argument is necessary for call GetNodeUV(F,..) More... | |
double | GetOtherParam (const double param) const |
Return an alternative parameter for a node on seam. More... | |
int | GetPeriodicIndex () const |
Return index of periodic parametric direction of a closed face. More... | |
GeomAPI_ProjectPointOnSurf & | GetProjector (const TopoDS_Face &F, TopLoc_Location &loc, double tol=0) const |
Return projector initialized by given face without location, which is returned. More... | |
const TopoDS_Shape & | GetSubShape () const |
Return the shape set by IsQuadraticSubMesh() or SetSubShape() More... | |
int | GetSubShapeID () const |
Return ID of the shape set by IsQuadraticSubMesh() or SetSubShape() More... | |
const TLinkNodeMap & | GetTLinkNodeMap () const |
Returns myTLinkNodeMap. More... | |
Handle (ShapeAnalysis_Surface) GetSurface(const TopoDS_Face &F) const | |
Return a cached ShapeAnalysis_Surface of a FACE. More... | |
bool | HasDegeneratedEdges () const |
Check if the shape set through IsQuadraticSubMesh() or SetSubShape() has a degenerated edges. More... | |
bool | HasRealSeam () const |
Check if the shape set through IsQuadraticSubMesh() or SetSubShape() has a seam edge that encounters twice in a wire. More... | |
bool | 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. More... | |
bool | IsDegenShape (const int subShape) const |
Check if shape is a degenerated edge or it's vertex. More... | |
MType | IsQuadraticMesh () |
bool | IsQuadraticSubMesh (const TopoDS_Shape &theShape) |
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 | IsReversedSubMesh (const TopoDS_Face &theFace) |
Find out elements orientation on a geometrical face. 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 | SetElementsOnShape (bool toSet) |
To set created elements on the shape set by IsQuadraticSubMesh() or the next methods. By default elements are set on the shape if a mesh has no shape to be meshed. More... | |
void | SetIsBiQuadratic (const bool theBuildBiQuadratic) |
Set myCreateBiQuadratic flag. More... | |
void | SetIsQuadratic (const bool theBuildQuadratic) |
Set order of elements to create without calling IsQuadraticSubMesh() 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... | |
SMESH_MesherHelper (SMESH_Mesh &theMesh) | |
Constructor. 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(). Default is False. More... | |
virtual | ~SMESH_MesherHelper () |
Static Public Member Functions | |
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. It takes into account period of the surface. Use gp_XY_FunPtr macro to easily define pointer to function of gp_XY class. 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. The used calculation method is called Trans-Finite Interpolation (TFI). 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 PShapeIteratorPtr | GetAncestors (const TopoDS_Shape &shape, const SMESH_Mesh &mesh, TopAbs_ShapeEnum ancestorType) |
Return iterator on ancestors of the given type. 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 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 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_ShapeEnum | GetGroupType (const TopoDS_Shape &group, const bool avoidCompound=false) |
Return type of shape contained in a group. 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 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 TopoDS_Shape | GetSubShapeByNode (const SMDS_MeshNode *node, const SMESHDS_Mesh *meshDS) |
Return support shape of a node. 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 | IsBlock (const TopoDS_Shape &shape) |
static bool | IsClosedEdge (const TopoDS_Edge &anEdge) |
Check if the first and last vertices of an edge are the same. More... | |
static bool | IsDistorted2D (SMESH_subMesh *faceSM, bool checkUV=false) |
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 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 | IsStructured (SMESH_subMesh *faceSM) |
Return true if 2D mesh on FACE is structured. More... | |
static bool | IsSubShape (const TopoDS_Shape &shape, const TopoDS_Shape &mainShape) |
static bool | IsSubShape (const TopoDS_Shape &shape, SMESH_Mesh *aMesh) |
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 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 double | MaxTolerance (const TopoDS_Shape &shape) |
Return maximal tolerance of shape. 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 int | WrapIndex (int ind, const int nbNodes) |
Return a valid node index, fixing the given one if necessary. More... | |
Protected Member Functions | |
double | getFaceMaxTol (const TopoDS_Shape &face) const |
Return MaxTolerance( face ), probably cached. More... | |
const SMDS_MeshNode * | getMediumNodeOnComposedWire (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, bool force3d) |
Makes a medium node if nodes reside different edges. More... | |
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... | |
It helps meshers to add elements and provides other utilities.
SMESH_MesherHelper::SMESH_MesherHelper | ( | SMESH_Mesh & | theMesh | ) |
Constructor.
References SMESH_Mesh::HasShapeToMesh().
|
virtual |
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
References SMESHDS_Mesh::AddEdge(), SMESHDS_Mesh::AddEdgeWithID(), GetMediumNode(), GetMeshDS(), and SMESHDS_Mesh::SetMeshElementOnShape().
Referenced by StdMeshers_Import_1D2D::Compute(), StdMeshers_RadialQuadrangle_1D2D::Compute(), SMESH_MeshEditor::ConvertToQuadratic(), and NETGENPlugin_Mesher::FillSMesh().
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
References SMESHDS_Mesh::AddFace(), SMESHDS_Mesh::AddFaceWithID(), GetCentralNode(), GetMediumNode(), GetMeshDS(), and SMESHDS_Mesh::SetMeshElementOnShape().
Referenced by AddFace(), NETGENPlugin_NETGEN_2D_ONLY::Compute(), StdMeshers_PolygonPerFace_2D::Compute(), StdMeshers_RadialQuadrangle_1D2D::Compute(), StdMeshers_Quadrangle_2D::computeQuadDominant(), StdMeshers_Quadrangle_2D::computeQuadPref(), StdMeshers_Quadrangle_2D::computeReduced(), SMESH_MeshEditor::ConvertToQuadratic(), NETGENPlugin_Mesher::FillSMesh(), StdMeshers_Penta_3D::MakeMeshOnFxy1(), SMESH_MeshEditor::QuadTo4Tri(), SMESH_MeshEditor::QuadToTri(), and StdMeshers_Quadrangle_2D::splitQuadFace().
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 bi-quadratic, quadratic or linear quadrangle
References SMESHDS_Mesh::AddFace(), AddFace(), SMESHDS_Mesh::AddFaceWithID(), GetCentralNode(), GetMediumNode(), GetMeshDS(), and SMESHDS_Mesh::SetMeshElementOnShape().
SMDS_MeshNode * SMESH_MesherHelper::AddNode | ( | double | x, |
double | y, | ||
double | z, | ||
int | ID = 0 , |
||
double | u = 0. , |
||
double | v = 0. |
||
) |
Creates a node (!Note ID before u=0.,v0.)
References SMESHDS_Mesh::AddNode(), SMESHDS_Mesh::AddNodeWithID(), GetMeshDS(), SMESHDS_Mesh::SetNodeInVolume(), SMESHDS_Mesh::SetNodeOnEdge(), SMESHDS_Mesh::SetNodeOnFace(), and SMESHDS_Mesh::SetNodeOnVertex().
Referenced by StdMeshers_Quadrangle_2D::addEnforcedNodes(), NETGENPlugin_Mesher::AddIntVerticesInFaces(), StdMeshers_CompositeHexa_3D::Compute(), StdMeshers_Hexa_3D::Compute(), StdMeshers_Import_1D::Compute(), StdMeshers_RadialQuadrangle_1D2D::Compute(), StdMeshers_QuadToTriaAdaptor::Compute(), StdMeshers_HexaFromSkin_3D::Compute(), NETGENPlugin_NETGEN_3D::compute(), StdMeshers_Sweeper::ComputeNodes(), StdMeshers_Quadrangle_2D::computeQuadPref(), StdMeshers_Import_1D::Evaluate(), StdMeshers_Import_1D2D::Evaluate(), StdMeshers_Quadrangle_2D::getEnforcedUV(), and SMESH_MeshEditor::QuadTo4Tri().
SMDS_MeshFace * SMESH_MesherHelper::AddPolygonalFace | ( | const std::vector< const SMDS_MeshNode * > & | nodes, |
const int | id = 0 , |
||
const bool | force3d = false |
||
) |
Creates polygon, with additional nodes in quadratic mesh
References SMESHDS_Mesh::AddPolygonalFace(), SMESHDS_Mesh::AddPolygonalFaceWithID(), SMESHDS_Mesh::AddQuadPolygonalFace(), SMESHDS_Mesh::AddQuadPolygonalFaceWithID(), GetMediumNode(), GetMeshDS(), and SMESHDS_Mesh::SetMeshElementOnShape().
Referenced by StdMeshers_PolygonPerFace_2D::Compute(), and SMESH_MeshEditor::ConvertToQuadratic().
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 |
||
) |
Creates polyhedron. In quadratic mesh, adds medium nodes
References SMESHDS_Mesh::AddPolyhedralVolume(), SMESHDS_Mesh::AddPolyhedralVolumeWithID(), GetMediumNode(), GetMeshDS(), and SMESHDS_Mesh::SetMeshElementOnShape().
Referenced by StdMeshers_Prism_3D::AddPrisms(), and SMESH_MeshEditor::ConvertToQuadratic().
void SMESH_MesherHelper::AddTLinkNode | ( | const SMDS_MeshNode * | n1, |
const SMDS_MeshNode * | n2, | ||
const SMDS_MeshNode * | n12 | ||
) |
Add a link in my data structure.
Referenced by AddTLinks(), IsQuadraticSubMesh(), and SMESH_MeshEditor::QuadToTri().
void SMESH_MesherHelper::AddTLinkNodeMap | ( | const TLinkNodeMap & | aMap | ) |
Add many links in my data structure.
bool SMESH_MesherHelper::AddTLinks | ( | const SMDS_MeshEdge * | edge | ) |
Add quadratic links of edge to own data structure.
References AddTLinkNode(), SMDS_MeshElement::GetNode(), and SMDS_MeshElement::IsQuadratic().
Referenced by StdMeshers_Import_1D2D::Compute(), SMESH_MeshEditor::ConvertToQuadratic(), NETGENPlugin_Mesher::FillNgMesh(), IsQuadraticSubMesh(), SMESH_MeshEditor::QuadTo4Tri(), and SMESH_MeshEditor::QuadToTri().
bool SMESH_MesherHelper::AddTLinks | ( | const SMDS_MeshFace * | face | ) |
Add quadratic links of face to own data structure.
References AddTLinkNode().
bool SMESH_MesherHelper::AddTLinks | ( | const SMDS_MeshVolume * | vol | ) |
Add quadratic links of volume to own data structure.
References AddTLinkNode(), SMDS_VolumeTool::GetCenterNodeIndex(), SMDS_VolumeTool::GetFaceNodesIndices(), SMDS_VolumeTool::GetNodes(), SMDS_MeshNode::GetPosition(), SMDS_Position::GetTypeOfPosition(), SMDS_MeshElement::IsQuadratic(), SMDS_VolumeTool::NbFaceNodes(), SMDS_VolumeTool::NbFaces(), and SMDS_VolumeTool::NbNodes().
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 tetrahedron
References SMESHDS_Mesh::AddVolume(), SMESHDS_Mesh::AddVolumeWithID(), GetMediumNode(), GetMeshDS(), and SMESHDS_Mesh::SetMeshElementOnShape().
Referenced by StdMeshers_Prism_3D::AddPrisms(), StdMeshers_CompositeHexa_3D::Compute(), StdMeshers_Hexa_3D::Compute(), StdMeshers_Projection_3D::Compute(), StdMeshers_QuadToTriaAdaptor::Compute(), StdMeshers_HexaFromSkin_3D::Compute(), NETGENPlugin_NETGEN_3D::compute(), SMESH_MeshEditor::ConvertToQuadratic(), and StdMeshers_Penta_3D::MakeVolumeMesh().
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
References SMESHDS_Mesh::AddVolume(), SMESHDS_Mesh::AddVolumeWithID(), GetMediumNode(), GetMeshDS(), and SMESHDS_Mesh::SetMeshElementOnShape().
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
References SMESHDS_Mesh::AddVolume(), SMESHDS_Mesh::AddVolumeWithID(), GetMediumNode(), GetMeshDS(), and SMESHDS_Mesh::SetMeshElementOnShape().
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 bi-quadratic, quadratic or linear hexahedron
References SMESHDS_Mesh::AddNode(), SMESHDS_Mesh::AddVolume(), SMESHDS_Mesh::AddVolumeWithID(), GetCentralNode(), GetMediumNode(), GetMeshDS(), 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::SetMeshElementOnShape(), SMESHDS_Mesh::SetNodeInVolume(), and SMESH_Block::ShellPoint().
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 |
||
) |
Creates LINEAR!!!!!!!!! octahedron
References SMESHDS_Mesh::AddVolume(), SMESHDS_Mesh::AddVolumeWithID(), GetMeshDS(), and SMESHDS_Mesh::SetMeshElementOnShape().
void SMESH_MesherHelper::AdjustByPeriod | ( | const TopoDS_Face & | face, |
gp_XY | uv[], | ||
const int | nbUV | ||
) |
Move node positions on a FACE within surface period.
[in] | face | - the FACE |
[in,out] | uv | - node positions to adjust |
[in] | nbUV | - nb of uv |
References GetPeriodicIndex(), and SetSubShape().
Referenced by FixQuadraticElements(), and GetCentralNode().
|
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.
Referenced by NETGENPlugin_Mesher::AddIntVerticesInFaces(), FixQuadraticElements(), and GetMiddleUV().
|
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).
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 |
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 SMESH_2D_Algo::FixInternalNodes(), FixQuadraticElements(), GetCentralNode(), SMESH_MeshEditor::QuadTo4Tri(), StdMeshers_Quadrangle_2D::smooth(), and VISCOUS_3D::_SmoothNode::Smooth().
|
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 |
Check and fix node U on an edge.
force | - check even if checks of other nodes on this edge passed OK |
distXYZ | - returns result distance and point coordinates |
bool | - false if U is bad and could not be fixed |
References DraftVecUtils::dist(), GetMeshDS(), Handle(), and SMESHDS_Mesh::ShapeToIndex().
Referenced by StdMeshers_Import_1D::Compute(), StdMeshers_Import_1D2D::Compute(), StdMeshers_Projection_1D2D::Compute(), StdMeshers_Import_1D2D::Evaluate(), GetMediumNode(), GetNodeU(), SMESH_Pattern::MakeMesh(), and VISCOUS_3D::_LayerEdge::SetNewLength().
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.
force | - check even if checks of other nodes on this face passed OK |
distXYZ | - returns result distance and point coordinates |
bool | - false if UV is bad and could not be fixed |
References DraftVecUtils::dist(), GetProjector(), and Handle().
Referenced by NETGENPlugin_Mesher::AddIntVerticesInFaces(), StdMeshers_Import_1D2D::Compute(), StdMeshers_Import_1D2D::Evaluate(), FixQuadraticElements(), GetMediumNode(), GetNodeUV(), VISCOUS_3D::_LayerEdge::SetNewLength(), VISCOUS_3D::_LayerEdge::SmoothOnEdge(), and SMESH_MeshEditor::SplitVolumes().
|
static |
Count nb of sub-shapes.
shape | - the shape |
type | - the type of sub-shapes to count |
ignoreSame | - if true, use map not to count same shapes, else use explorer |
int | - the calculated number |
Referenced by StdMeshers_Prism_3D::Compute(), StdMeshers_Projection_2D::Compute(), StdMeshers_Projection_3D::Compute(), StdMeshers_Projection_3D::Evaluate(), StdMeshers_ProjectionUtils::FindSubShapeAssociation(), StdMeshers_Hexa_3D::IsApplicable(), StdMeshers_Prism_3D::IsApplicable(), StdMeshers_Quadrangle_2D::IsApplicable(), StdMeshers_RadialPrism_3D::IsApplicable(), and StdMeshers_ProjectionSource2D::SetVertexAssociation().
void SMESH_MesherHelper::FixQuadraticElements | ( | SMESH_ComputeErrorPtr & | compError, |
bool | volumeOnly = true |
||
) |
Move medium nodes of faces and volumes to fix distorted elements.
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(), SMDS_MeshElement::end_nodes(), SMDS_Mesh::FindFace(), GetCenterUV(), SMDS_VolumeTool::GetFaceNodes(), GetMeshDS(), GetMiddleUV(), SMDS_MeshElement::GetNode(), SMDS_VolumeTool::GetNodes(), GetNodeUV(), SMDS_MeshElement::getshapeId(), SMESH_Mesh::GetShapeToMesh(), SMESH_Mesh::GetSubMesh(), SMESH_Mesh::GetSubMeshContaining(), SMESH_subMesh::GetSubMeshDS(), GetSubShape(), GetSubShapeByNode(), Handle(), SMESH_Mesh::HasShapeToMesh(), 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(), SMESH_subMesh::IsEmpty(), SMDS_MeshElement::IsQuadratic(), SMDS_VolumeTool::MinLinearSize2(), SMESHDS_Mesh::MoveNode(), SMESH_Mesh::NbBiQuadQuadrangles(), SMESH_Mesh::NbBiQuadTriangles(), SMDS_MeshElement::NbCornerNodes(), SMDS_VolumeTool::NbFaceNodes(), SMDS_VolumeTool::NbFaces(), SMESH_Mesh::NbTriQuadraticHexas(), SMDS_VolumeTool::Set(), SetSubShape(), SMESH_Block::ShellPoint(), ToFixNodeParameters(), and SMDS_MeshNode::X().
Referenced by SMESH_Gen::Compute(), and SMESH_MeshEditor::ConvertToQuadratic().
|
static |
Return iterator on ancestors of the given type.
Referenced by NETGENPlugin_Mesher::FillNgMesh(), NETGENPlugin_Internals::findBorderElements(), StdMeshers_ProjectionUtils::FindSubShapeAssociation(), SMESH_Gen::GetAlgo(), StdMeshers_ProjectionUtils::GetBoundaryEdge(), GetCentralNode(), GetCommonAncestor(), NETGENPlugin_Internals::NETGENPlugin_Internals(), VISCOUS_3D::_CentralCurveOnEdge::SetShapes(), and SMESH_Algo::VertexNode().
|
static |
Return an angle between two EDGEs sharing a common VERTEX with reference of the FACE normal.
References DraftVecUtils::angle(), and Handle().
Referenced by StdMeshers_Quadrangle_2D::check(), VISCOUS_3D::getConcaveVertices(), and VISCOUS_3D::getFaceDir().
|
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 * | 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.
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(), GetAncestors(), GetCenterUV(), GetMesh(), GetMeshDS(), GetNodeUV(), SMDS_MeshElement::getshapeId(), GetSubShapeByNode(), Handle(), SMESHDS_Mesh::IndexToShape(), SMESHDS_Mesh::SetMeshElementOnShape(), SMESHDS_Mesh::SetNodeInVolume(), SMESHDS_Mesh::SetNodeOnFace(), and SMESHDS_Mesh::ShapeToIndex().
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.
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(), GetAncestors(), GetMesh(), GetMeshDS(), GetNodeUV(), SMDS_MeshElement::getshapeId(), GetSubShapeByNode(), Handle(), HasDegeneratedEdges(), SMESHDS_Mesh::IndexToShape(), SMESHDS_Mesh::SetMeshElementOnShape(), SMESHDS_Mesh::SetNodeInVolume(), SMESHDS_Mesh::SetNodeOnFace(), and SMESHDS_Mesh::ShapeToIndex().
Referenced by AddFace(), and AddVolume().
|
static |
Find a common ancestor, of the given type, of two shapes.
References GetAncestors(), and IsSubShape().
Referenced by StdMeshers_Import_1D2D::Compute(), GetMediumPos(), IsReversedSubMesh(), and SMESH_Pattern::MakeMesh().
|
protected |
Return MaxTolerance( face ), probably cached.
References GetMeshDS(), MaxTolerance(), and SMESHDS_Mesh::ShapeToIndex().
Referenced by GetMediumNode(), and GetNodeUV().
SMESH_Gen * SMESH_MesherHelper::GetGen | ( | ) | const |
|
static |
Return type of shape contained in a group.
group | - a shape of type TopAbs_COMPOUND |
avoidCompound | - not to return TopAbs_COMPOUND |
References GetGroupType().
Referenced by SMESH_Gen::GetAlgo(), and GetGroupType().
bool SMESH_MesherHelper::GetIsBiQuadratic | ( | ) | const |
Return myCreateBiQuadratic flag.
bool SMESH_MesherHelper::GetIsQuadratic | ( | ) | const |
Return myCreateQuadratic flag.
Referenced by NETGENPlugin_Mesher::Compute(), NETGENPlugin_Mesher::FillSMesh(), and 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.
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(), getFaceMaxTol(), getMediumNodeOnComposedWire(), GetMediumPos(), GetMeshDS(), GetMiddleUV(), GetNodeU(), GetNodeUV(), SMDS_MeshNode::GetPosition(), SMDS_MeshElement::getshapeId(), SMDS_Position::GetTypeOfPosition(), Handle(), HasDegeneratedEdges(), SMESHDS_Mesh::IndexToShape(), IsDegenShape(), IsSeamShape(), SMESHDS_Mesh::SetMeshElementOnShape(), SMESHDS_Mesh::SetNodeOnEdge(), SMESHDS_Mesh::SetNodeOnFace(), SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().
Referenced by AddEdge(), AddFace(), AddPolygonalFace(), AddPolyhedralVolume(), and AddVolume().
|
protected |
Makes a medium node if nodes reside different edges.
Referenced by GetMediumNode().
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 |
||
) |
Return index and type of the shape (EDGE or FACE only) to set a medium node on.
References GetCommonAncestor(), SMDS_MeshNode::GetInverseElementIterator(), GetMeshDS(), SMDS_MeshNode::GetPosition(), SMDS_MeshElement::getshapeId(), GetSubShapeByNode(), SMDS_Position::GetTypeOfPosition(), SMDS_MeshElement::IsQuadratic(), IsSubShape(), and SMESHDS_Mesh::ShapeToIndex().
Referenced by StdMeshers_Projection_1D2D::Compute(), GetMediumNode(), and SMESH_MeshEditor::MakeBoundaryMesh().
SMESH_Mesh * SMESH_MesherHelper::GetMesh | ( | ) | const |
Referenced by StdMeshers_Quadrangle_2D::addEnforcedNodes(), NETGENPlugin_Mesher::AddIntVerticesInFaces(), NETGENPlugin_Mesher::AddSegmentsToMesh(), StdMeshers_Quadrangle_2D::check(), StdMeshers_QuadFromMedialAxis_1D2D::Algo1D::ComputeDistribution(), StdMeshers_RadialQuadrangle_1D2D::computeLayerPositions(), StdMeshers_RadialPrism_3D::computeLayerPositions(), NETGENPlugin_Mesher::FillNgMesh(), GetCentralNode(), VISCOUS_3D::getConcaveVertices(), StdMeshers_Quadrangle_2D::getEnforcedUV(), StdMeshers_PrismAsBlock::Init(), and VISCOUS_3D::_CentralCurveOnEdge::SetShapes().
SMESHDS_Mesh * SMESH_MesherHelper::GetMeshDS | ( | ) | const |
Referenced by VISCOUS_3D::_Shrinker1D::AddEdge(), AddEdge(), StdMeshers_Quadrangle_2D::addEnforcedNodes(), AddFace(), AddNode(), AddPolygonalFace(), AddPolyhedralVolume(), NETGENPlugin_Mesher::AddSegmentsToMesh(), AddVolume(), StdMeshers_Quadrangle_2D::check(), CheckNodeU(), StdMeshers_Import_1D::Compute(), StdMeshers_Import_1D2D::Evaluate(), NETGENPlugin_Mesher::FillNgMesh(), FixQuadraticElements(), GetCentralNode(), VISCOUS_3D::getConcaveVertices(), StdMeshers_Quadrangle_2D::getEnforcedUV(), getFaceMaxTol(), GetMediumNode(), GetMediumPos(), GetNodeU(), GetNodeUV(), GetProjector(), StdMeshers_PrismAsBlock::Init(), IsDistorted2D(), IsQuadraticSubMesh(), IsReversedSubMesh(), StdMeshers_RadialPrism_3D::makeNodeColumn(), SetSubShape(), and StdMeshers_Quadrangle_2D::smooth().
|
static |
Return middle UV taking in account surface period.
References ApplyIn2D().
Referenced by FixQuadraticElements(), GetMediumNode(), SMESH_MeshEditor::QuadTo4Tri(), and SMESH_MeshEditor::Smooth().
double SMESH_MesherHelper::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.
References CheckNodeU(), GetMeshDS(), GetNodeU(), SMDS_EdgePosition::GetUParameter(), SMESHDS_Mesh::IndexToShape(), draftguitools.gui_annotationstyleeditor::param, and SMESHDS_Mesh::ShapeToIndex().
Referenced by VISCOUS_3D::_Shrinker1D::AddEdge(), VISCOUS_3D::_Shrinker1D::Compute(), StdMeshers_Hexa_3D::Compute(), StdMeshers_Import_1D2D::Compute(), VISCOUS_3D::_LayerEdge::Copy(), StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), VISCOUS_3D::getEdgeDir(), VISCOUS_3D::getFaceDir(), GetMediumNode(), GetNodeU(), StdMeshers_FaceSide::GetOrderedNodes(), StdMeshers_FaceSide::GetUVPtStruct(), IsReversedSubMesh(), VISCOUS_3D::_LayerEdge::SetNewLength2d(), StdMeshers_Adaptive1D::SetParametersByMesh(), StdMeshers_SegmentLengthAroundVertex::SetParametersByMesh(), and SMESH_Algo::VertexNode().
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 |
check | - if provided, returns result of UV check that it enforces |
References CheckNodeUV(), DraftVecUtils::dist(), SMESH_Mesh::GetAncestors(), getFaceMaxTol(), GetMeshDS(), GetNodeUV(), SMDS_Position::GetTypeOfPosition(), SMDS_EdgePosition::GetUParameter(), SMDS_FacePosition::GetUParameter(), getUVOnSeam(), SMDS_FacePosition::GetVParameter(), Handle(), IsSeamShape(), IsSubShape(), and IthVertex().
Referenced by NETGENPlugin_Mesher::AddIntVerticesInFaces(), SMESH_Pattern::Apply(), StdMeshers_Quadrangle_2D::check(), StdMeshers_Import_1D2D::Compute(), StdMeshers_Projection_2D::Compute(), StdMeshers_RadialQuadrangle_1D2D::Compute(), VISCOUS_3D::_LayerEdge::Copy(), StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), SMESH_2D_Algo::FixInternalNodes(), FixQuadraticElements(), VISCOUS_3D::_ConvexFace::GetCenterOfCurvature(), GetCentralNode(), VISCOUS_3D::getFaceDir(), GetMediumNode(), GetNodeUV(), SMESH_MeshEditor::InverseDiag(), IsDistorted2D(), VISCOUS_3D::_Simplex::IsForward(), IsReversedSubMesh(), SMESH_Pattern::Load(), StdMeshers_Penta_3D::MakeNodes(), SMESH_MeshEditor::QuadTo4Tri(), SMESH_MeshEditor::QuadToTri(), VISCOUS_3D::_LayerEdge::SetNewLength2d(), StdMeshers_Quadrangle_2D::smooth(), VISCOUS_3D::_SmoothNode::Smooth(), and SMESH_MeshEditor::Smooth().
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()
References Handle().
Referenced by SMESH_Pattern::Apply(), and SMESH_MeshEditor::QuadToTri().
double SMESH_MesherHelper::GetOtherParam | ( | const double | param | ) | const |
Return an alternative parameter for a node on seam.
References draftguitools.gui_annotationstyleeditor::param.
Referenced by StdMeshers_Import_1D2D::Compute(), and NETGENPlugin_Mesher::FillNgMesh().
int SMESH_MesherHelper::GetPeriodicIndex | ( | ) | const |
Return index of periodic parametric direction of a closed face.
int | - 1 for U, 2 for V direction |
Referenced by AdjustByPeriod(), StdMeshers_Import_1D2D::Compute(), and NETGENPlugin_Mesher::FillNgMesh().
GeomAPI_ProjectPointOnSurf & SMESH_MesherHelper::GetProjector | ( | const TopoDS_Face & | F, |
TopLoc_Location & | loc, | ||
double | tol = 0 |
||
) | const |
Return projector initialized by given face without location, which is returned.
References GetMeshDS(), Handle(), and SMESHDS_Mesh::ShapeToIndex().
Referenced by CheckNodeUV(), and StdMeshers_Import_1D2D::Compute().
|
static |
Returns a shape, to which a hypothesis used to mesh a given shape is assigned.
[in] | hyp | - the hypothesis |
[in] | shape | - the shape, for meshing which the hyp is used |
[in] | mesh | - the mesh |
References SMESH_HypoFilter::Is().
const TopoDS_Shape & SMESH_MesherHelper::GetSubShape | ( | ) | const |
Return the shape set by IsQuadraticSubMesh() or SetSubShape()
Referenced by StdMeshers_Quadrangle_2D::addEnforcedNodes(), NETGENPlugin_Mesher::AddSegmentsToMesh(), StdMeshers_Quadrangle_2D::check(), StdMeshers_Projection_1D2D::Compute(), NETGENPlugin_NETGEN_3D::compute(), StdMeshers_RadialQuadrangle_1D2D::computeLayerPositions(), FixQuadraticElements(), StdMeshers_Quadrangle_2D::getEnforcedUV(), SMESH_MeshEditor::InverseDiag(), StdMeshers_Penta_3D::MakeMeshOnFxy1(), SMESH_MeshEditor::QuadTo4Tri(), SMESH_MeshEditor::QuadToTri(), VISCOUS_3D::_SmoothNode::Smooth(), and StdMeshers_Quadrangle_2D::updateSideUV().
|
static |
Return support shape of a node.
node | - the node |
meshDS | - mesh DS |
TopoDS_Shape | - found support shape |
References SMDS_MeshElement::getshapeId(), and SMESHDS_Mesh::IndexToShape().
Referenced by StdMeshers_Import_1D2D::Compute(), FixQuadraticElements(), GetCentralNode(), GetMediumPos(), SMESH_ProxyMesh::GetProxyNode(), StdMeshers_PrismAsBlock::IsForwardEdge(), IsReversedSubMesh(), SMESH_Pattern::MakeMesh(), SMESH_Algo::VertexNode(), and StdMeshers_FaceSide::VertexNode().
int SMESH_MesherHelper::GetSubShapeID | ( | ) | const |
Return ID of the shape set by IsQuadraticSubMesh() or SetSubShape()
int | - shape index in SMESHDS |
Referenced by StdMeshers_Cartesian_3D::Compute(), StdMeshers_Import_1D2D::Compute(), StdMeshers_Projection_1D2D::Compute(), StdMeshers_Projection_3D::Compute(), StdMeshers_RadialPrism_3D::makeNodeColumn(), SMESH_MeshEditor::QuadTo4Tri(), SMESH_MeshEditor::QuadToTri(), and StdMeshers_Quadrangle_2D::smooth().
|
static |
Return orientation of sub-shape in the main shape.
Referenced by StdMeshers_Import_1D2D::Compute(), NETGENPlugin_Mesher::FillNgMesh(), StdMeshers_ProjectionUtils::FindSubShapeAssociation(), and VISCOUS_3D::getFaceDir().
const TLinkNodeMap & SMESH_MesherHelper::GetTLinkNodeMap | ( | ) | const |
Returns myTLinkNodeMap.
Referenced by NETGENPlugin_Mesher::FillSMesh(), and StdMeshers_Quadrangle_2D::smooth().
|
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 |
Referenced by GetNodeUV().
SMESH_MesherHelper::Handle | ( | ShapeAnalysis_Surface | ) | const & |
Return a cached ShapeAnalysis_Surface of a FACE.
Referenced by CheckNodeU(), CheckNodeUV(), FixQuadraticElements(), GetAngle(), GetCentralNode(), GetMediumNode(), GetNodeUV(), GetNodeUVneedInFaceNode(), GetProjector(), IsReversedSubMesh(), and SetSubShape().
bool SMESH_MesherHelper::HasDegeneratedEdges | ( | ) | const |
Check if the shape set through IsQuadraticSubMesh() or SetSubShape() has a degenerated edges.
bool | - true if it has |
Referenced by StdMeshers_Projection_2D::Compute(), GetCentralNode(), GetMediumNode(), IsDistorted2D(), and StdMeshers_Quadrangle_2D::smooth().
bool SMESH_MesherHelper::HasRealSeam | ( | ) | const |
Check if the shape set through IsQuadraticSubMesh() or SetSubShape() has a seam edge that encounters twice in a wire.
bool | - true if it has |
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.
bool | - true if it has |
Referenced by StdMeshers_Quadrangle_2D::check(), StdMeshers_Import_1D2D::Compute(), StdMeshers_Projection_1D2D::Compute(), NETGENPlugin_Mesher::FillNgMesh(), StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), IsDistorted2D(), and SMESH_Pattern::Load().
|
static |
References SMESH_Block::FindBlockShapes().
|
static |
Check if the first and last vertices of an edge are the same.
anEdge | - the edge to check |
bool | - true if same |
References IsClosedEdge().
Referenced by StdMeshers_ProjectionUtils::FindFaceAssociation(), StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), StdMeshers_ProjectionUtils::FindSubShapeAssociation(), VISCOUS_3D::getFaceDir(), IsClosedEdge(), and StdMeshers_PrismAsBlock::IsForwardEdge().
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
Referenced by NETGENPlugin_Mesher::AddSegmentsToMesh(), NETGENPlugin_NETGEN_3D::Compute(), StdMeshers_Projection_2D::Compute(), GetMediumNode(), StdMeshers_FaceSide::GetOrderedNodes(), StdMeshers_FaceSide::GetUVPtStruct(), IsDistorted2D(), StdMeshers_FaceSide::NbPoints(), and StdMeshers_Quadrangle_2D::updateDegenUV().
|
static |
Return true if 2D mesh on FACE is distored.
References SMESHDS_SubMesh::GetElements(), SMESH_subMesh::GetFather(), GetMeshDS(), GetNodeUV(), SMESH_subMesh::GetSubShape(), HasDegeneratedEdges(), HasSeam(), IsDegenShape(), IsSeamShape(), SMESHDS_Mesh::MeshElements(), SMESHDS_SubMesh::NbElements(), SetSubShape(), and draftgeoutils.general::v1().
|
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 |
References SMESH_MeshEditor::IsMedium().
Referenced by StdMeshers_Projection_1D::Compute(), SMESH_MeshEditor::FindCoincidentNodes(), StdMeshers_Penta_3D::FindNodeOnShape(), SMESH_Algo::GetSortedNodesOnEdge(), SMESH_Pattern::Load(), StdMeshers_Penta_3D::LoadIJNodes(), StdMeshers_Penta_3D::MakeMeshOnFxy1(), and StdMeshers_Penta_3D::MakeNodes().
SMESH_MesherHelper::MType SMESH_MesherHelper::IsQuadraticMesh | ( | ) |
References COMP, LINEAR, SMESH_Mesh::NbEdges(), SMESH_Mesh::NbFaces(), and QUADRATIC.
Referenced by SMESH_Gen::Compute(), and NETGENPlugin_NETGEN_3D::Compute().
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
References AddTLinkNode(), AddTLinks(), SMDS_Mesh::facesIterator(), GetMeshDS(), SMESH_Mesh::HasShapeToMesh(), SMESHDS_Mesh::MeshElements(), SMESH_Mesh::NbFaces(), and SetSubShape().
Referenced by StdMeshers_Penta_3D::Compute(), NETGENPlugin_NETGEN_2D_ONLY::Compute(), NETGENPlugin_NETGEN_3D::Compute(), StdMeshers_CompositeHexa_3D::Compute(), StdMeshers_Hexa_3D::Compute(), StdMeshers_MEFISTO_2D::Compute(), StdMeshers_PolygonPerFace_2D::Compute(), StdMeshers_Projection_3D::Compute(), StdMeshers_Quadrangle_2D::Compute(), StdMeshers_RadialPrism_3D::Compute(), StdMeshers_RadialQuadrangle_1D2D::Compute(), StdMeshers_QuadToTriaAdaptor::Compute(), and StdMeshers_Penta_3D::Evaluate().
Return true if an edge or a vertex encounters twice in face wire.
subShape | - Id of edge or vertex |
Referenced by NETGENPlugin_Mesher::AddSegmentsToMesh(), StdMeshers_Cartesian_3D::Compute(), StdMeshers_Import_1D2D::Compute(), StdMeshers_Projection_2D::Compute(), NETGENPlugin_Mesher::FillNgMesh(), StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), StdMeshers_FaceSide::GetOrderedNodes(), StdMeshers_FaceSide::GetUVPtStruct(), SMESH_Pattern::Load(), and StdMeshers_FaceSide::NbPoints().
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 |
bool SMESH_MesherHelper::IsReversedSubMesh | ( | const TopoDS_Face & | theFace | ) |
Find out elements orientation on a geometrical face.
theFace | - The face correctly oriented in the shape being meshed |
bool | - true if the face normal and the normal of first element in the correspoding submesh point in different directions |
References SMESH_MeshAlgos::FaceNormal(), GetCommonAncestor(), SMESHDS_SubMesh::GetElements(), GetMeshDS(), SMDS_MeshElement::GetNode(), GetNodeU(), GetNodeUV(), GetSubShapeByNode(), Handle(), SMESHDS_Mesh::IndexToShape(), SMESHDS_Mesh::MeshElements(), SMDS_MeshElement::NbCornerNodes(), SMDS_MeshElement::nodesIterator(), and SMESHDS_Mesh::ShapeToIndex().
Referenced by NETGENPlugin_NETGEN_3D::Compute(), StdMeshers_Projection_2D::Compute(), and StdMeshers_QuadToTriaAdaptor::Compute().
|
static |
Returns true if all elements of a sub-mesh are of same shape.
smDS | - sub-mesh to check elements of |
shape | - expected shape of elements |
nullSubMeshRes | - result value for the case of smDS == NULL |
bool | - check result |
References SMESHDS_SubMesh::GetElements().
Referenced by StdMeshers_Hexa_3D::Compute(), and StdMeshers_Prism_3D::Compute().
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 representations on the face
Referenced by SMESH_Pattern::Apply(), StdMeshers_Quadrangle_2D::check(), StdMeshers_Import_1D2D::Evaluate(), StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), GetMediumNode(), GetNodeUV(), IsDistorted2D(), SMESH_Pattern::Load(), and SetSubShape().
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 representations on the face
|
static |
Return true if 2D mesh on FACE is structured.
References SMESH_subMesh::GetFather(), SMESH_Mesh::GetMeshDS(), SMESH_Block::GetOrderedEdges(), SMESH_Algo::GetSortedNodesOnEdge(), SMESH_subMesh::GetSubMeshDS(), SMESH_subMesh::GetSubShape(), IthVertex(), SMESHDS_SubMesh::NbElements(), SetSubShape(), and SMESH_Algo::VertexNode().
Referenced by StdMeshers_Prism_3D::Compute().
|
static |
Referenced by SMESH_subMesh::AlgoStateEngine(), StdMeshers_Projection_1D::CheckHypothesis(), StdMeshers_Projection_2D::CheckHypothesis(), StdMeshers_Projection_3D::CheckHypothesis(), StdMeshers_Projection_3D::Compute(), StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), GetCommonAncestor(), VISCOUS_2D::getEdgesToIgnore(), StdMeshers_Quadrangle_2D::getEnforcedUV(), SMESH_Mesh::GetGroupSubMeshesContaining(), GetMediumPos(), GetNodeUV(), SMESH_HypoFilter::IsMoreLocalThanPredicate::IsOk(), SMESH_MeshEditor::MakeBoundaryMesh(), SMESH_Pattern::MakeMesh(), SMESH_Algo::VertexNode(), and StdMeshers_FaceSide::VertexNode().
|
static |
|
static |
Wrapper over TopExp::FirstVertex() and TopExp::LastVertex() fixing them in the case of INTERNAL edge.
Referenced by StdMeshers_Quadrangle_2D::CheckNbEdges(), StdMeshers_Import_1D2D::Compute(), StdMeshers_Projection_2D::Compute(), StdMeshers_RadialQuadrangle_1D2D::Compute(), StdMeshers_ProjectionUtils::FindFaceAssociation(), VISCOUS_3D::getFaceDir(), GetNodeUV(), IsStructured(), and StdMeshers_FaceSide::StdMeshers_FaceSide().
|
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 |
theBaseSide | - the edges holding nodes on which 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 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(), SMDS_MeshElement::NbCornerNodes(), and SMESHDS_SubMesh::NbElements().
Referenced by StdMeshers_Hexa_3D::Compute(), StdMeshers_PrismAsBlock::Init(), and LoadNodeColumns().
|
static |
Variant of LoadNodeColumns() above with theBaseSide given by one edge.
References LoadNodeColumns().
|
static |
Return maximal tolerance of shape.
Referenced by StdMeshers_Import_1D2D::Compute(), StdMeshers_Import_1D::Evaluate(), and getFaceMaxTol().
|
static |
Return number of unique ancestors of the shape.
Referenced by NETGENPlugin_NETGEN_3D::Compute(), StdMeshers_Import_1D2D::Compute(), StdMeshers_QuadToTriaAdaptor::Compute(), SMESH_Gen::GetAlgo(), and NETGENPlugin_Internals::NETGENPlugin_Internals().
To set created elements on the shape set by IsQuadraticSubMesh() or the next methods. By default elements are set on the shape if a mesh has no shape to be meshed.
Referenced by NETGENPlugin_Mesher::AddIntVerticesInFaces(), StdMeshers_Prism_3D::AddPrisms(), NETGENPlugin_NETGEN_2D_ONLY::Compute(), NETGENPlugin_NETGEN_3D::Compute(), StdMeshers_Cartesian_3D::Compute(), StdMeshers_CompositeHexa_3D::Compute(), StdMeshers_Hexa_3D::Compute(), StdMeshers_Import_1D2D::Compute(), StdMeshers_PolygonPerFace_2D::Compute(), StdMeshers_Quadrangle_2D::Compute(), StdMeshers_QuadToTriaAdaptor::Compute(), SMESH_subMesh::ComputeStateEngine(), SMESH_MeshEditor::ConvertToQuadratic(), and SMESH_MeshEditor::QuadTo4Tri().
void SMESH_MesherHelper::SetIsBiQuadratic | ( | const bool | theBuildBiQuadratic | ) |
Set myCreateBiQuadratic flag.
Referenced by SMESH_MeshEditor::ConvertToQuadratic(), SMESH_MeshEditor::QuadTo4Tri(), and SMESH_MeshEditor::QuadToTri().
void SMESH_MesherHelper::SetIsQuadratic | ( | const bool | theBuildQuadratic | ) |
Set order of elements to create without calling IsQuadraticSubMesh()
Referenced by NETGENPlugin_Mesher::Compute(), NETGENPlugin_NETGEN_3D::Compute(), SMESH_MeshEditor::ConvertToQuadratic(), SMESH_MeshEditor::QuadTo4Tri(), and SMESH_MeshEditor::QuadToTri().
void SMESH_MesherHelper::SetSubShape | ( | const int | subShapeID | ) |
Set shape to make elements on without calling IsQuadraticSubMesh()
References GetMeshDS(), and SetSubShape().
Referenced by NETGENPlugin_Mesher::AddIntVerticesInFaces(), AdjustByPeriod(), SMESH_Pattern::Apply(), NETGENPlugin_Mesher::Compute(), StdMeshers_Cartesian_3D::Compute(), StdMeshers_Hexa_3D::Compute(), StdMeshers_Import_1D::Compute(), StdMeshers_Import_1D2D::Compute(), StdMeshers_Projection_1D2D::Compute(), StdMeshers_Projection_2D::Compute(), StdMeshers_QuadFromMedialAxis_1D2D::Compute(), SMESH_subMesh::ComputeStateEngine(), SMESH_MeshEditor::ConvertToQuadratic(), StdMeshers_Import_1D2D::Evaluate(), StdMeshers_Prism_3D::Evaluate(), StdMeshers_RadialQuadrangle_1D2D::Evaluate(), NETGENPlugin_Mesher::FillNgMesh(), StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), FixQuadraticElements(), StdMeshers_FaceSide::GetOrderedNodes(), StdMeshers_FaceSide::GetUVPtStruct(), SMESH_MeshEditor::InverseDiag(), IsDistorted2D(), IsQuadraticSubMesh(), IsStructured(), SMESH_Pattern::Load(), SMESH_Pattern::MakeMesh(), StdMeshers_Penta_3D::MakeMeshOnFxy1(), StdMeshers_FaceSide::NbPoints(), SMESH_MeshEditor::QuadTo4Tri(), SMESH_MeshEditor::QuadToTri(), StdMeshers_Adaptive1D::SetParametersByMesh(), SetSubShape(), SMESH_MeshEditor::Smooth(), and SMESH_MeshEditor::SplitVolumes().
void SMESH_MesherHelper::SetSubShape | ( | const TopoDS_Shape & | subShape | ) |
==SMESHDS_Mesh::ShapeToIndex(shape)
References GetMeshDS(), Handle(), SMESH_Algo::isDegenerated(), IsSeamShape(), and SMESHDS_Mesh::ShapeToIndex().
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.
Referenced by StdMeshers_Hexa_3D::Compute(), StdMeshers_Projection_1D2D::Compute(), SMESH_MeshEditor::ConvertToQuadratic(), FixQuadraticElements(), StdMeshers_FaceSide::GetOrderedNodes(), StdMeshers_FaceSide::GetUVPtStruct(), SMESH_Pattern::MakeMesh(), and SMESH_MeshEditor::SplitVolumes().
Return a valid node index, fixing the given one if necessary.
ind | - node index |
nbNodes | - total nb of nodes |
int | - valid node index |
Referenced by NETGENPlugin_Mesher::AddSegmentsToMesh(), StdMeshers_Quadrangle_2D::check(), StdMeshers_Import_1D2D::Compute(), SMESH_2D_Algo::FixInternalNodes(), VISCOUS_3D::getDistFromEdge(), SMESH_MeshEditor::GetLinkedNodes(), VISCOUS_3D::_Simplex::GetSimplices(), StdMeshers_Prism_3D::IsApplicable(), SMESH_Pattern::Load(), StdMeshers_Quadrangle_2D::smooth(), VISCOUS_3D::_SmoothNode::Smooth(), VISCOUS_3D::_LayerEdge::smoothNefPolygon(), and StdMeshers_FaceSide::VertexNode().