Data Structures | |
struct | TFreeBorderPart |
struct | CoincidentFreeBorders |
Typedefs | |
typedef std::vector< const SMDS_MeshNode * > | TFreeBorder |
typedef std::vector< TFreeBorder > | TFreeBorderVec |
typedef std::vector < TFreeBorderPart > | TCoincidentGroup |
typedef std::vector < TCoincidentGroup > | TCoincidentGroupVec |
Functions | |
bool | IsOut (const SMDS_MeshElement *element, const gp_Pnt &point, double tol) |
Return true if the point is IN or ON of the element. More... | |
double | GetDistance (const SMDS_MeshElement *elem, const gp_Pnt &point) |
Return minimal distance from a point to an element. More... | |
double | GetDistance (const SMDS_MeshEdge *edge, const gp_Pnt &point) |
Return minimal distance from a point to an edge. More... | |
double | GetDistance (const SMDS_MeshFace *face, const gp_Pnt &point) |
Return minimal distance from a point to a face. More... | |
double | GetDistance (const SMDS_MeshVolume *volume, const gp_Pnt &point) |
Return minimal distance from a point to a volume. More... | |
void | GetBarycentricCoords (const gp_XY &point, const gp_XY &t0, const gp_XY &t1, const gp_XY &t2, double &bc0, double &bc1) |
Returns barycentric coordinates of a point within a triangle. More... | |
const SMDS_MeshElement * | FindFaceInSet (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const TIDSortedElemSet &elemSet, const TIDSortedElemSet &avoidSet, int *i1=0, int *i2=0) |
Return a face having linked nodes n1 and n2 and which is. More... | |
bool | FaceNormal (const SMDS_MeshElement *F, gp_XYZ &normal, bool normalized=true) |
Calculate normal of a mesh face. More... | |
std::vector< const SMDS_MeshNode * > | GetCommonNodes (const SMDS_MeshElement *e1, const SMDS_MeshElement *e2) |
Return nodes common to two elements. More... | |
SMESH_NodeSearcher * | GetNodeSearcher (SMDS_Mesh &mesh) |
Return SMESH_NodeSearcher. More... | |
SMESH_NodeSearcher * | GetNodeSearcher (SMDS_ElemIteratorPtr elemIt) |
Return SMESH_NodeSearcher. More... | |
SMESH_ElementSearcher * | GetElementSearcher (SMDS_Mesh &mesh, double tolerance=-1.) |
Return SMESH_ElementSearcher. More... | |
SMESH_ElementSearcher * | GetElementSearcher (SMDS_Mesh &mesh, SMDS_ElemIteratorPtr elemIt, double tolerance=-1.) |
Return SMESH_ElementSearcher acting on a sub-set of elements. More... | |
void | FindCoincidentFreeBorders (SMDS_Mesh &mesh, double tolerance, CoincidentFreeBorders &foundFreeBordes) |
Returns TFreeBorder's coincident within the given tolerance. More... | |
void | DeMerge (const SMDS_MeshElement *elem, std::vector< const SMDS_MeshNode * > &newNodes, std::vector< const SMDS_MeshNode * > &noMergeNodes) |
Find nodes whose merge makes the element invalid. More... | |
typedef std::vector<TFreeBorderPart> SMESH_MeshAlgos::TCoincidentGroup |
typedef std::vector<TCoincidentGroup> SMESH_MeshAlgos::TCoincidentGroupVec |
typedef std::vector<const SMDS_MeshNode*> SMESH_MeshAlgos::TFreeBorder |
typedef std::vector<TFreeBorder> SMESH_MeshAlgos::TFreeBorderVec |
void SMESH_MeshAlgos::DeMerge | ( | const SMDS_MeshElement * | elem, |
std::vector< const SMDS_MeshNode * > & | newNodes, | ||
std::vector< const SMDS_MeshNode * > & | noMergeNodes | ||
) |
Find nodes whose merge makes the element invalid.
(Implemented in SMESH_DeMerge.cxx)
(Degenerated elem is OK)
[in] | elem | - the element |
[in] | newNodes | - nodes of the element after the merge |
[out] | noMergeNodes | - nodes to undo merge |
References SMDS_MeshCell::applyInterlace(), SMDS_MeshElement::GetEntityType(), SMDS_MeshElement::GetType(), SMDS_MeshCell::interlacedSmdsOrder(), SMDS_MeshElement::IsQuadratic(), SMDS_VolumeTool::Set(), SMDSAbs_Edge, SMDSAbs_Face, and SMDSAbs_Volume.
Referenced by SMESH_MeshEditor::applyMerge().
bool SMESH_MeshAlgos::FaceNormal | ( | const SMDS_MeshElement * | F, |
gp_XYZ & | normal, | ||
bool | normalized = true |
||
) |
Calculate normal of a mesh face.
References SMDS_MeshElement::GetNode(), SMDS_MeshElement::GetType(), SMDS_MeshElement::NbCornerNodes(), SMDSAbs_Face, SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().
Referenced by SMESH_MeshEditor::AffectedElemGroupsInRegion(), SMESH_ElementSearcherImpl::findOuterBoundary(), VISCOUS_3D::_ViscousBuilder::findShapesToSmooth(), SMESH_Mesh_i::GetFaceNormal(), VISCOUS_3D::_ViscousBuilder::getFaceNormal(), SMESH::getNormale(), SMESH_ElementSearcherImpl::GetPointState(), SMESH_MesherHelper::IsReversedSubMesh(), SMESH_MeshEditor::ExtrusParam::makeNodesByNormal2D(), SMESH_MeshEditor::Reorient2D(), VISCOUS_3D::_ViscousBuilder::setShapeData(), SMESHGUI_SplitVolumesDlg::showFacetByElement(), and VISCOUS_3D::_ViscousBuilder::smoothAndCheck().
void SMESH_MeshAlgos::FindCoincidentFreeBorders | ( | SMDS_Mesh & | mesh, |
double | tolerance, | ||
CoincidentFreeBorders & | foundFreeBordes | ||
) |
Returns TFreeBorder's coincident within the given tolerance.
If the tolerance <= 0.0 then one tenth of an average size of elements adjacent to free borders being compared is used.
(Implemented in ./SMESH_FreeBorders.cxx)
References SMESH_MeshAlgos::TFreeBorderPart::_border, SMESH_MeshAlgos::CoincidentFreeBorders::_borders, SMESH_MeshAlgos::CoincidentFreeBorders::_coincidentGroups, SMESH_MeshAlgos::TFreeBorderPart::_node1, SMESH_MeshAlgos::TFreeBorderPart::_node2, SMESH_MeshAlgos::TFreeBorderPart::_nodeLast, SMESH_TNodeXYZ::Distance(), SMDS_Mesh::facesIterator(), SMESH_ElementSearcher::FindElementsByPoint(), GetElementSearcher(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::interlacedNodesIterator(), Max(), SMDS_MeshElement::NbNodes(), SMESH_TLink::node1(), SMESH_TLink::node2(), reverse(), and SMDSAbs_Edge.
Referenced by SMESH_MeshEditor_i::FindCoincidentFreeBorders().
const SMDS_MeshElement * SMESH_MeshAlgos::FindFaceInSet | ( | const SMDS_MeshNode * | n1, |
const SMDS_MeshNode * | n2, | ||
const TIDSortedElemSet & | elemSet, | ||
const TIDSortedElemSet & | avoidSet, | ||
int * | i1 = 0 , |
||
int * | i2 = 0 |
||
) |
Return a face having linked nodes n1 and n2 and which is.
References SMDS_MeshNode::GetInverseElementIterator(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::GetNodeIndex(), SMDS_MeshElement::interlacedNodesElemIterator(), SMDS_MeshElement::IsQuadratic(), SMDS_MeshElement::NbNodes(), and SMDSAbs_Face.
Referenced by findAdjacentFace(), StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), SMESH_ElementSearcherImpl::findOuterBoundary(), VISCOUS_3D::_ViscousBuilder::fixBadFaces(), SMESH_2D_Algo::FixInternalNodes(), _QuadFaceGrid::LoadGrid(), StdMeshers_Penta_3D::LoadIJNodes(), SMESH_MesherHelper::LoadNodeColumns(), SMESH_Pattern::makePolyElements(), SMESH_MeshEditor::makeWalls(), SMESH_MeshEditor::Reorient2D(), and SMESH_MeshEditor::sweepElement().
void SMESH_MeshAlgos::GetBarycentricCoords | ( | const gp_XY & | p, |
const gp_XY & | t0, | ||
const gp_XY & | t1, | ||
const gp_XY & | t2, | ||
double & | bc0, | ||
double & | bc1 | ||
) |
Returns barycentric coordinates of a point within a triangle.
A not returned bc2 = 1. - bc0 - bc1. The point lies within the triangle if ( bc0 >= 0 && bc1 >= 0 && bc0+bc1 <= 1 )
References Abs().
Referenced by FaceQuadStruct::findCell(), and FaceQuadStruct::isNear().
vector< const SMDS_MeshNode * > SMESH_MeshAlgos::GetCommonNodes | ( | const SMDS_MeshElement * | e1, |
const SMDS_MeshElement * | e2 | ||
) |
Return nodes common to two elements.
References SMDS_MeshElement::GetNode(), SMDS_MeshElement::GetNodeIndex(), and SMDS_MeshElement::NbNodes().
Referenced by StdMeshers_QuadToTriaAdaptor::Compute2ndPart(), SMESH_MeshEditor::ConvertFromQuadratic(), and SMESH_ElementSearcherImpl::GetPointState().
double SMESH_MeshAlgos::GetDistance | ( | const SMDS_MeshElement * | elem, |
const gp_Pnt & | point | ||
) |
Return minimal distance from a point to an element.
Currently we ignore non-planarity and 2nd order of face
References SMDS_MeshElement::GetType(), SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Node, and SMDSAbs_Volume.
Referenced by SMESH_ElementSearcherImpl::FindClosestTo(), GetDistance(), and VISCOUS_3D::_SolidData::PrepareEdgesToSmoothOnFace().
double SMESH_MeshAlgos::GetDistance | ( | const SMDS_MeshEdge * | edge, |
const gp_Pnt & | point | ||
) |
Return minimal distance from a point to an edge.
References SMDS_MeshElement::interlacedNodesElemIterator(), Min(), and SMDS_MeshElement::NbNodes().
double SMESH_MeshAlgos::GetDistance | ( | const SMDS_MeshFace * | face, |
const gp_Pnt & | point | ||
) |
Return minimal distance from a point to a face.
Currently we ignore non-planarity and 2nd order of face
References Abs(), SMDS_MeshElement::NbCornerNodes(), and SMDS_MeshElement::nodesIterator().
double SMESH_MeshAlgos::GetDistance | ( | const SMDS_MeshVolume * | volume, |
const gp_Pnt & | point | ||
) |
Return minimal distance from a point to a volume.
Currently we ignore non-planarity and 2nd order
References GetDistance(), SMDS_VolumeTool::GetFaceBaryCenter(), SMDS_VolumeTool::GetFaceNodes(), SMDS_VolumeTool::GetFaceNormal(), SMDS_MeshElement::IsQuadratic(), Min(), SMDS_VolumeTool::NbFaceNodes(), SMDS_VolumeTool::NbFaces(), and SMDS_VolumeTool::SetExternalNormal().
SMESH_ElementSearcher * SMESH_MeshAlgos::GetElementSearcher | ( | SMDS_Mesh & | mesh, |
double | tolerance = -1. |
||
) |
Return SMESH_ElementSearcher.
The caller is responsible for deleting it
Referenced by StdMeshers_QuadToTriaAdaptor::Compute(), StdMeshers_QuadToTriaAdaptor::Compute2ndPart(), VISCOUS_3D::_ViscousBuilder::computeGeomSize(), SMESH_MeshEditor_i::FindAmongElementsByPoint(), FindCoincidentFreeBorders(), VISCOUS_3D::_ViscousBuilder::findCollisionEdges(), SMESH_MeshEditor_i::FindElementsByPoint(), SMESH_MeshEditor::GetHexaFacetsToSplit(), SMESH_MeshEditor_i::GetPointState(), StdMeshers_QuadToTriaAdaptor::LimitHeight(), SMESH_MeshEditor_i::Reorient2D(), SMESH::Controls::ConnectedElements::SetPoint(), and VISCOUS_3D::_ViscousBuilder::smoothAndCheck().
SMESH_ElementSearcher * SMESH_MeshAlgos::GetElementSearcher | ( | SMDS_Mesh & | mesh, |
SMDS_ElemIteratorPtr | elemIt, | ||
double | tolerance = -1. |
||
) |
Return SMESH_ElementSearcher acting on a sub-set of elements.
SMESH_NodeSearcher * SMESH_MeshAlgos::GetNodeSearcher | ( | SMDS_Mesh & | mesh | ) |
Return SMESH_NodeSearcher.
The caller is responsible for deleteing it
Referenced by SMESH_MeshEditor_i::CreateHoleSkin(), SMESH_MeshEditor_i::FindNodeClosestTo(), and SMESH_MeshEditor_i::MoveClosestNodeToPoint().
SMESH_NodeSearcher * SMESH_MeshAlgos::GetNodeSearcher | ( | SMDS_ElemIteratorPtr | elemIt | ) |
Return SMESH_NodeSearcher.
bool SMESH_MeshAlgos::IsOut | ( | const SMDS_MeshElement * | element, |
const gp_Pnt & | point, | ||
double | tol | ||
) |
Return true if the point is IN or ON of the element.
References Abs(), SMDS_MeshElement::GetType(), SMDS_MeshElement::interlacedNodesElemIterator(), SMDS_VolumeTool::IsOut(), Max(), SMDS_MeshElement::NbNodes(), SMDSAbs_Edge, SMDSAbs_Face, and SMDSAbs_Volume.
Referenced by SMESH_ElementSearcherImpl::FindElementsByPoint(), SMESH::Controls::ElementsOnShape::OctreeClassifier::GetClassifiersAtPoint(), SMESH_ElementSearcherImpl::GetPointState(), VISCOUS_2D::_SegmentTree::GetSegmentsNear(), SMESH::Controls::ElementsOnShape::IsSatisfy(), VISCOUS_2D::_ViscousBuilder2D::makePolyLines(), and VISCOUS_3D::_LayerEdge::smoothNefPolygon().