StdMeshers_QuadToTriaAdaptor Class Reference

"Transforms" quadrilateral faces into triangular ones by creation of pyramids More...

#include <StdMeshers_QuadToTriaAdaptor.hxx>

Public Member Functions

bool Compute (SMESH_Mesh &aMesh)
 Computes pyramids in mesh with no shape. More...
bool Compute (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, SMESH_ProxyMesh *aProxyMesh=0)
const TopoDS_Shape & GetShape () const
 StdMeshers_QuadToTriaAdaptor ()
 Constructor. More...
 ~StdMeshers_QuadToTriaAdaptor ()
 Destructor. More...
- Public Member Functions inherited from SMESH_ProxyMesh
SMDS_ElemIteratorPtr GetFaces () const
 Returns iterator on all faces of the mesh taking into account substitutions To be used in case of mesh without shape. More...
SMDS_ElemIteratorPtr GetFaces (const TopoDS_Shape &face) const
 Returns iterator on all faces on the shape taking into account substitutions. More...
SMESH_MeshGetMesh () const
SMESHDS_MeshGetMeshDS () const
 Returns mesh DS. More...
const SMDS_MeshNodeGetProxyNode (const SMDS_MeshNode *node) const
 Returns the proxy node of a node; the input node is returned if no proxy exists. More...
const SubMeshGetProxySubMesh (const TopoDS_Shape &shape) const
 Returns the proxy sub-mesh of a shape; it can be NULL. More...
const SMESHDS_SubMeshGetSubMesh (const TopoDS_Shape &shape) const
 Returns the submesh of a shape; it can be a proxy sub-mesh. More...
bool IsTemporary (const SMDS_MeshElement *elem) const
 Return true if the element is a temporary one. More...
int NbFaces () const
 Return total nb of faces taking into account substitutions. More...
int NbProxySubMeshes () const
 Returns number of proxy sub-meshes. More...
 SMESH_ProxyMesh ()
 Constructor; mesh must be set by a descendant class. More...
 SMESH_ProxyMesh (const SMESH_Mesh &mesh)
 SMESH_ProxyMesh (std::vector< SMESH_ProxyMesh::Ptr > &components)
 Make a proxy mesh from components. Components become empty. More...
virtual ~SMESH_ProxyMesh ()
 Destructor deletes proxy submeshes and tmp elemens. More...

Protected Member Functions

bool CheckIntersection (const gp_Pnt &P, const gp_Pnt &PC, gp_Pnt &Pint, SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, const SMDS_MeshElement *NotCheckedFace)
 Checks if a line segment (P,PC) intersects any mesh face. More...
bool Compute2ndPart (SMESH_Mesh &aMesh, const std::vector< const SMDS_MeshElement * > &pyramids)
 Update created pyramids and faces to avoid their intersection. More...
void MergeAdjacent (const SMDS_MeshElement *PrmI, std::set< const SMDS_MeshNode * > &nodesToMove)
 Merges adjacent pyramids. More...
void MergePiramids (const SMDS_MeshElement *PrmI, const SMDS_MeshElement *PrmJ, std::set< const SMDS_MeshNode * > &nodesToMove)
 Merge the two pyramids (i.e. fuse their apex) and others already merged with them. More...
int Preparation (const SMDS_MeshElement *face, Handle(TColgp_HArray1OfPnt)&PN, Handle(TColgp_HArray1OfVec)&VN, std::vector< const SMDS_MeshNode * > &FNodes, gp_Pnt &PC, gp_Vec &VNorm, const SMDS_MeshElement **volumes=0)
 Prepare data for the given face. More...
- Protected Member Functions inherited from SMESH_ProxyMesh
SubMeshfindProxySubMesh (int shapeIndex=0) const
 Returns a proxy sub-mesh. More...
SubMeshgetProxySubMesh (const TopoDS_Shape &shape=TopoDS_Shape())
 Returns a proxy sub-mesh; it is created if not yet exists. More...
SubMeshgetProxySubMesh (int shapeIndex)
 Returns a proxy sub-mesh; it is created if not yet exists. More...
virtual SubMeshnewSubmesh (int index=0) const
void removeTmpElement (const SMDS_MeshElement *elem)
 Removes tmp elements from the _mesh. More...
void setMesh (const SMESH_Mesh &mesh)
void setNode2Node (const SMDS_MeshNode *srcNode, const SMDS_MeshNode *proxyNode, const SubMesh *subMesh)
 Set node-node correspondence. More...
int shapeIndex (const TopoDS_Shape &shape) const
 Returns index of a shape. More...
