SALOME - SMESH
SMESH_MeshEditor Class Reference

Editor of a mesh. More...

#include <SMESH_MeshEditor.hxx>

Collaboration diagram for SMESH_MeshEditor:
Collaboration graph

Data Structures

struct  ExtrusParam
 

Public Types

enum  SmoothMethod { LAPLACIAN = 0, CENTROIDAL }
 
enum  ExtrusionFlags { EXTRUSION_FLAG_BOUNDARY = 0x01, EXTRUSION_FLAG_SEW = 0x02 }
 
enum  Extrusion_Error {
  EXTR_OK, EXTR_NO_ELEMENTS, EXTR_PATH_NOT_EDGE, EXTR_BAD_PATH_SHAPE,
  EXTR_BAD_STARTING_NODE, EXTR_BAD_ANGLES_NUMBER, EXTR_CANT_GET_TANGENT
}
 
enum  Sew_Error {
  SEW_OK, SEW_BORDER1_NOT_FOUND, SEW_BORDER2_NOT_FOUND, SEW_BOTH_BORDERS_NOT_FOUND,
  SEW_BAD_SIDE_NODES, SEW_VOLUMES_TO_SPLIT, SEW_DIFF_NB_OF_ELEMENTS, SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
  SEW_BAD_SIDE1_NODES, SEW_BAD_SIDE2_NODES, SEW_INTERNAL_ERROR
}
 
typedef std::auto_ptr< std::list< int > > PGroupIDs
 
typedef std::list< std::list< const SMDS_MeshNode *> > TListOfListOfNodes
 
typedef std::list< std::list< int > > TListOfListOfElementsID
 

Public Member Functions

 SMESH_MeshEditor (SMESH_Mesh *theMesh)
 
SMDS_MeshElementAddElement (const std::vector< const SMDS_MeshNode *> &nodes, const SMDSAbs_ElementType type, const bool isPoly, const int ID=0)
 Add element. More...
 
SMDS_MeshElementAddElement (const std::vector< int > &nodeIDs, const SMDSAbs_ElementType type, const bool isPoly, const int ID=0)
 Add element. More...
 
bool Remove (const std::list< int > &theElemIDs, const bool isNodes)
 
bool InverseDiag (const SMDS_MeshElement *theTria1, const SMDS_MeshElement *theTria2)
 
bool InverseDiag (const SMDS_MeshNode *theNode1, const SMDS_MeshNode *theNode2)
 
bool DeleteDiag (const SMDS_MeshNode *theNode1, const SMDS_MeshNode *theNode2)
 
bool Reorient (const SMDS_MeshElement *theElement)
 
bool TriToQuad (TIDSortedElemSet &theElems, SMESH::Controls::NumericalFunctorPtr theCriterion, const double theMaxAngle)
 Fuse neighbour triangles into quadrangles. More...
 
bool QuadToTri (TIDSortedElemSet &theElems, SMESH::Controls::NumericalFunctorPtr theCriterion)
 Split quadrangles into triangles. More...
 
bool QuadToTri (TIDSortedElemSet &theElems, const bool the13Diag)
 Split quadrangles into triangles. More...
 
int BestSplit (const SMDS_MeshElement *theQuad, SMESH::Controls::NumericalFunctorPtr theCriterion)
 Find better diagonal for splitting. More...
 
void Smooth (TIDSortedElemSet &theElements, std::set< const SMDS_MeshNode *> &theFixedNodes, const SmoothMethod theSmoothMethod, const int theNbIterations, double theTgtAspectRatio=1.0, const bool the2D=true)
 
PGroupIDs RotationSweep (TIDSortedElemSet &theElements, const gp_Ax1 &theAxis, const double theAngle, const int theNbSteps, const double theToler, const bool theMakeGroups, const bool theMakeWalls=true)
 
const SMDS_MeshNodeCreateNode (const double x, const double y, const double z, const double tolnode, SMESH_SequenceOfNode &aNodes)
 
PGroupIDs ExtrusionSweep (TIDSortedElemSet &theElems, const gp_Vec &theStep, const int theNbSteps, TElemOfElemListMap &newElemsMap, const bool theMakeGroups, const int theFlags=EXTRUSION_FLAG_BOUNDARY, const double theTolerance=1.e-6)
 
PGroupIDs ExtrusionSweep (TIDSortedElemSet &theElems, ExtrusParam &theParams, TElemOfElemListMap &newElemsMap, const bool theMakeGroups, const int theFlags, const double theTolerance)
 
