Data Structures | |
struct | Edge |
struct | TFreeBorderPart |
struct | CoincidentFreeBorders |
class | Intersector |
Cut faces of a triangular mesh. More... | |
class | Triangulate |
Divide a mesh face into triangles. More... | |
struct | PolySegment |
Typedefs | |
typedef std::vector< std::vector< const SMDS_MeshElement * > > | TElemGroupVector |
typedef std::vector< std::vector< const SMDS_MeshNode * > > | TNodeGroupVector |
typedef std::vector< const SMDS_MeshNode * > | TFreeBorder |
typedef std::vector< TFreeBorder > | TFreeBorderVec |
typedef std::vector< TFreeBorderPart > | TCoincidentGroup |
typedef std::vector< TCoincidentGroup > | TCoincidentGroupVec |
typedef std::vector< std::pair< const SMDS_MeshElement *, int > > | TElemIntPairVec |
typedef std::vector< std::pair< const SMDS_MeshNode *, int > > | TNodeIntPairVec |
typedef std::vector< PolySegment > | TListOfPolySegments |
Functions | |
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... | |
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, gp_XYZ *closestPnt=0) |
Return minimal distance from a point to an element. More... | |
double | GetDistance (const SMDS_MeshEdge *edge, const gp_Pnt &point, gp_XYZ *closestPnt=0) |
Return minimal distance from a point to an edge. More... | |
double | GetDistance (const SMDS_MeshFace *face, const gp_Pnt &point, gp_XYZ *closestPnt=0) |
Return minimal distance from a point to a face. More... | |
double | GetDistance (const SMDS_MeshVolume *volume, const gp_Pnt &point, gp_XYZ *closestPnt=0) |
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... | |
bool | IntersectRayVolume (const gp_Ax1 &ray, const double rayLen, const SMDS_MeshElement *vol, double &tMin, double &tMax, int &iFacetMin, int &iFacetMax) |
Intersect volume by a ray. 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... | |
int | NbCommonNodes (const SMDS_MeshElement *e1, const SMDS_MeshElement *e2) |
Return number of nodes common to two elements. More... | |
std::vector< const SMDS_MeshNode * > | GetCommonNodes (const SMDS_MeshElement *e1, const SMDS_MeshElement *e2) |
Return nodes common to two elements. More... | |
bool | IsOn2DBoundary (const SMDS_MeshNode *node, std::vector< const SMDS_MeshNode * > *neibors=nullptr) |
Return true if a node is on a boundary of 2D mesh. More... | |
bool | IsRightOrder (const SMDS_MeshElement *face, const SMDS_MeshNode *node0, const SMDS_MeshNode *node1) |
Return true if node1 encounters first in the face and node2, after. More... | |
void | Get1DBranches (SMDS_ElemIteratorPtr edgeIt, TElemGroupVector &edgeGroups, TNodeGroupVector &nodeGroups, const SMDS_MeshNode *startNode=0) |
Partition given 1D elements into groups of contiguous edges. More... | |
template<class ElemIter > | |
void | MarkElems (ElemIter it, const bool isMarked) |
Mark elements given by SMDS_Iterator. More... | |
template<class ElemIter > | |
void | MarkElems (ElemIter it, ElemIter end, const bool isMarked) |
Mark elements given by std iterators. More... | |
template<class ElemIter > | |
void | MarkElemNodes (ElemIter it, const bool isMarked, const bool markElem=false) |
Mark nodes of elements given by SMDS_Iterator. More... | |
template<class ElemIter > | |
void | MarkElemNodes (ElemIter it, ElemIter end, const bool isMarked, const bool markElem=false) |
Mark elements given by std iterators. More... | |
std::vector< Edge > | FindSharpEdges (SMDS_Mesh *mesh, double angle, bool addExisting) |
Return sharp edges of faces and non-manifold ones. More... | |
std::vector< std::vector< const SMDS_MeshElement * > > | SeparateFacesByEdges (SMDS_Mesh *mesh, const std::vector< Edge > &edges) |
Distribute all faces of the mesh between groups using given edges. More... | |
void | FindCoincidentFreeBorders (SMDS_Mesh &mesh, double tolerance, CoincidentFreeBorders &foundFreeBordes) |
Returns TFreeBorder's coincident within the given tolerance. More... | |
void | FindFreeBorders (SMDS_Mesh &mesh, TFreeBorderVec &foundFreeBordes, const bool closedOnly, bool *isManifold=0, bool *isGoodOri=0) |
Returns all or only closed TFreeBorder's. More... | |
void | FillHole (const TFreeBorder &freeBorder, SMDS_Mesh &mesh, std::vector< const SMDS_MeshElement * > &newFaces) |
Fill a hole defined by a TFreeBorder with 2D elements. 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... | |
SMDS_Mesh * | MakeOffset (SMDS_ElemIteratorPtr faceIt, SMDS_Mesh &mesh, const double offset, const bool theFixIntersections, TElemIntPairVec &new2OldFaces, TNodeIntPairVec &new2OldNodes) |
Create an offset mesh of given faces. More... | |
void | MakePolyLine (SMDS_Mesh *mesh, TListOfPolySegments &segments, std::vector< const SMDS_MeshElement * > &newEdges, std::vector< const SMDS_MeshNode * > &newNodes, SMDS_MeshGroup *group=0, SMESH_ElementSearcher *searcher=0) |
Create a polyline consisting of 1D mesh elements each lying on a 2D element of the initial mesh. More... | |
std::vector< Edge > | MakeSlot (SMDS_ElemIteratorPtr segmentIt, double width, SMDS_Mesh *mesh, std::vector< SMDS_MeshGroup * > &groupsToUpdate) |
Create a slot of given width around given 1D elements lying on a triangle mesh. More... | |
int | MaxIndex (const gp_XYZ &x) |
Return coordinate index with maximal abs value. More... | |
typedef std::vector<TFreeBorderPart> SMESH_MeshAlgos::TCoincidentGroup |
typedef std::vector<TCoincidentGroup> SMESH_MeshAlgos::TCoincidentGroupVec |
typedef std::vector< std::vector< const SMDS_MeshElement* > > SMESH_MeshAlgos::TElemGroupVector |
typedef std::vector< std::pair< const SMDS_MeshElement*, int > > SMESH_MeshAlgos::TElemIntPairVec |
typedef std::vector<const SMDS_MeshNode*> SMESH_MeshAlgos::TFreeBorder |
typedef std::vector<TFreeBorder> SMESH_MeshAlgos::TFreeBorderVec |
typedef std::vector<PolySegment> SMESH_MeshAlgos::TListOfPolySegments |
typedef std::vector< std::vector< const SMDS_MeshNode* > > SMESH_MeshAlgos::TNodeGroupVector |
typedef std::vector< std::pair< const SMDS_MeshNode*, int > > SMESH_MeshAlgos::TNodeIntPairVec |
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.
(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_MeshAlgos::Intersector::CutByPlanes(), SMESH_ElementSearcherImpl::findOuterBoundary(), VISCOUS_3D::_ViscousBuilder::findShapesToSmooth(), FindSharpEdges(), VISCOUS_3D::_ViscousBuilder::getFaceNormal(), SMESH_Mesh_i::GetFaceNormal(), SMESHGUI_Angle::getNormal(), SMESH::getNormale(), SMESH_ElementSearcherImpl::GetPointState(), SMESH_MesherHelper::IsReversedSubMesh(), SMESH_MeshEditor::ExtrusParam::makeNodesByNormal2D(), MakeOffset(), MakePolyLine(), SMESH_MeshEditor::Reorient2D(), VISCOUS_3D::_ViscousBuilder::setShapeData(), SMESHGUI_SplitVolumesDlg::showFacetByElement(), and VISCOUS_3D::_ViscousBuilder::smoothAndCheck().
void SMESH_MeshAlgos::FillHole | ( | const TFreeBorder & | freeBorder, |
SMDS_Mesh & | mesh, | ||
std::vector< const SMDS_MeshElement * > & | newFaces | ||
) |
Fill a hole defined by a TFreeBorder with 2D elements.
Fill with 2D elements a hole defined by a TFreeBorder.
References ObjectPool< X >::getNew(), and SMDSAbs_Face.
Referenced by SMESH_MeshEditor_i::FillHole().
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.
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, SMDS_Mesh::facesIterator(), SMESH_ElementSearcher::FindElementsByPoint(), GetElementSearcher(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::interlacedNodesIterator(), 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::interlacedNodesIterator(), SMDS_MeshElement::IsQuadratic(), SMDS_MeshElement::NbNodes(), and SMDSAbs_Face.
Referenced by SMESH_MeshEditor_i::AddNodeOnSegment(), findAdjacentFace(), StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), SMESH_ElementSearcherImpl::findOuterBoundary(), VISCOUS_3D::_ViscousBuilder::fixBadFaces(), SMESH_2D_Algo::FixInternalNodes(), StdMeshers_Penta_3D::LoadIJNodes(), SMESH_MesherHelper::LoadNodeColumns(), SMESH_MeshEditor::MakeBoundaryMesh(), SMESH_Pattern::makePolyElements(), SMESH_MeshEditor::makeWalls(), SMESH_MeshEditor::Reorient2D(), SMESH_MeshEditor::SewSideElements(), and SMESH_MeshEditor::sweepElement().
void SMESH_MeshAlgos::FindFreeBorders | ( | SMDS_Mesh & | mesh, |
TFreeBorderVec & | foundFreeBordes, | ||
const bool | closedOnly, | ||
bool * | isManifold = 0 , |
||
bool * | isGoodOri = 0 |
||
) |
Returns all or only closed TFreeBorder's.
Optionally check if the mesh is manifold and if faces are correctly oriented.
References SMDS_Mesh::facesIterator(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::interlacedNodesIterator(), IsRightOrder(), SMDS_MeshElement::NbNodes(), SMESH_TLink::node1(), and SMESH_TLink::node2().
Referenced by SMESH_MeshEditor_i::FindFreeBorders(), SMESH_MeshEditor_i::IsCoherentOrientation2D(), and SMESH_MeshEditor_i::IsManifold().
std::vector< SMESH_MeshAlgos::Edge > SMESH_MeshAlgos::FindSharpEdges | ( | SMDS_Mesh * | theMesh, |
double | theAngle, | ||
bool | theAddExisting | ||
) |
Return sharp edges of faces and non-manifold ones.
Optionally adds existing edges to the result. Angle is in degrees.
Optionally adds existing edges.
References SMESH_MeshAlgos::Edge::_medium, SMESH_MeshAlgos::Edge::_node1, SMESH_MeshAlgos::Edge::_node2, SMDS_MeshElement::begin_nodes(), SMDS_Mesh::edgesIterator(), SMDS_MeshElement::end_nodes(), FaceNormal(), SMDS_Mesh::facesIterator(), SMDS_Mesh::GetElementsByNodes(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::IsQuadratic(), SMDS_MeshElement::NbCornerNodes(), SMDS_Mesh::NbFaces(), SMESH_TLink::node1(), SMESH_TLink::node2(), and SMDSAbs_Face.
Referenced by SMESH_Mesh_i::FaceGroupsSeparatedByEdges(), and SMESH_MeshEditor_i::FindSharpEdges().
void SMESH_MeshAlgos::Get1DBranches | ( | SMDS_ElemIteratorPtr | theEdgeIt, |
TElemGroupVector & | theEdgeGroups, | ||
TNodeGroupVector & | theNodeGroups, | ||
const SMDS_MeshNode * | theStartNode = 0 |
||
) |
Partition given 1D elements into groups of contiguous edges.
A node where number of meeting edges != 2 is a group end. An optional startNode is used to orient groups it belongs to.
References begin(), end(), SMDS_MeshNode::GetNode(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::GetType(), reverse(), and SMDSAbs_Edge.
Referenced by SMESH_MeshEditor::ExtrusionAlongTrack(), and SMESH_MeshEditor_i::Get1DBranches().
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 )
Referenced by FaceQuadStruct::findCell(), SMESH_Delaunay::FindTriangle(), FaceQuadStruct::isNear(), and SMESH_MeshAlgos::Intersector::Algo::isPointInTriangle().
std::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().
double SMESH_MeshAlgos::GetDistance | ( | const SMDS_MeshEdge * | edge, |
const gp_Pnt & | point, | ||
gp_XYZ * | closestPnt = 0 |
||
) |
Return minimal distance from a point to an edge.
References MESHCUT::d, SMDS_MeshCell::interlacedNodesIterator(), and SMDS_MeshCell::NbNodes().
double SMESH_MeshAlgos::GetDistance | ( | const SMDS_MeshElement * | elem, |
const gp_Pnt & | point, | ||
gp_XYZ * | closestPnt = 0 |
||
) |
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(), MakeSlot(), SMESHGUI_AddNodeOnFaceOp::pointLocationChanged(), SMESHGUI_AddNodeOnFaceOp::processStyleEvents(), and SMESH_ElementSearcherImpl::Project().
double SMESH_MeshAlgos::GetDistance | ( | const SMDS_MeshFace * | face, |
const gp_Pnt & | point, | ||
gp_XYZ * | closestPnt = 0 |
||
) |
Return minimal distance from a point to a face.
Currently we ignore non-planarity and 2nd order of face
References GetDistance(), SMESH_MeshAlgos::Triangulate::GetTriangles(), SMDS_MeshCell::NbCornerNodes(), and SMDS_MeshCell::nodesIterator().
double SMESH_MeshAlgos::GetDistance | ( | const SMDS_MeshVolume * | volume, |
const gp_Pnt & | point, | ||
gp_XYZ * | closestPnt = 0 |
||
) |
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_MeshCell::IsQuadratic(), 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(), MakeOffset(), MakePolyLine(), SMESH_MeshEditor_i::MakePolyLine(), MakeSlot(), SMESH::Measurements_i::MinDistance(), SMESH_MeshEditor_i::ProjectPoint(), 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_ElemIteratorPtr | elemIt | ) |
Return SMESH_NodeSearcher.
SMESH_NodeSearcher * SMESH_MeshAlgos::GetNodeSearcher | ( | SMDS_Mesh & | mesh | ) |
Return SMESH_NodeSearcher.
The caller is responsible for deleting it
Referenced by SMESH_MeshEditor_i::CreateHoleSkin(), SMESH_MeshEditor_i::FindNodeClosestTo(), and SMESH_MeshEditor_i::MoveClosestNodeToPoint().
bool SMESH_MeshAlgos::IntersectRayVolume | ( | const gp_Ax1 & | ray, |
const double | rayLen, | ||
const SMDS_MeshElement * | vol, | ||
double & | tMin, | ||
double & | tMax, | ||
int & | iFacetMin, | ||
int & | iFacetMax | ||
) |
Intersect volume by a ray.
Intersect a ray with a convex volume.
[in] | ray | - the ray |
[in] | rayLen | - ray length |
[in] | vol | - the volume |
[out] | tMin | - return a ray parameter where the ray enters the volume |
[out] | tMax | - return a ray parameter where the ray exit the volume |
[out] | iFacetMin | - facet index where the ray enters the volume |
[out] | iFacetMax | - facet index where the ray exit the volume |
References SMDS_VolumeTool::GetFaceNodes(), SMDS_VolumeTool::GetFaceNormal(), SMDS_VolumeTool::NbFaces(), and SMDS_VolumeTool::Set().
bool SMESH_MeshAlgos::IsOn2DBoundary | ( | const SMDS_MeshNode * | theNode, |
std::vector< const SMDS_MeshNode * > * | theNeibors = nullptr |
||
) |
Return true if a node is on a boundary of 2D mesh.
Optionally returns two neighboring boundary nodes (or more in non-manifold mesh)
References SMDS_MeshNode::GetInverseElementIterator(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::GetNodeIndex(), SMDS_MeshElement::NbCornerNodes(), and SMDSAbs_Face.
Referenced by SMESH_MeshEditor::RemoveNodeWithReconnection().
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 SMDS_MeshElement::GetType(), SMDS_MeshElement::interlacedNodesIterator(), SMDS_VolumeTool::IsOut(), 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().
bool SMESH_MeshAlgos::IsRightOrder | ( | const SMDS_MeshElement * | face, |
const SMDS_MeshNode * | node0, | ||
const SMDS_MeshNode * | node1 | ||
) |
Return true if node1 encounters first in the face and node2, after.
The nodes are supposed to be neighbor nodes in the face.
References SMDS_MeshElement::GetNodeIndex(), SMDS_MeshElement::IsMediumNode(), SMDS_MeshElement::IsQuadratic(), and SMDS_MeshElement::NbNodes().
Referenced by FindFreeBorders().
SMDS_Mesh * SMESH_MeshAlgos::MakeOffset | ( | SMDS_ElemIteratorPtr | theFaceIt, |
SMDS_Mesh & | theSrcMesh, | ||
const double | theOffset, | ||
const bool | theFixIntersections, | ||
TElemIntPairVec & | theNew2OldFaces, | ||
TNodeIntPairVec & | theNew2OldNodes | ||
) |
Create an offset mesh of given faces.
Create an offsetMesh of given faces.
[in] | faceIt | - the input faces |
[in] | theFixIntersections | - to fix self intersections of the offset mesh or not |
[out] | new2OldFaces | - history of faces |
[out] | new2OldNodes | - history of nodes |
[in] | faceIt | - the input faces |
[out] | new2OldFaces | - history of faces (new face -> old face ID) |
[out] | new2OldNodes | - history of nodes (new node -> old node ID) |
References SMDS_Mesh::AddFace(), SMDS_Mesh::AddNode(), SMDS_Mesh::AddNodeWithID(), SMDS_Mesh::AddPolygonalFace(), SMDS_Mesh::AddQuadPolygonalFace(), SMDS_MeshElement::begin_nodes(), SMDS_Mesh::ChangeElementNodes(), SMESH_MeshAlgos::Intersector::Cut(), SMDS_MeshElement::end_nodes(), FaceNormal(), SMDS_Mesh::FindNode(), GetElementSearcher(), SMDS_MeshElement::GetEntityType(), SMDS_MeshElement::GetID(), SMDS_MeshNode::GetInverseElementIterator(), SMDS_Mesh::GetMeshInfo(), SMDS_MeshElement::GetNodeIndex(), SMDS_MeshElement::GetType(), SMDS_MeshElement::isMarked(), SMESH_MeshAlgos::Intersector::MakeNewFaces(), SMDS_Mesh::MoveNode(), SMDS_MeshInfo::NbFaces(), SMDS_MeshInfo::NbTriangles(), SMESH_TNodeXYZ::Node(), SMDS_MeshElement::nodesIterator(), ORDER_QUADRATIC, SMDS_Mesh::RemoveFreeElement(), SMESH_TNodeXYZ::Set(), SMDS_MeshElement::setIsMarked(), SMDSAbs_Face, SMDSEntity_BiQuad_Quadrangle, SMDSEntity_BiQuad_Triangle, SMDSEntity_Polygon, SMDSEntity_Quad_Polygon, SMDSEntity_Quad_Quadrangle, SMDSEntity_Quad_Triangle, SMDSEntity_Quadrangle, SMDSEntity_Triangle, and SMDS_MeshNode::X().
Referenced by SMESH_MeshEditor::Offset().
void SMESH_MeshAlgos::MakePolyLine | ( | SMDS_Mesh * | mesh, |
TListOfPolySegments & | segments, | ||
std::vector< const SMDS_MeshElement * > & | newEdges, | ||
std::vector< const SMDS_MeshNode * > & | newNodes, | ||
SMDS_MeshGroup * | group = 0 , |
||
SMESH_ElementSearcher * | searcher = 0 |
||
) |
Create a polyline consisting of 1D mesh elements each lying on a 2D element of the initial mesh.
Positions of new nodes are found by cutting the mesh by the plane passing through pairs of points specified by each PolySegment structure. If there are several paths connecting a pair of points, the shortest path is selected by the module. Position of the cutting plane is defined by the two points and an optional vector lying on the plane specified by a PolySegment. By default the vector is defined by Mesh module as following. A middle point of the two given points is computed. The middle point is projected to the mesh. The vector goes from the middle point to the projection point. In case of planar mesh, the vector is normal to the mesh.
[in,out] | segments | - PolySegment's defining positions of cutting planes. Return the used vector and position of the middle point. |
[in] | group | - an optional group where created mesh segments will be added. |
References SMESHUtils::Deleter< TOBJ >::_obj, SMDS_MeshGroup::Add(), SMDS_Mesh::AddEdge(), SMDS_Mesh::AddNode(), FaceNormal(), GetElementSearcher(), SMESH_ElementSearcher::GetElementsInSphere(), SMESH_MeshAlgos::PolySegment::myFace, SMESH_MeshAlgos::PolySegment::myMidProjPoint, SMESH_MeshAlgos::PolySegment::myNode1, SMESH_MeshAlgos::PolySegment::myNode2, SMESH_MeshAlgos::PolySegment::myVector, SMESH_MeshAlgos::PolySegment::myXYZ, SMDS_Mesh::nodesIterator(), SMESH_ElementSearcher::Project(), and SMDSAbs_Face.
Referenced by SMESH_MeshEditor_i::MakePolyLine(), and MakeSlot().
std::vector< SMESH_MeshAlgos::Edge > SMESH_MeshAlgos::MakeSlot | ( | SMDS_ElemIteratorPtr | theSegmentIt, |
double | theWidth, | ||
SMDS_Mesh * | theMesh, | ||
std::vector< SMDS_MeshGroup * > & | theGroupsToUpdate | ||
) |
Create a slot of given width around given 1D elements lying on a triangle mesh.
The slot is constructed by cutting faces by cylindrical surfaces made around each segment.
References SMDS_MeshElement::begin_nodes(), SMDS_Mesh::Contains(), SMESH_MeshAlgos::Intersector::Cut(), MESHCUT::d, SMDS_MeshElement::end_nodes(), GetDistance(), SMDS_Mesh::GetElementsByNodes(), GetElementSearcher(), SMDS_MeshNode::GetInverseElementIterator(), ObjectPool< X >::getNew(), SMDS_MeshNode::GetNode(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::GetType(), SMESH_MeshAlgos::Intersector::MakeNewFaces(), MakePolyLine(), SMESH_MeshAlgos::PolySegment::myNode1, SMESH_MeshAlgos::PolySegment::myNode2, SMESH_MeshAlgos::PolySegment::myVector, SMESH_MeshAlgos::PolySegment::myXYZ, SMDS_MeshElement::NbCornerNodes(), SMESH_TNodeXYZ::Node(), SMDS_MeshElement::nodeIterator(), SMDS_Mesh::RemoveFreeElement(), SMDS_Mesh::RemoveNode(), SMDSAbs_Edge, and SMDSAbs_Face.
Referenced by SMESH_MeshEditor_i::MakeSlot().
void SMESH_MeshAlgos::MarkElemNodes | ( | ElemIter | it, |
const bool | isMarked, | ||
const bool | markElem = false |
||
) |
Mark nodes of elements given by SMDS_Iterator.
References MarkElems(), SMDS_MeshElement::nodesIterator(), and SMDS_MeshElement::setIsMarked().
void SMESH_MeshAlgos::MarkElemNodes | ( | ElemIter | it, |
ElemIter | end, | ||
const bool | isMarked, | ||
const bool | markElem = false |
||
) |
Mark elements given by std iterators.
References end(), and MarkElems().
void SMESH_MeshAlgos::MarkElems | ( | ElemIter | it, |
const bool | isMarked | ||
) |
Mark elements given by SMDS_Iterator.
Referenced by SMESH_MeshEditor::DoubleElements(), SMESH_OctreeNode::FindCoincidentNodes(), SMESH::Measurements_i::GravityCenter(), and MarkElemNodes().
void SMESH_MeshAlgos::MarkElems | ( | ElemIter | it, |
ElemIter | end, | ||
const bool | isMarked | ||
) |
Mark elements given by std iterators.
References end().
int SMESH_MeshAlgos::MaxIndex | ( | const gp_XYZ & | x | ) |
Return coordinate index with maximal abs value.
Referenced by SMESH_MeshAlgos::Intersector::Algo::Cut(), and SMESH_MeshAlgos::Intersector::Algo::setPlaneIndices().
int SMESH_MeshAlgos::NbCommonNodes | ( | const SMDS_MeshElement * | e1, |
const SMDS_MeshElement * | e2 | ||
) |
Return number of nodes common to two elements.
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().
std::vector< std::vector< const SMDS_MeshElement * > > SMESH_MeshAlgos::SeparateFacesByEdges | ( | SMDS_Mesh * | mesh, |
const std::vector< Edge > & | edges | ||
) |
Distribute all faces of the mesh between groups using given edges.
Distribute all faces of the mesh between groups using given edges as group boundaries.
References SMDS_MeshElement::begin_nodes(), SMDS_MeshElement::end_nodes(), SMDS_Mesh::facesIterator(), SMDS_MeshElement::isMarked(), SMDS_MeshElement::NbCornerNodes(), SMDS_Mesh::NbFaces(), and SMDS_MeshElement::setIsMarked().
Referenced by SMESH_Mesh_i::FaceGroupsSeparatedByEdges().