void storeTmpElement (const SMDS_MeshElement *elem)
 Stores tmp element residing the _mesh. More...
bool takeProxySubMesh (const TopoDS_Shape &shape, SMESH_ProxyMesh *proxyMesh)
 Move proxy sub-mesh from other proxy mesh to this, returns true if sub-mesh found. More...
void takeTmpElemsInMesh (SMESH_ProxyMesh *proxyMesh)
 Move tmp elements residing the _mesh from other proxy mesh to this. More...

Protected Attributes

std::list< const SMDS_MeshNode * > myDegNodes
const SMESH_ElementSearchermyElemSearcher
std::set< const SMDS_MeshElement * > myRemovedTrias
TopoDS_Shape myShape

Additional Inherited Members

- Public Types inherited from SMESH_ProxyMesh
typedef boost::shared_ptr< SMESH_ProxyMeshPtr
typedef std::map< const SMDS_MeshNode *, const SMDS_MeshNode *, TIDCompareTN2NMap

Detailed Description

"Transforms" quadrilateral faces into triangular ones by creation of pyramids

Constructor & Destructor Documentation

◆ StdMeshers_QuadToTriaAdaptor()

StdMeshers_QuadToTriaAdaptor::StdMeshers_QuadToTriaAdaptor ( )


◆ ~StdMeshers_QuadToTriaAdaptor()

StdMeshers_QuadToTriaAdaptor::~StdMeshers_QuadToTriaAdaptor ( )


References myElemSearcher.

Member Function Documentation

◆ CheckIntersection()

bool StdMeshers_QuadToTriaAdaptor::CheckIntersection ( const gp_Pnt &  P,
const gp_Pnt &  PC,
gp_Pnt &  Pint,
SMESH_Mesh aMesh,
const TopoDS_Shape &  aShape,
const SMDS_MeshElement NotCheckedFace 

Checks if a line segment (P,PC) intersects any mesh face.

P- first segment end
PC- second segment end (it is a gravity center of quadrangle)
Pint- (out) intersection point
aMesh- mesh
aShape- shape to check faces on
NotCheckedFace- mesh face not to check
Return values
bool- true if there is an intersection

References DraftVecUtils::dist(), SMESH_MeshAlgos::GetElementSearcher(), SMESH_ElementSearcher::GetElementsNearLine(), SMESH_Mesh::GetMeshDS(), and myElemSearcher.

Referenced by Compute().

◆ Compute() [1/2]

◆ Compute() [2/2]

◆ Compute2ndPart()

◆ GetShape()

const TopoDS_Shape & StdMeshers_QuadToTriaAdaptor::GetShape ( ) const

◆ MergeAdjacent()

void StdMeshers_QuadToTriaAdaptor::MergeAdjacent ( const SMDS_MeshElement PrmI,
std::set< const SMDS_MeshNode * > &  nodesToMove 

◆ MergePiramids()

◆ Preparation()

int StdMeshers_QuadToTriaAdaptor::Preparation ( const SMDS_MeshElement face,
Handle(TColgp_HArray1OfPnt)&  PN,
Handle(TColgp_HArray1OfVec)&  VN,
std::vector< const SMDS_MeshNode * > &  FNodes,
gp_Pnt &  PC,
gp_Vec &  VNorm,
const SMDS_MeshElement **  volumes = 0 

Prepare data for the given face.

PN- coordinates of face nodes
VN- cross products of vectors (PC-PN(i)) ^ (PC-PN(i+1))
FNodes- face nodes
PC- gravity center of nodes
VNorm- face normal (sum of VN)
volumes- two volumes sharing the given face, the first is in VNorm direction
Return values
int- 0 if given face is not quad, 1 if given face is quad, 2 if given face is degenerate quad (two nodes are coincided)

References SMDS_MeshElement::GetNodeIndex(), myDegNodes, SMDS_MeshElement::NbNodes(), and SMDS_MeshElement::nodesIterator().

Referenced by Compute().

Member Data Documentation

◆ myDegNodes

std::list< const SMDS_MeshNode* > StdMeshers_QuadToTriaAdaptor::myDegNodes

Referenced by Compute2ndPart(), and Preparation().

◆ myElemSearcher

const SMESH_ElementSearcher* StdMeshers_QuadToTriaAdaptor::myElemSearcher

◆ myRemovedTrias

std::set<const SMDS_MeshElement*> StdMeshers_QuadToTriaAdaptor::myRemovedTrias

Referenced by Compute2ndPart(), and MergePiramids().

◆ myShape

TopoDS_Shape StdMeshers_QuadToTriaAdaptor::myShape

Referenced by Compute().

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