Extrusion_Error ExtrusionAlongTrack (TIDSortedElemSet &theElements, SMESH_subMesh *theTrackPattern, const SMDS_MeshNode *theNodeStart, const bool theHasAngles, std::list< double > &theAngles, const bool theLinearVariation, const bool theHasRefPoint, const gp_Pnt &theRefPoint, const bool theMakeGroups)
 
Extrusion_Error ExtrusionAlongTrack (TIDSortedElemSet &theElements, SMESH_Mesh *theTrackPattern, const SMDS_MeshNode *theNodeStart, const bool theHasAngles, std::list< double > &theAngles, const bool theLinearVariation, const bool theHasRefPoint, const gp_Pnt &theRefPoint, const bool theMakeGroups)
 
PGroupIDs Transform (TIDSortedElemSet &theElements, const gp_Trsf &theTrsf, const bool theCopy, const bool theMakeGroups, SMESH_Mesh *theTargetMesh=0)
 
void FindCoincidentNodes (std::set< const SMDS_MeshNode *> &theNodes, const double theTolerance, TListOfListOfNodes &theGroupsOfNodes)
 
SMESH_NodeSearcherGetNodeSearcher ()
 Return SMESH_NodeSearcher. More...
 
SMESH_ElementSearcherGetElementSearcher ()
 Return SMESH_ElementSearcher. More...
 
int SimplifyFace (const std::vector< const SMDS_MeshNode *> faceNodes, std::vector< const SMDS_MeshNode *> &poly_nodes, std::vector< int > &quantities) const
 
void MergeNodes (TListOfListOfNodes &theNodeGroups)
 
void FindEqualElements (std::set< const SMDS_MeshElement *> &theElements, TListOfListOfElementsID &theGroupsOfElementsID)
 
void MergeElements (TListOfListOfElementsID &theGroupsOfElementsID)
 
void MergeEqualElements ()
 
Sew_Error SewFreeBorder (const SMDS_MeshNode *theBorderFirstNode, const SMDS_MeshNode *theBorderSecondNode, const SMDS_MeshNode *theBorderLastNode, const SMDS_MeshNode *theSide2FirstNode, const SMDS_MeshNode *theSide2SecondNode, const SMDS_MeshNode *theSide2ThirdNode=0, const bool theSide2IsFreeBorder=true, const bool toCreatePolygons=false, const bool toCreatePolyedrs=false)
 
Sew_Error SewSideElements (TIDSortedElemSet &theSide1, TIDSortedElemSet &theSide2, const SMDS_MeshNode *theFirstNode1ToMerge, const SMDS_MeshNode *theFirstNode2ToMerge, const SMDS_MeshNode *theSecondNode1ToMerge, const SMDS_MeshNode *theSecondNode2ToMerge)
 
void InsertNodesIntoLink (const SMDS_MeshElement *theFace, const SMDS_MeshNode *theBetweenNode1, const SMDS_MeshNode *theBetweenNode2, std::list< const SMDS_MeshNode *> &theNodesToInsert, const bool toCreatePoly=false)
 
void UpdateVolumes (const SMDS_MeshNode *theBetweenNode1, const SMDS_MeshNode *theBetweenNode2, std::list< const SMDS_MeshNode *> &theNodesToInsert)
 
void ConvertToQuadratic (const bool theForce3d)
 
bool ConvertFromQuadratic ()
 
int FindShape (const SMDS_MeshElement *theElem)
 
SMESH_MeshGetMesh ()
 
SMESHDS_MeshGetMeshDS ()
 
const SMESH_SequenceOfElemPtrGetLastCreatedNodes () const
 
const SMESH_SequenceOfElemPtrGetLastCreatedElems () const
 
bool DoubleNodes (const std::list< int > &theListOfNodes, const std::list< int > &theListOfModifiedElems)
 
bool DoubleNodes (const TIDSortedElemSet &theElems, const TIDSortedElemSet &theNodesNot, const TIDSortedElemSet &theAffectedElems)
 
bool DoubleNodesInRegion (const TIDSortedElemSet &theElems, const TIDSortedElemSet &theNodesNot, const TopoDS_Shape &theShape)
 
bool Make2DMeshFrom3D ()
 Generated skin mesh (containing 2D cells) from 3D mesh The created 2D mesh elements based on nodes of free faces of boundary volumes. More...
 

Static Public Member Functions

static 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...
 
static bool CheckFreeBorderNodes (const SMDS_MeshNode *theNode1, const SMDS_MeshNode *theNode2, const SMDS_MeshNode *theNode3=0)
 
static bool FindFreeBorder (const SMDS_MeshNode *theFirstNode, const SMDS_MeshNode *theSecondNode, const SMDS_MeshNode *theLastNode, std::list< const SMDS_MeshNode * > &theNodes, std::list< const SMDS_MeshElement * > &theFaces)
 
