"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_Mesh * | GetMesh () const |
SMESHDS_Mesh * | GetMeshDS () const |
Returns mesh DS. More... | |
const SMDS_MeshNode * | GetProxyNode (const SMDS_MeshNode *node) const |
Returns the proxy node of a node; the input node is returned if no proxy exists. More... | |
const SubMesh * | GetProxySubMesh (const TopoDS_Shape &shape) const |
Returns the proxy sub-mesh of a shape; it can be NULL. More... | |
const SMESHDS_SubMesh * | GetSubMesh (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 | |
SubMesh * | findProxySubMesh (int shapeIndex=0) const |
Returns a proxy sub-mesh. More... | |
SubMesh * | getProxySubMesh (const TopoDS_Shape &shape=TopoDS_Shape()) |
Returns a proxy sub-mesh; it is created if not yet exists. More... | |
SubMesh * | getProxySubMesh (int shapeIndex) |
Returns a proxy sub-mesh; it is created if not yet exists. More... | |
virtual SubMesh * | newSubmesh (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_ElementSearcher * | myElemSearcher |
std::set< const SMDS_MeshElement * > | myRemovedTrias |
TopoDS_Shape | myShape |
Additional Inherited Members | |
Public Types inherited from SMESH_ProxyMesh | |
typedef boost::shared_ptr< SMESH_ProxyMesh > | Ptr |
typedef std::map< const SMDS_MeshNode *, const SMDS_MeshNode *, TIDCompare > | TN2NMap |
"Transforms" quadrilateral faces into triangular ones by creation of pyramids
StdMeshers_QuadToTriaAdaptor::StdMeshers_QuadToTriaAdaptor | ( | ) |
Constructor.
StdMeshers_QuadToTriaAdaptor::~StdMeshers_QuadToTriaAdaptor | ( | ) |
Destructor.
References myElemSearcher.
|
protected |
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 |
bool | - true if there is an intersection |
References DraftVecUtils::dist(), SMESH_MeshAlgos::GetElementSearcher(), SMESH_ElementSearcher::GetElementsNearLine(), SMESH_Mesh::GetMeshDS(), and myElemSearcher.
Referenced by Compute().
bool StdMeshers_QuadToTriaAdaptor::Compute | ( | SMESH_Mesh & | aMesh | ) |
Computes pyramids in mesh with no shape.
References SMESH_ProxyMesh::SubMesh::AddElement(), SMESHDS_Mesh::AddFace(), SMESH_MesherHelper::AddNode(), SMESH_MesherHelper::AddVolume(), Compute2ndPart(), SMESHDS_GroupBase::Contains(), DraftVecUtils::dist(), SMDS_Mesh::facesIterator(), SMESH_MeshAlgos::GetElementSearcher(), SMESH_ElementSearcher::GetElementsNearLine(), SMESH_Mesh::GetGroups(), SMESH_Mesh::GetMeshDS(), SMDS_MeshElement::GetNode(), SMESH_ElementSearcher::GetPointState(), SMESH_ProxyMesh::getProxySubMesh(), SMESH_Mesh::GetShapeToMesh(), SMESHDS_GroupBase::GetType(), SMESHDS_GroupBase::IsEmpty(), SMDS_MeshElement::IsQuadratic(), SMESH_MesherHelper::IsQuadraticSubMesh(), myElemSearcher, SMDS_MeshElement::NbNodes(), SMESH_Mesh::NbQuadrangles(), Preparation(), SMESH_MesherHelper::SetElementsOnShape(), SMESH_ProxyMesh::setMesh(), and SMESH_ProxyMesh::storeTmpElement().
bool StdMeshers_QuadToTriaAdaptor::Compute | ( | SMESH_Mesh & | aMesh, |
const TopoDS_Shape & | aShape, | ||
SMESH_ProxyMesh * | aProxyMesh = 0 |
||
) |
References SMESHDS_Mesh::AddFace(), SMESH_MesherHelper::AddNode(), SMESH_MesherHelper::AddVolume(), SMESH_ProxyMesh::SubMesh::ChangeElements(), CheckIntersection(), Compute2ndPart(), DraftVecUtils::dist(), SMESHDS_SubMesh::GetElements(), SMESH_MeshAlgos::GetElementSearcher(), SMESH_ProxyMesh::GetFaces(), SMESH_Mesh::GetMeshDS(), SMESH_ProxyMesh::getProxySubMesh(), SMESH_ProxyMesh::GetSubMesh(), SMESH_MesherHelper::IsQuadraticSubMesh(), SMESH_MesherHelper::IsReversedSubMesh(), SMESHDS_Mesh::MeshElements(), myElemSearcher, myShape, SMESH_MesherHelper::NbAncestors(), Preparation(), SMESH_ProxyMesh::removeTmpElement(), SMESH_MesherHelper::SetElementsOnShape(), SMESH_ProxyMesh::setMesh(), SMESH_ProxyMesh::storeTmpElement(), SMESH_ProxyMesh::takeProxySubMesh(), and SMESH_ProxyMesh::takeTmpElemsInMesh().
Referenced by NETGENPlugin_Mesher::Compute(), and NETGENPlugin_NETGEN_3D::Compute().
|
protected |
Update created pyramids and faces to avoid their intersection.
References SMESH_ProxyMesh::findProxySubMesh(), SMESH_MeshAlgos::GetCommonNodes(), SMESHDS_SubMesh::GetElements(), SMESH_MeshAlgos::GetElementSearcher(), SMESH_ElementSearcher::GetElementsNearLine(), SMESH_Mesh::GetMeshDS(), SMESH_ProxyMesh::GetMeshDS(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::GetNodeIndex(), SMDS_MeshElement::getshapeId(), SMESHDS_Mesh::IsEmbeddedMode(), SMESHDS_Mesh::MaxShapeIndex(), MergeAdjacent(), MergePiramids(), SMESHDS_Mesh::MoveNode(), myDegNodes, myElemSearcher, myRemovedTrias, SMDS_MeshElement::NbCornerNodes(), SMESHDS_SubMesh::NbElements(), SMDS_MeshElement::nodesIterator(), and SMDS_MeshNode::setXYZ().
Referenced by Compute().
const TopoDS_Shape & StdMeshers_QuadToTriaAdaptor::GetShape | ( | ) | const |
Referenced by NETGENPlugin_Mesher::FillNgMesh().
|
protected |
Merges adjacent pyramids.
References SMDS_MeshNode::GetInverseElementIterator(), SMESH_ProxyMesh::GetMesh(), SMDS_MeshElement::GetNode(), MergeAdjacent(), MergePiramids(), and SMDS_MeshElement::NbCornerNodes().
Referenced by Compute2ndPart(), and MergeAdjacent().
|
protected |
Merge the two pyramids (i.e. fuse their apex) and others already merged with them.
References SMDS_MeshElement::begin_nodes(), SMESHDS_Mesh::ChangeElementNodes(), SMDS_MeshElement::end_nodes(), SMDS_MeshNode::GetInverseElementIterator(), SMESH_ProxyMesh::GetMeshDS(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::getshapeId(), SMDS_MeshElement::GetType(), myRemovedTrias, SMDS_MeshNode::NbInverseElements(), SMESHDS_Mesh::RemoveFreeNode(), SMESH_ProxyMesh::removeTmpElement(), and SMDS_MeshNode::setXYZ().
Referenced by Compute2ndPart(), and MergeAdjacent().
|
protected |
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 |
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().
|
protected |
Referenced by Compute2ndPart(), and Preparation().
|
protected |
Referenced by CheckIntersection(), Compute(), Compute2ndPart(), and ~StdMeshers_QuadToTriaAdaptor().
|
protected |
Referenced by Compute2ndPart(), and MergePiramids().
|
protected |
Referenced by Compute().