static void AddToSameGroups (const SMDS_MeshElement *elemToAdd, const SMDS_MeshElement *elemInGroups, SMESHDS_Mesh *aMesh)
 
static void RemoveElemFromGroups (const SMDS_MeshElement *element, SMESHDS_Mesh *aMesh)
 
static void ReplaceElemInGroups (const SMDS_MeshElement *elemToRm, const SMDS_MeshElement *elemToAdd, SMESHDS_Mesh *aMesh)
 
static void GetLinkedNodes (const SMDS_MeshNode *node, TIDSortedElemSet &linkedNodes, SMDSAbs_ElementType type=SMDSAbs_All)
 Return nodes linked to the given one in elements of the type. More...
 
static const SMDS_MeshElementFindFaceInSet (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const TIDSortedElemSet &elemSet, const TIDSortedElemSet &avoidSet)
 
static Sew_Error FindMatchingNodes (std::set< const SMDS_MeshElement *> &theSide1, std::set< const SMDS_MeshElement *> &theSide2, const SMDS_MeshNode *theFirstNode1, const SMDS_MeshNode *theFirstNode2, const SMDS_MeshNode *theSecondNode1, const SMDS_MeshNode *theSecondNode2, TNodeNodeMap &nReplaceMap)
 Find corresponding nodes in two sets of faces. More...
 
static bool IsMedium (const SMDS_MeshNode *node, const SMDSAbs_ElementType typeToCheck=SMDSAbs_All)
 Returns true if given node is medium. More...
 

Private Types

typedef std::map< const SMDS_MeshNode *, std::list< const SMDS_MeshNode * > > TNodeOfNodeListMap
 
typedef TNodeOfNodeListMap::iterator TNodeOfNodeListMapItr
 
typedef std::vector< TNodeOfNodeListMapItrTVecOfNnlmiMap
 
typedef std::map< const SMDS_MeshElement *, TVecOfNnlmiMapTElemOfVecOfNnlmiMap
 

Private Member Functions

int convertElemToQuadratic (SMESHDS_SubMesh *theSm, SMESH_MesherHelper &theHelper, const bool theForce3d)
 Convert elements contained in a submesh to quadratic. More...
 
int removeQuadElem (SMESHDS_SubMesh *theSm, SMDS_ElemIteratorPtr theItr, const int theShapeID)
 Convert quadratic elements to linear ones and remove quadratic nodes. More...
 
PGroupIDs generateGroups (const SMESH_SequenceOfElemPtr &nodeGens, const SMESH_SequenceOfElemPtr &elemGens, const std::string &postfix, SMESH_Mesh *targetMesh=0)
 Create groups of elements made during transformation. More...
 
void sweepElement (const SMDS_MeshElement *elem, const std::vector< TNodeOfNodeListMapItr > &newNodesItVec, std::list< const SMDS_MeshElement *> &newElems, const int nbSteps, SMESH_SequenceOfElemPtr &srcElements)
 Create elements by sweeping an element. More...
 
void makeWalls (TNodeOfNodeListMap &mapNewNodes, TElemOfElemListMap &newElemsMap, TElemOfVecOfNnlmiMap &elemNewNodesMap, TIDSortedElemSet &elemSet, const int nbSteps, SMESH_SequenceOfElemPtr &srcElements)
 Create 1D and 2D elements around swept elements. More...
 
Extrusion_Error MakeEdgePathPoints (std::list< double > &aPrms, const TopoDS_Edge &aTrackEdge, bool FirstIsStart, list< SMESH_MeshEditor_PathPoint > &LPP)
 
Extrusion_Error MakeExtrElements (TIDSortedElemSet &theElements, list< SMESH_MeshEditor_PathPoint > &fullList, const bool theHasAngles, list< double > &theAngles, const bool theLinearVariation, const bool theHasRefPoint, const gp_Pnt &theRefPoint, const bool theMakeGroups)
 
void LinearAngleVariation (const int NbSteps, list< double > &theAngles)
 
bool doubleNodes (SMESHDS_Mesh *theMeshDS, const TIDSortedElemSet &theElems, const TIDSortedElemSet &theNodesNot, std::map< const SMDS_MeshNode *, const SMDS_MeshNode * > &theNodeNodeMap, const bool theIsDoubleElem)
 

Private Attributes

SMESH_MeshmyMesh
 
SMESH_SequenceOfElemPtr myLastCreatedNodes
 
SMESH_SequenceOfElemPtr myLastCreatedElems
 

Detailed Description

Editor of a mesh.

Definition at line 160 of file SMESH_MeshEditor.hxx.

Member Typedef Documentation

◆ PGroupIDs

typedef std::auto_ptr< std::list<int> > SMESH_MeshEditor::PGroupIDs

Definition at line 264 of file SMESH_MeshEditor.hxx.

◆ TListOfListOfNodes

typedef std::list< std::list< const SMDS_MeshNode* > > SMESH_MeshEditor::TListOfListOfNodes

Definition at line 385 of file SMESH_MeshEditor.hxx.

◆ TListOfListOfElementsID

typedef std::list< std::list< int > > SMESH_MeshEditor::TListOfListOfElementsID

Definition at line 418 of file SMESH_MeshEditor.hxx.

◆ TNodeOfNodeListMap

typedef std::map<const SMDS_MeshNode*, std::list<const SMDS_MeshNode*> > SMESH_MeshEditor::TNodeOfNodeListMap
private

Definition at line 654 of file SMESH_MeshEditor.hxx.

◆ TNodeOfNodeListMapItr

typedef TNodeOfNodeListMap::iterator SMESH_MeshEditor::TNodeOfNodeListMapItr
private

Definition at line 655 of file SMESH_MeshEditor.hxx.

◆ TVecOfNnlmiMap

Definition at line 656 of file SMESH_MeshEditor.hxx.

◆ TElemOfVecOfNnlmiMap

Definition at line 657 of file SMESH_MeshEditor.hxx.

Member Enumeration Documentation

◆ SmoothMethod

Enumerator
LAPLACIAN 
CENTROIDAL 

Definition at line 247 of file SMESH_MeshEditor.hxx.

◆ ExtrusionFlags

Auxilary flag for advanced extrusion. BOUNDARY: create or not boundary for result of extrusion SEW: try to use existing nodes or create new nodes in any case

Enumerator
EXTRUSION_FLAG_BOUNDARY 
EXTRUSION_FLAG_SEW 

Definition at line 281 of file SMESH_MeshEditor.hxx.

◆ Extrusion_Error

Enumerator
EXTR_OK 
EXTR_NO_ELEMENTS 
EXTR_PATH_NOT_EDGE 
EXTR_BAD_PATH_SHAPE 
EXTR_BAD_STARTING_NODE 
EXTR_BAD_ANGLES_NUMBER 
EXTR_CANT_GET_TANGENT 

Definition at line 346 of file SMESH_MeshEditor.hxx.

◆ Sew_Error

Enumerator
SEW_OK 
SEW_BORDER1_NOT_FOUND 
SEW_BORDER2_NOT_FOUND 
SEW_BOTH_BORDERS_NOT_FOUND 
SEW_BAD_SIDE_NODES 
SEW_VOLUMES_TO_SPLIT 
SEW_DIFF_NB_OF_ELEMENTS 
SEW_TOPO_DIFF_SETS_OF_ELEMENTS 
SEW_BAD_SIDE1_NODES 
SEW_BAD_SIDE2_NODES 
SEW_INTERNAL_ERROR 

Definition at line 444 of file SMESH_MeshEditor.hxx.

Constructor & Destructor Documentation

◆ SMESH_MeshEditor()

SMESH_MeshEditor::SMESH_MeshEditor ( SMESH_Mesh theMesh)

Member Function Documentation

◆ AddElement() [1/2]

SMDS_MeshElement* SMESH_MeshEditor::AddElement ( const std::vector< const SMDS_MeshNode *> &  nodes,
const SMDSAbs_ElementType  type,
const bool  isPoly,
const int  ID = 0 
)

Add element.

◆ AddElement() [2/2]

SMDS_MeshElement* SMESH_MeshEditor::AddElement ( const std::vector< int > &  nodeIDs,
const SMDSAbs_ElementType  type,
const bool  isPoly,
const int  ID = 0 
)

Add element.

◆ Remove()

bool SMESH_MeshEditor::Remove ( const std::list< int > &  theElemIDs,
const bool  isNodes 
)

◆ InverseDiag() [1/2]

bool SMESH_MeshEditor::InverseDiag ( const SMDS_MeshElement theTria1,
const SMDS_MeshElement theTria2 
)

◆ InverseDiag() [2/2]

bool SMESH_MeshEditor::InverseDiag ( const SMDS_MeshNode theNode1,
const SMDS_MeshNode theNode2 
)

◆ DeleteDiag()

bool SMESH_MeshEditor::DeleteDiag ( const SMDS_MeshNode theNode1,
const SMDS_MeshNode theNode2 
)

◆ Reorient()

bool SMESH_MeshEditor::Reorient ( const SMDS_MeshElement theElement)

◆ TriToQuad()

bool SMESH_MeshEditor::TriToQuad ( TIDSortedElemSet theElems,
SMESH::Controls::NumericalFunctorPtr  theCriterion,
const double  theMaxAngle 
)

Fuse neighbour triangles into quadrangles.

Parameters
theElems- The triangles to be fused.
theCriterion- Is used to choose a neighbour to fuse with.
theMaxAngle- Is a max angle between element normals at which fusion is still performed; theMaxAngle is mesured in radians.
Return values
bool- Success or not.

◆ QuadToTri() [1/2]

bool SMESH_MeshEditor::QuadToTri ( TIDSortedElemSet theElems,
SMESH::Controls::NumericalFunctorPtr  theCriterion 
)

Split quadrangles into triangles.

Parameters
theElems- The faces to be splitted.
theCriterion- Is used to choose a diagonal for splitting.
Return values
bool- Success or not.

◆ QuadToTri() [2/2]

bool SMESH_MeshEditor::QuadToTri ( TIDSortedElemSet theElems,
const bool  the13Diag 
)

Split quadrangles into triangles.

Parameters
theElems- The faces to be splitted.
the13Diag- Is used to choose a diagonal for splitting.
Return values
bool- Success or not.

◆ BestSplit()

int SMESH_MeshEditor::BestSplit ( const SMDS_MeshElement theQuad,
SMESH::Controls::NumericalFunctorPtr  theCriterion 
)

Find better diagonal for splitting.

Parameters
theQuad- The face to find better splitting of.
theCriterion- Is used to choose a diagonal for splitting.
Return values
int- 1 for 1-3 diagonal, 2 for 2-4, -1 - for errors.

◆ Smooth()

void SMESH_MeshEditor::Smooth ( TIDSortedElemSet theElements,
std::set< const SMDS_MeshNode *> &  theFixedNodes,
const SmoothMethod  theSmoothMethod,
const int  theNbIterations,
double  theTgtAspectRatio = 1.0,
const bool  the2D = true 
)

◆ RotationSweep()

PGroupIDs SMESH_MeshEditor::RotationSweep ( TIDSortedElemSet theElements,
const gp_Ax1 &  theAxis,
const double  theAngle,
const int  theNbSteps,
const double  theToler,
const bool  theMakeGroups,
const bool  theMakeWalls = true 
)

◆ CreateNode()

const SMDS_MeshNode* SMESH_MeshEditor::CreateNode ( const double  x,
const double  y,
const double  z,
const double  tolnode,
SMESH_SequenceOfNode aNodes 
)

Create new node in the mesh with given coordinates (auxilary for advanced extrusion)

◆ ExtrusionSweep() [1/2]

PGroupIDs SMESH_MeshEditor::ExtrusionSweep ( TIDSortedElemSet theElems,
const gp_Vec &  theStep,
const int  theNbSteps,
TElemOfElemListMap newElemsMap,
const bool  theMakeGroups,
const int  theFlags = EXTRUSION_FLAG_BOUNDARY,
const double  theTolerance = 1.e-6 
)

Generate new elements by extrusion of theElements It is a method used in .idl file. All functionality is implemented in the next method (see below) which is used in the cuurent method. param theElems - list of elements for extrusion param newElemsMap returns history of extrusion param theFlags set flags for performing extrusion (see description of enum ExtrusionFlags for additional information) param theTolerance - uses for comparing locations of nodes if flag EXTRUSION_FLAG_SEW is set

◆ ExtrusionSweep() [2/2]

PGroupIDs SMESH_MeshEditor::ExtrusionSweep ( TIDSortedElemSet theElems,
ExtrusParam theParams,
TElemOfElemListMap newElemsMap,
const bool  theMakeGroups,
const int  theFlags,
const double  theTolerance 
)

Generate new elements by extrusion of theElements param theElems - list of elements for extrusion param newElemsMap returns history of extrusion param theFlags set flags for performing extrusion (see description of enum ExtrusionFlags for additional information) param theTolerance - uses for comparing locations of nodes if flag EXTRUSION_FLAG_SEW is set param theParams - special structure for manage of extrusion

◆ ExtrusionAlongTrack() [1/2]

Extrusion_Error SMESH_MeshEditor::ExtrusionAlongTrack ( TIDSortedElemSet theElements,
SMESH_subMesh theTrackPattern,
const SMDS_MeshNode theNodeStart,
const bool  theHasAngles,
std::list< double > &  theAngles,
const bool  theLinearVariation,
const bool  theHasRefPoint,
const gp_Pnt &  theRefPoint,
const bool  theMakeGroups 
)

◆ ExtrusionAlongTrack() [2/2]

Extrusion_Error SMESH_MeshEditor::ExtrusionAlongTrack ( TIDSortedElemSet theElements,
SMESH_Mesh theTrackPattern,
const SMDS_MeshNode theNodeStart,
const bool  theHasAngles,
std::list< double > &  theAngles,
const bool  theLinearVariation,
const bool  theHasRefPoint,
const gp_Pnt &  theRefPoint,
const bool  theMakeGroups 
)

◆ Transform()

PGroupIDs SMESH_MeshEditor::Transform ( TIDSortedElemSet theElements,
const gp_Trsf &  theTrsf,
const bool  theCopy,
const bool  theMakeGroups,
SMESH_Mesh theTargetMesh = 0 
)

◆ FindCoincidentNodes()

void SMESH_MeshEditor::FindCoincidentNodes ( std::set< const SMDS_MeshNode *> &  theNodes,
const double  theTolerance,
TListOfListOfNodes theGroupsOfNodes 
)

◆ GetNodeSearcher()

SMESH_NodeSearcher* SMESH_MeshEditor::GetNodeSearcher ( )

◆ GetElementSearcher()

SMESH_ElementSearcher* SMESH_MeshEditor::GetElementSearcher ( )

◆ isOut()

static bool SMESH_MeshEditor::isOut ( const SMDS_MeshElement element,
const gp_Pnt &  point,
double  tol 
)
static

Return true if the point is IN or ON of the element.

◆ SimplifyFace()

int SMESH_MeshEditor::SimplifyFace ( const std::vector< const SMDS_MeshNode *>  faceNodes,
std::vector< const SMDS_MeshNode *> &  poly_nodes,
std::vector< int > &  quantities 
) const

◆ MergeNodes()

void SMESH_MeshEditor::MergeNodes ( TListOfListOfNodes theNodeGroups)

◆ FindEqualElements()

void SMESH_MeshEditor::FindEqualElements ( std::set< const SMDS_MeshElement *> &  theElements,
TListOfListOfElementsID theGroupsOfElementsID 
)

◆ MergeElements()

void SMESH_MeshEditor::MergeElements ( TListOfListOfElementsID theGroupsOfElementsID)

◆ MergeEqualElements()

void SMESH_MeshEditor::MergeEqualElements ( )

◆ CheckFreeBorderNodes()

static bool SMESH_MeshEditor::CheckFreeBorderNodes ( const SMDS_MeshNode theNode1,
const SMDS_MeshNode theNode2,
const SMDS_MeshNode theNode3 = 0 
)
static

◆ FindFreeBorder()

static bool SMESH_MeshEditor::FindFreeBorder ( const SMDS_MeshNode theFirstNode,
const SMDS_MeshNode theSecondNode,
const SMDS_MeshNode theLastNode,
std::list< const SMDS_MeshNode * > &  theNodes,
std::list< const SMDS_MeshElement * > &  theFaces 
)
static

◆ SewFreeBorder()

Sew_Error SMESH_MeshEditor::SewFreeBorder ( const SMDS_MeshNode theBorderFirstNode,
const SMDS_MeshNode theBorderSecondNode,
const SMDS_MeshNode theBorderLastNode,
const SMDS_MeshNode theSide2FirstNode,
const SMDS_MeshNode theSide2SecondNode,
const SMDS_MeshNode theSide2ThirdNode = 0,
const bool  theSide2IsFreeBorder = true,
const bool  toCreatePolygons = false,
const bool  toCreatePolyedrs = false 
)

◆ SewSideElements()

Sew_Error SMESH_MeshEditor::SewSideElements ( TIDSortedElemSet theSide1,
TIDSortedElemSet theSide2,
const SMDS_MeshNode theFirstNode1ToMerge,
const SMDS_MeshNode theFirstNode2ToMerge,
const SMDS_MeshNode theSecondNode1ToMerge,
const SMDS_MeshNode theSecondNode2ToMerge 
)

◆ InsertNodesIntoLink()

void SMESH_MeshEditor::InsertNodesIntoLink ( const SMDS_MeshElement theFace,
const SMDS_MeshNode theBetweenNode1,
const SMDS_MeshNode theBetweenNode2,
std::list< const SMDS_MeshNode *> &  theNodesToInsert,
const bool  toCreatePoly = false 
)

◆ UpdateVolumes()

void SMESH_MeshEditor::UpdateVolumes ( const SMDS_MeshNode theBetweenNode1,
const SMDS_MeshNode theBetweenNode2,
std::list< const SMDS_MeshNode *> &  theNodesToInsert 
)

◆ ConvertToQuadratic()

void SMESH_MeshEditor::ConvertToQuadratic ( const bool  theForce3d)

◆ ConvertFromQuadratic()

bool SMESH_MeshEditor::ConvertFromQuadratic ( )

◆ AddToSameGroups()

static void SMESH_MeshEditor::AddToSameGroups ( const SMDS_MeshElement elemToAdd,
const SMDS_MeshElement elemInGroups,
SMESHDS_Mesh aMesh 
)
static

◆ RemoveElemFromGroups()

static void SMESH_MeshEditor::RemoveElemFromGroups ( const SMDS_MeshElement element,
SMESHDS_Mesh aMesh 
)
static

◆ ReplaceElemInGroups()

static void SMESH_MeshEditor::ReplaceElemInGroups ( const SMDS_MeshElement elemToRm,
const SMDS_MeshElement elemToAdd,
SMESHDS_Mesh aMesh 
)
static

◆ GetLinkedNodes()

static void SMESH_MeshEditor::GetLinkedNodes ( const SMDS_MeshNode node,
TIDSortedElemSet linkedNodes,
SMDSAbs_ElementType  type = SMDSAbs_All 
)
static

Return nodes linked to the given one in elements of the type.

◆ FindFaceInSet()

static const SMDS_MeshElement* SMESH_MeshEditor::FindFaceInSet ( const SMDS_MeshNode n1,
const SMDS_MeshNode n2,
const TIDSortedElemSet elemSet,
const TIDSortedElemSet avoidSet 
)
static

◆ FindMatchingNodes()

static Sew_Error SMESH_MeshEditor::FindMatchingNodes ( std::set< const SMDS_MeshElement *> &  theSide1,
std::set< const SMDS_MeshElement *> &  theSide2,
const SMDS_MeshNode theFirstNode1,
const SMDS_MeshNode theFirstNode2,
const SMDS_MeshNode theSecondNode1,
const SMDS_MeshNode theSecondNode2,
TNodeNodeMap nReplaceMap 
)
static

Find corresponding nodes in two sets of faces.

Parameters
theSide1- first face set
theSide2- second first face
theFirstNode1- a boundary node of set 1
theFirstNode2- a node of set 2 corresponding to theFirstNode1
theSecondNode1- a boundary node of set 1 linked with theFirstNode1
theSecondNode2- a node of set 2 corresponding to theSecondNode1
nReplaceMap- output map of corresponding nodes
Return values
Sew_Error- is a success or not

◆ IsMedium()

static bool SMESH_MeshEditor::IsMedium ( const SMDS_MeshNode node,
const SMDSAbs_ElementType  typeToCheck = SMDSAbs_All 
)
static

Returns true if given node is medium.

Parameters
n- node to check
typeToCheck- type of elements containing the node to ask about node status
Return values
bool- check result

◆ FindShape()

int SMESH_MeshEditor::FindShape ( const SMDS_MeshElement theElem)

◆ GetMesh()

SMESH_Mesh* SMESH_MeshEditor::GetMesh ( )

Definition at line 599 of file SMESH_MeshEditor.hxx.

◆ GetMeshDS()

SMESHDS_Mesh* SMESH_MeshEditor::GetMeshDS ( )

Definition at line 601 of file SMESH_MeshEditor.hxx.

◆ GetLastCreatedNodes()

const SMESH_SequenceOfElemPtr& SMESH_MeshEditor::GetLastCreatedNodes ( ) const

Definition at line 603 of file SMESH_MeshEditor.hxx.

◆ GetLastCreatedElems()

const SMESH_SequenceOfElemPtr& SMESH_MeshEditor::GetLastCreatedElems ( ) const

Definition at line 605 of file SMESH_MeshEditor.hxx.

◆ DoubleNodes() [1/2]

bool SMESH_MeshEditor::DoubleNodes ( const std::list< int > &  theListOfNodes,
const std::list< int > &  theListOfModifiedElems 
)

◆ DoubleNodes() [2/2]

bool SMESH_MeshEditor::DoubleNodes ( const TIDSortedElemSet theElems,
const TIDSortedElemSet theNodesNot,
const TIDSortedElemSet theAffectedElems 
)

◆ DoubleNodesInRegion()

bool SMESH_MeshEditor::DoubleNodesInRegion ( const TIDSortedElemSet theElems,
const TIDSortedElemSet theNodesNot,
const TopoDS_Shape &  theShape 
)

◆ Make2DMeshFrom3D()

bool SMESH_MeshEditor::Make2DMeshFrom3D ( )

Generated skin mesh (containing 2D cells) from 3D mesh The created 2D mesh elements based on nodes of free faces of boundary volumes.

Returns
TRUE if operation has been completed successfully, FALSE otherwise

◆ convertElemToQuadratic()

int SMESH_MeshEditor::convertElemToQuadratic ( SMESHDS_SubMesh theSm,
SMESH_MesherHelper theHelper,
const bool  theForce3d 
)
private

Convert elements contained in a submesh to quadratic.

Return values
int- nb of checked elements

◆ removeQuadElem()

int SMESH_MeshEditor::removeQuadElem ( SMESHDS_SubMesh theSm,
SMDS_ElemIteratorPtr  theItr,
const int  theShapeID 
)
private

Convert quadratic elements to linear ones and remove quadratic nodes.

Return values
int- nb of checked elements

◆ generateGroups()

PGroupIDs SMESH_MeshEditor::generateGroups ( const SMESH_SequenceOfElemPtr nodeGens,
const SMESH_SequenceOfElemPtr elemGens,
const std::string &  postfix,
SMESH_Mesh targetMesh = 0 
)
private

Create groups of elements made during transformation.

Parameters
nodeGens- nodes making corresponding myLastCreatedNodes
elemGens- elements making corresponding myLastCreatedElems
postfix- to append to names of new groups

◆ sweepElement()

void SMESH_MeshEditor::sweepElement ( const SMDS_MeshElement elem,
const std::vector< TNodeOfNodeListMapItr > &  newNodesItVec,
std::list< const SMDS_MeshElement *> &  newElems,
const int  nbSteps,
SMESH_SequenceOfElemPtr srcElements 
)
private

Create elements by sweeping an element.

Parameters
elem- element to sweep
newNodesItVec- nodes generated from each node of the element
newElems- generated elements
nbSteps- number of sweeping steps
srcElements- to append elem for each generated element

◆ makeWalls()

void SMESH_MeshEditor::makeWalls ( TNodeOfNodeListMap mapNewNodes,
TElemOfElemListMap newElemsMap,
TElemOfVecOfNnlmiMap elemNewNodesMap,
TIDSortedElemSet elemSet,
const int  nbSteps,
SMESH_SequenceOfElemPtr srcElements 
)
private

Create 1D and 2D elements around swept elements.

Parameters
mapNewNodes- source nodes and ones generated from them
newElemsMap- source elements and ones generated from them
elemNewNodesMap- nodes generated from each node of each element
elemSet- all swept elements
nbSteps- number of sweeping steps
srcElements- to append elem for each generated element

◆ MakeEdgePathPoints()

Extrusion_Error SMESH_MeshEditor::MakeEdgePathPoints ( std::list< double > &  aPrms,
const TopoDS_Edge &  aTrackEdge,
bool  FirstIsStart,
list< SMESH_MeshEditor_PathPoint > &  LPP 
)
private

auxilary for ExtrusionAlongTrack

◆ MakeExtrElements()

Extrusion_Error SMESH_MeshEditor::MakeExtrElements ( TIDSortedElemSet theElements,
list< SMESH_MeshEditor_PathPoint > &  fullList,
const bool  theHasAngles,
list< double > &  theAngles,
const bool  theLinearVariation,
const bool  theHasRefPoint,
const gp_Pnt &  theRefPoint,
const bool  theMakeGroups 
)
private

◆ LinearAngleVariation()

void SMESH_MeshEditor::LinearAngleVariation ( const int  NbSteps,
list< double > &  theAngles 
)
private

◆ doubleNodes()

bool SMESH_MeshEditor::doubleNodes ( SMESHDS_Mesh theMeshDS,
const TIDSortedElemSet theElems,
const TIDSortedElemSet theNodesNot,
std::map< const SMDS_MeshNode *, const SMDS_MeshNode * > &  theNodeNodeMap,
const bool  theIsDoubleElem 
)
private

Field Documentation

◆ myMesh

SMESH_Mesh* SMESH_MeshEditor::myMesh
private

Definition at line 716 of file SMESH_MeshEditor.hxx.

◆ myLastCreatedNodes

SMESH_SequenceOfElemPtr SMESH_MeshEditor::myLastCreatedNodes
private

Sequence for keeping nodes created during last operation

Definition at line 721 of file SMESH_MeshEditor.hxx.

◆ myLastCreatedElems

SMESH_SequenceOfElemPtr SMESH_MeshEditor::myLastCreatedElems
private

Sequence for keeping elements created during last operation

Definition at line 726 of file SMESH_MeshEditor.hxx.