Version: 8.3.0
SMESH_MeshEditor Class Reference

Editor of a mesh. More...

#include <SMESH_MeshEditor.hxx>

Data Structures

struct  ElemFeatures
 < Features of element to create More...
 
class  ExtrusParam
 Generator of nodes for extrusion functionality. More...
 
struct  SMESH_MeshEditor_PathPoint
 

Public Types

enum  SplitVolumToTetraFlags {
  HEXA_TO_5 = 1, HEXA_TO_6, HEXA_TO_24, HEXA_TO_2_PRISMS,
  HEXA_TO_4_PRISMS
}
 
enum  SmoothMethod { LAPLACIAN = 0, CENTROIDAL }
 
enum  ExtrusionFlags {
  EXTRUSION_FLAG_BOUNDARY = 0x01, EXTRUSION_FLAG_SEW = 0x02, EXTRUSION_FLAG_GROUPS = 0x04, EXTRUSION_FLAG_BY_AVG_NORMAL = 0x08,
  EXTRUSION_FLAG_USE_INPUT_ELEMS_ONLY = 0x10, EXTRUSION_FLAG_SCALE_LINEAR_VARIATION = 0x20
}
 Flags of extrusion. More...
 
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
}
 
enum  Bnd_Dimension { BND_2DFROM3D, BND_1DFROM3D, BND_1DFROM2D }
 
typedef std::map< const
SMDS_MeshElement *, int,
TIDCompare
TFacetOfElem
 2nd arg of SplitVolumes() More...
 
typedef TIDTypeCompare TElemSort
 
typedef std::map< const
SMDS_MeshElement *, std::list
< const SMDS_MeshElement * >
, TElemSort
TTElemOfElemListMap
 
typedef std::map< const
SMDS_MeshNode *, std::list
< const SMDS_MeshNode * > > 
TNodeOfNodeListMap
 
typedef
TNodeOfNodeListMap::iterator 
TNodeOfNodeListMapItr
 
typedef std::vector
< TNodeOfNodeListMapItr
TVecOfNnlmiMap
 
typedef std::map< const
SMDS_MeshElement
*, TVecOfNnlmiMap, TElemSort
TElemOfVecOfNnlmiMap
 
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)
 
SMESH_MeshGetMesh ()
 
SMESHDS_MeshGetMeshDS ()
 Return mesh DS. More...
 
const SMESH_SequenceOfElemPtr & GetLastCreatedNodes () const
 
const SMESH_SequenceOfElemPtr & GetLastCreatedElems () const
 
void ClearLastCreated ()
 
SMESH_ComputeErrorPtrGetError ()
 
SMDS_MeshElementAddElement (const std::vector< const SMDS_MeshNode * > &nodes, const ElemFeatures &features)
 Add element. More...
 
SMDS_MeshElementAddElement (const std::vector< int > &nodeIDs, const ElemFeatures &features)
 Add element. More...
 
int Remove (const std::list< int > &theElemIDs, const bool isNodes)
 
void Create0DElementsOnAllNodes (const TIDSortedElemSet &elements, TIDSortedElemSet &all0DElems, const bool duplicateElements)
 Create 0D elements on all nodes of the given object. More...
 
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)
 
int Reorient2D (TIDSortedElemSet &theFaces, const gp_Dir &theDirection, const SMDS_MeshElement *theFace)
 Reorient faces. More...
 
int Reorient2DBy3D (TIDSortedElemSet &theFaces, TIDSortedElemSet &theVolumes, const bool theOutsideNormal)
 Reorient faces basing on orientation of adjacent volumes. More...
 
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...
 
void QuadTo4Tri (TIDSortedElemSet &theElems)
 Split each of given quadrangles into 4 triangles. More...
 
int BestSplit (const SMDS_MeshElement *theQuad, SMESH::Controls::NumericalFunctorPtr theCriterion)
 Find better diagonal for splitting. More...
 
void SplitVolumes (const TFacetOfElem &theElems, const int theMethodFlags)
 Split volumic elements into tetrahedra or prisms. More...
 
void GetHexaFacetsToSplit (TIDSortedElemSet &theHexas, const gp_Ax1 &theFacetNormal, TFacetOfElem &theFacets)
 For hexahedra that will be split into prisms, finds facets to split into triangles. More...
 
void SplitBiQuadraticIntoLinear (TIDSortedElemSet &theElems)
 Split bi-quadratic elements into linear ones without creation of additional nodes. 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[2], const gp_Ax1 &theAxis, const double theAngle, const int theNbSteps, const double theToler, const bool theMakeGroups, const bool theMakeWalls=true)
 
PGroupIDs ExtrusionSweep (TIDSortedElemSet theElems[2], const gp_Vec &theStep, const int theNbSteps, TTElemOfElemListMap &newElemsMap, const int theFlags, const double theTolerance=1.e-6)
 Generate new elements by extrusion of theElements It is a method used in .idl file. More...
 
PGroupIDs ExtrusionSweep (TIDSortedElemSet theElems[2], ExtrusParam &theParams, TTElemOfElemListMap &newElemsMap)
 Generate new elements by extrusion of theElements. More...
 
Extrusion_Error ExtrusionAlongTrack (TIDSortedElemSet theElements[2], 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[2], 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)
 Move or copy theElements applying theTrsf to their nodes. More...
 
void FindCoincidentNodes (TIDSortedNodeSet &theNodes, const double theTolerance, TListOfListOfNodes &theGroupsOfNodes, bool theSeparateCornersAndMedium)
 Return list of group of nodes close to each other within theTolerance. More...
 
void MergeNodes (TListOfListOfNodes &theNodeGroups, const bool theAvoidMakingHoles=false)
 
void FindEqualElements (TIDSortedElemSet &theElements, TListOfListOfElementsID &theGroupsOfElementsID)
 
void MergeElements (TListOfListOfElementsID &theGroupsOfElementsID)
 
void MergeEqualElements ()
 
int SimplifyFace (const std::vector< const SMDS_MeshNode * > &faceNodes, std::vector< const SMDS_MeshNode * > &poly_nodes, std::vector< int > &quantities) const
 
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, const bool theToBiQuad)
 
void ConvertToQuadratic (const bool theForce3d, TIDSortedElemSet &theElements, const bool theToBiQuad)
 Makes given elements quadratic. More...
 
bool ConvertFromQuadratic ()
 
void ConvertFromQuadratic (TIDSortedElemSet &theElements)
 Makes given elements linear. More...
 
int FindShape (const SMDS_MeshElement *theElem)
 
void DoubleElements (const TIDSortedElemSet &theElements)
 Create elements equal (on same nodes) to given ones. More...
 
bool DoubleNodes (const std::list< int > &theListOfNodes, const std::list< int > &theListOfModifiedElems)
 Creates a hole in a mesh by doubling the nodes of some particular elements. More...
 
bool DoubleNodes (const TIDSortedElemSet &theElems, const TIDSortedElemSet &theNodesNot, const TIDSortedElemSet &theAffectedElems)
 Creates a hole in a mesh by doubling the nodes of some particular elements. More...
 
bool AffectedElemGroupsInRegion (const TIDSortedElemSet &theElems, const TIDSortedElemSet &theNodesNot, const TopoDS_Shape &theShape, TIDSortedElemSet &theAffectedElems)
 Identify the elements that will be affected by node duplication (actual duplication is not performed). More...
 
bool DoubleNodesInRegion (const TIDSortedElemSet &theElems, const TIDSortedElemSet &theNodesNot, const TopoDS_Shape &theShape)
 Creates a hole in a mesh by doubling the nodes of some particular elements. More...
 
double OrientedAngle (const gp_Pnt &p0, const gp_Pnt &p1, const gp_Pnt &g1, const gp_Pnt &g2)
 compute an oriented angle between two planes defined by four points. More...
 
bool DoubleNodesOnGroupBoundaries (const std::vector< TIDSortedElemSet > &theElems, bool createJointElems, bool onAllBoundaries)
 Double nodes on shared faces between groups of volumes and create flat elements on demand. More...
 
bool CreateFlatElementsOnFacesGroups (const std::vector< TIDSortedElemSet > &theElems)
 Double nodes on some external faces and create flat elements. More...
 
void CreateHoleSkin (double radius, const TopoDS_Shape &theShape, SMESH_NodeSearcher *theNodeSearcher, const char *groupName, std::vector< double > &nodesCoords, std::vector< std::vector< int > > &listOfListOfNodes)
 identify all the elements around a geom shape, get the faces delimiting the hole Build groups of volume to remove, groups of faces to replace on the skin of the object, groups of faces to remove inside the object, (idem edges). More...
 
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...
 
int MakeBoundaryMesh (const TIDSortedElemSet &elements, Bnd_Dimension dimension, SMESH_Group *group=0, SMESH_Mesh *targetMesh=0, bool toCopyElements=false, bool toCopyExistingBondary=false, bool toAddExistingBondary=false, bool aroundElements=false)
 

Static Public Member Functions

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)
 Replace elemToRm by elemToAdd in the all groups. More...
 
static void ReplaceElemInGroups (const SMDS_MeshElement *elemToRm, const std::vector< 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 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 &theNodeReplaceMap)
 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 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, const bool topPresent=true)
 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 size_t nbSteps, SMESH_SequenceOfElemPtr &srcElements)
 Create elements by sweeping an element. More...
 
bool applyMerge (const SMDS_MeshElement *elems, std::vector< ElemFeatures > &newElemDefs, TNodeNodeMap &nodeNodeMap, const bool avoidMakingHoles)
 Computes new connectivity of an element after merging nodes. More...
 
void makeWalls (TNodeOfNodeListMap &mapNewNodes, TTElemOfElemListMap &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 aFirstIsStart, std::list< SMESH_MeshEditor_PathPoint > &aLPP)
 
Extrusion_Error makeExtrElements (TIDSortedElemSet theElements[2], std::list< SMESH_MeshEditor_PathPoint > &theFullList, const bool theHasAngles, std::list< double > &theAngles, const bool theLinearVariation, const bool theHasRefPoint, const gp_Pnt &theRefPoint, const bool theMakeGroups)
 
bool doubleNodes (SMESHDS_Mesh *theMeshDS, const TIDSortedElemSet &theElems, const TIDSortedElemSet &theNodesNot, TNodeNodeMap &theNodeNodeMap, const bool theIsDoubleElem)
 Creates a hole in a mesh by doubling the nodes of some particular elements. More...
 
void copyPosition (const SMDS_MeshNode *from, const SMDS_MeshNode *to)
 Copy node position and set to node on the same geometry. More...
 

Static Private Member Functions

static void linearAngleVariation (const int NbSteps, std::list< double > &theAngles)
 

Private Attributes

SMESH_MeshmyMesh
 
SMESH_SequenceOfElemPtr myLastCreatedNodes
 
SMESH_SequenceOfElemPtr myLastCreatedElems
 
SMESH_ComputeErrorPtr myError
 

Detailed Description

Editor of a mesh.

Member Typedef Documentation

typedef std::auto_ptr< std::list<int> > SMESH_MeshEditor::PGroupIDs
typedef std::list< std::list< int > > SMESH_MeshEditor::TListOfListOfElementsID
typedef std::list< std::list< const SMDS_MeshNode* > > SMESH_MeshEditor::TListOfListOfNodes
typedef std::map<const SMDS_MeshNode*, std::list<const SMDS_MeshNode*> > SMESH_MeshEditor::TNodeOfNodeListMap
typedef TNodeOfNodeListMap::iterator SMESH_MeshEditor::TNodeOfNodeListMapItr
typedef std::map< const SMDS_MeshElement*, std::list<const SMDS_MeshElement*>, TElemSort > SMESH_MeshEditor::TTElemOfElemListMap

Member Enumeration Documentation

Enumerator
BND_2DFROM3D 
BND_1DFROM3D 
BND_1DFROM2D 
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 

Flags of extrusion.

BOUNDARY: create or not boundary for result of extrusion SEW: try to use existing nodes or create new nodes in any case GROUPS: to create groups BY_AVG_NORMAL: step size is measured along average normal to elements, else step size is measured along average normal of any element USE_INPUT_ELEMS_ONLY: to use only input elements to compute extrusion direction for ExtrusionByNormal() SCALE_LINEAR_VARIATION: to make linear variation of scale factors

Enumerator
EXTRUSION_FLAG_BOUNDARY 
EXTRUSION_FLAG_SEW 
EXTRUSION_FLAG_GROUPS 
EXTRUSION_FLAG_BY_AVG_NORMAL 
EXTRUSION_FLAG_USE_INPUT_ELEMS_ONLY 
EXTRUSION_FLAG_SCALE_LINEAR_VARIATION 
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 
Enumerator
LAPLACIAN 
CENTROIDAL 
Enumerator
HEXA_TO_5 
HEXA_TO_6 
HEXA_TO_24 
HEXA_TO_2_PRISMS 
HEXA_TO_4_PRISMS 

Constructor & Destructor Documentation

SMESH_MeshEditor::SMESH_MeshEditor ( SMESH_Mesh theMesh)

Referenced by Transform().

Member Function Documentation

SMDS_MeshElement* SMESH_MeshEditor::AddElement ( const std::vector< const SMDS_MeshNode * > &  nodes,
const ElemFeatures features 
)
SMDS_MeshElement* SMESH_MeshEditor::AddElement ( const std::vector< int > &  nodeIDs,
const ElemFeatures features 
)

Add element.

void SMESH_MeshEditor::AddToSameGroups ( const SMDS_MeshElement elemToAdd,
const SMDS_MeshElement elemInGroups,
SMESHDS_Mesh aMesh 
)
static
bool SMESH_MeshEditor::AffectedElemGroupsInRegion ( const TIDSortedElemSet theElems,
const TIDSortedElemSet theNodesNot,
const TopoDS_Shape &  theShape,
TIDSortedElemSet theAffectedElems 
)

Identify the elements that will be affected by node duplication (actual duplication is not performed).

This method is the first step of DoubleNodeElemGroupsInRegion.

Parameters
theElems- list of groups of elements (edges or faces) to be replicated
theNodesNot- list of groups of nodes not to replicated
theShape- shape to detect affected elements (element which geometric center located on or inside shape). If the shape is null, detection is done on faces orientations (select elements with a gravity center on the side given by faces normals). This mode (null shape) is faster, but works only when theElems are faces, with coherents orientations. The replicated nodes should be associated to affected elements.
Returns
groups of affected elements
See Also
DoubleNodeElemGroupsInRegion()

References cast2Node, Face, SMESH_MeshAlgos::FaceNormal(), SMDS_MeshNode::GetInverseElementIterator(), SMDS_MeshElement::GetType(), SMDS_MeshElement::nodesIterator(), SMDSAbs_Edge, SMDSAbs_Face, SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().

bool SMESH_MeshEditor::applyMerge ( const SMDS_MeshElement elems,
std::vector< ElemFeatures > &  newElemDefs,
TNodeNodeMap nodeNodeMap,
const bool  avoidMakingHoles 
)
private

Computes new connectivity of an element after merging nodes.

Parameters
[in]elems- the element
[out]newElemDefs- definition(s) of result element(s)
[in,out]nodeNodeMap- nodes to merge
[in]avoidMakingHoles- if true and and the element becomes invalid after merging (but not degenerated), removes nodes causing the invalidity from nodeNodeMap.
Returns
bool - true if the element should be removed

References SMDS_MeshCell::applyInterlace(), SMDS_MeshCell::applyInterlaceRev(), SMESH_MeshAlgos::DeMerge(), SMDS_MeshElement::GetEntityType(), SMDS_VtkVolume::GetFaceNode(), SMDS_VolumeTool::GetFaceNodesIndices(), SMDS_VolumeTool::GetOppFaceIndex(), SMESH_MeshEditor::ElemFeatures::Init(), SMDS_MeshCell::interlacedSmdsOrder(), SMDS_VolumeTool::IsForward(), SMDS_VolumeTool::IsLinked(), SMDS_MeshElement::IsMediumNode(), SMDS_MeshElement::IsQuadratic(), SMESH_MeshEditor::ElemFeatures::myIsQuad, SMESH_MeshEditor::ElemFeatures::myNodes, SMDS_VtkVolume::NbFaceNodes(), SMDS_VtkVolume::NbFaces(), SMDS_MeshElement::NbNodes(), SMDS_MeshElement::nodesIterator(), SMDS_VolumeTool::SetExternalNormal(), SMESH_MeshEditor::ElemFeatures::SetPoly(), SMESH_MeshEditor::ElemFeatures::SetQuad(), SimplifyFace(), SMDSAbs_Face, SMDSEntity_BiQuad_Quadrangle, SMDSEntity_Edge, SMDSEntity_Hexa, SMDSEntity_Penta, SMDSEntity_Polygon, SMDSEntity_Polyhedra, SMDSEntity_Quad_Edge, SMDSEntity_Quad_Polygon, SMDSEntity_Quad_Quadrangle, SMDSEntity_Quad_Tetra, SMDSEntity_Quad_Triangle, SMDSEntity_Quadrangle, SMDSEntity_Tetra, and SMDSEntity_Triangle.

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.
Returns
int - 1 for 1-3 diagonal, 2 for 2-4, -1 - for errors.
bool SMESH_MeshEditor::CheckFreeBorderNodes ( const SMDS_MeshNode theNode1,
const SMDS_MeshNode theNode2,
const SMDS_MeshNode theNode3 = 0 
)
static

References FindFreeBorder().

void SMESH_MeshEditor::ClearLastCreated ( )

Referenced by DoubleElements().

bool SMESH_MeshEditor::ConvertFromQuadratic ( )
void SMESH_MeshEditor::Create0DElementsOnAllNodes ( const TIDSortedElemSet elements,
TIDSortedElemSet all0DElems,
const bool  duplicateElements 
)

Create 0D elements on all nodes of the given object.

Parameters
elements- Elements on whose nodes to create 0D elements; if empty, the all mesh is treated
all0DElems- returns all 0D elements found or created on nodes of elements
duplicateElements- to add one more 0D element to a node or not

References cast2Node, SMDS_Mesh::elementsIterator(), SMDS_MeshNode::GetInverseElementIterator(), GetMeshDS(), myLastCreatedElems, SMDS_MeshElement::nodesIterator(), SMDSAbs_0DElement, and SMDSAbs_Node.

bool SMESH_MeshEditor::CreateFlatElementsOnFacesGroups ( const std::vector< TIDSortedElemSet > &  theElems)

Double nodes on some external faces and create flat elements.

Flat elements are mainly used by some types of mechanic calculations.

Each group of the list must be constituted of faces. Triangles are transformed in prisms, and quadrangles in hexahedrons.

Parameters
theElems- list of groups of faces, where a group of faces is a set of SMDS_MeshElements sorted by Id.
Returns
TRUE if operation has been completed successfully, FALSE otherwise

References SMESHDS_Group::Add(), SMESHDS_Mesh::AddNode(), SMESHDS_Mesh::AddVolume(), SMDS_MeshCell::ChangeNodes(), copyPosition(), SMDS_MeshElement::GetID(), SMDS_MeshFace::GetVtkType(), SMDS_MeshElement::IsMediumNode(), SMDS_MeshElement::IsQuadratic(), myMesh, SMDS_MeshElement::nodesIterator(), SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().

void SMESH_MeshEditor::CreateHoleSkin ( double  radius,
const TopoDS_Shape &  theShape,
SMESH_NodeSearcher theNodeSearcher,
const char *  groupName,
std::vector< double > &  nodesCoords,
std::vector< std::vector< int > > &  listOfListOfNodes 
)
void SMESH_MeshEditor::DoubleElements ( const TIDSortedElemSet theElements)
bool SMESH_MeshEditor::DoubleNodes ( const std::list< int > &  theListOfNodes,
const std::list< int > &  theListOfModifiedElems 
)

Creates a hole in a mesh by doubling the nodes of some particular elements.

Parameters
theNodes- identifiers of nodes to be doubled
theModifiedElems- identifiers of elements to be updated by the new (doubled) nodes. If list of element identifiers is empty then nodes are doubled but they not assigned to elements
Returns
TRUE if operation has been completed successfully, FALSE otherwise

References SMESHDS_Mesh::AddNode(), SMESHDS_Mesh::ChangeElementNodes(), copyPosition(), SMDS_Mesh::FindElement(), SMDS_Mesh::FindNode(), GetMeshDS(), myLastCreatedElems, myLastCreatedNodes, SMDS_MeshElement::NbNodes(), SMDS_MeshElement::nodesIterator(), SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().

Referenced by DoubleNodesInRegion().

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

Creates a hole in a mesh by doubling the nodes of some particular elements.

Parameters
theElems- the list of elements (edges or faces) to be replicated The nodes for duplication could be found from these elements
theNodesNot- list of nodes to NOT replicate
theAffectedElems- the list of elements (cells and edges) to which the replicated nodes should be associated to.
Returns
TRUE if operation has been completed successfully, FALSE otherwise

References doubleNodes(), GetMeshDS(), myLastCreatedElems, and myLastCreatedNodes.

bool SMESH_MeshEditor::doubleNodes ( SMESHDS_Mesh theMeshDS,
const TIDSortedElemSet theElems,
const TIDSortedElemSet theNodesNot,
TNodeNodeMap theNodeNodeMap,
const bool  theIsDoubleElem 
)
private

Creates a hole in a mesh by doubling the nodes of some particular elements.

Parameters
theMeshDS- mesh instance
theElems- the elements replicated or modified (nodes should be changed)
theNodesNot- nodes to NOT replicate
theNodeNodeMap- relation of old node to new created node
theIsDoubleElem- flag os to replicate element or modify
Returns
TRUE if operation has been completed successfully, FALSE otherwise

References AddElement(), SMESHDS_Mesh::AddNode(), SMESHDS_Mesh::ChangeElementNodes(), copyPosition(), SMESH_MeshEditor::ElemFeatures::Init(), myLastCreatedNodes, SMDS_MeshElement::NbNodes(), SMDS_MeshElement::nodesIterator(), SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().

Referenced by DoubleNodes().

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

Creates a hole in a mesh by doubling the nodes of some particular elements.

Parameters
theElems- group of of elements (edges or faces) to be replicated
theNodesNot- group of nodes not to replicate
theShape- shape to detect affected elements (element which geometric center located on or inside shape). The replicated nodes should be associated to affected elements.
Returns
TRUE if operation has been completed successfully, FALSE otherwise

References SMESHUtils::Deleter< TOBJ >::_obj, cast2Node, DoubleNodes(), Face, SMDS_MeshNode::GetInverseElementIterator(), and SMDS_MeshElement::nodesIterator().

bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries ( const std::vector< TIDSortedElemSet > &  theElems,
bool  createJointElems,
bool  onAllBoundaries 
)

Double nodes on shared faces between groups of volumes and create flat elements on demand.

The list of groups must contain at least two groups. The groups have to be disjoint: no common element into two different groups. The nodes of the internal faces at the boundaries of the groups are doubled. Optionally, the internal faces are replaced by flat elements. Triangles are transformed into prisms, and quadrangles into hexahedrons. The flat elements are stored in groups of volumes. These groups are named according to the position of the group in the list: the group j_n_p is the group of the flat elements that are built between the group #n and the group #p in the list. If there is no shared faces between the group #n and the group #p in the list, the group j_n_p is not created. All the flat elements are gathered into the group named "joints3D" (or "joints2D" in 2D situation). The flat element of the multiple junctions between the simple junction are stored in a group named "jointsMultiples".

Parameters
theElems- list of groups of volumes, where a group of volume is a set of SMDS_MeshElements sorted by Id.
createJointElems- if TRUE, create the elements
onAllBoundaries- if TRUE, the nodes and elements are also created on the boundary between theDomains and the rest mesh
Returns
TRUE if operation has been completed successfully, FALSE otherwise

References SMESHDS_Group::Add(), SMDS_Mesh::AddFaceFromVtkIds(), SMESHDS_Mesh::AddNode(), SMDS_Mesh::AddVolumeFromVtkIds(), SMESHDS_Mesh::BuildDownWardConnectivity(), DownIdType::cellId, SMDS_UnstructuredGrid::CellIdToDownId(), DownIdType::cellType, CHRONO, CHRONOSTOP, SMESHDS_Mesh::CleanDownWardConnectivity(), copyPosition(), SMDS_UnstructuredGrid::DeleteLinks(), SMDS_UnstructuredGrid::extrudeVolumeFromFace(), SMDS_Mesh::FindElement(), SMDS_Mesh::FindNodeVtk(), SMDS_Mesh::fromVtkToSmds(), SMDS_UnstructuredGrid::getDownArray(), SMDS_Downward::getDownCells(), SMDS_Downward::getDownTypes(), SMDS_Mesh::getGrid(), SMDS_MeshElement::GetID(), GetMeshDS(), SMDS_UnstructuredGrid::GetNeighbors(), SMDS_UnstructuredGrid::GetNodeIds(), SMDS_Downward::getNodes(), SMDS_Downward::getNumberOfDownCells(), SMDS_UnstructuredGrid::GetParentVolumes(), SMDS_MeshElement::GetType(), SMDS_MeshElement::getVtkId(), SMDS_VtkVolume::gravityCenter(), MESSAGE, SMESHDS_Mesh::ModifyCellNodes(), myMesh, NBMAXNEIGHBORS, OrientedAngle(), SMDSAbs_Face, SMDSAbs_Volume, and counters::stats().

Extrusion_Error SMESH_MeshEditor::ExtrusionAlongTrack ( TIDSortedElemSet  theElements[2],
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 SMESH_MeshEditor::ExtrusionAlongTrack ( TIDSortedElemSet  theElements[2],
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 SMESH_MeshEditor::ExtrusionSweep ( TIDSortedElemSet  theElems[2],
const gp_Vec &  theStep,
const int  theNbSteps,
TTElemOfElemListMap newElemsMap,
const int  theFlags,
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 current method.

Parameters
theElems- list of elements for extrusion
newElemsMapreturns history of extrusion
theFlagsset flags for performing extrusion (see description of enum ExtrusionFlags for additional information)
theTolerance- uses for comparing locations of nodes if flag EXTRUSION_FLAG_SEW is set
PGroupIDs SMESH_MeshEditor::ExtrusionSweep ( TIDSortedElemSet  theElems[2],
ExtrusParam theParams,
TTElemOfElemListMap newElemsMap 
)

Generate new elements by extrusion of theElements.

Parameters
theElems- list of elements for extrusion
newElemsMapreturns history of extrusion
theFlagsset flags for performing extrusion (see description of enum ExtrusionFlags for additional information)
theTolerance- uses for comparing locations of nodes if flag EXTRUSION_FLAG_SEW is set
theParams- special structure for manage of extrusion
void SMESH_MeshEditor::FindCoincidentNodes ( TIDSortedNodeSet theNodes,
const double  theTolerance,
TListOfListOfNodes theGroupsOfNodes,
bool  theSeparateCornersAndMedium 
)

Return list of group of nodes close to each other within theTolerance.

** Search among theNodes or in the whole mesh if theNodes is empty using

  • an Octree algorithm
    Parameters
    [in,out]theNodes- the nodes to treat
    [in]theTolerance- the tolerance
    [out]theGroupsOfNodes- the result groups of coincident nodes
    [in]theSeparateCornersAndMedium- if true, in quadratic mesh puts corner and medium nodes in separate groups

References SMESH_OctreeNode::FindCoincidentNodes(), GetMeshDS(), SMESH_MesherHelper::IsMedium(), myLastCreatedElems, myLastCreatedNodes, myMesh, SMDS_Mesh::nodesIterator(), and ORDER_QUADRATIC.

void SMESH_MeshEditor::FindEqualElements ( TIDSortedElemSet theElements,
TListOfListOfElementsID theGroupsOfElementsID 
)
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
SMESH_MeshEditor::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
Returns
Sew_Error - is a success or not
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
Returns
bool - is a success or not

References Abs(), SMDS_MeshElement::GetID(), SMDS_MeshNode::GetInverseElementIterator(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::GetNodeIndex(), SMDS_MeshElement::IsQuadratic(), MESSAGE, SMDS_MeshElement::NbNodes(), SEW_BAD_SIDE1_NODES, SEW_BAD_SIDE2_NODES, SEW_OK, SEW_TOPO_DIFF_SETS_OF_ELEMENTS, and SMDSAbs_Face.

Referenced by StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces().

SMESH_MeshEditor::PGroupIDs SMESH_MeshEditor::generateGroups ( const SMESH_SequenceOfElemPtr &  nodeGens,
const SMESH_SequenceOfElemPtr &  elemGens,
const std::string &  postfix,
SMESH_Mesh targetMesh = 0,
const bool  topPresent = true 
)
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
targetMesh- mesh to create groups in
topPresent- is there "top" elements that are created by sweeping

References SMDS_MeshGroup::Add(), SMESHDS_GroupBase::Contains(), SMESHDS_Group::GetElements(), SMESHDS_GroupBase::GetID(), GetMesh(), SMESHDS_GroupBase::GetStoreName(), SMESHDS_GroupBase::GetType(), SMDS_MeshElement::GetType(), SMESHDS_Group::IsEmpty(), SMESHDS_GroupBase::IsEmpty(), MESSAGE, myLastCreatedElems, myLastCreatedNodes, SMESHDS_GroupBase::SetStoreName(), SMESHDS_Group::SetType(), and SMDSAbs_NbElementTypes.

Referenced by makeExtrElements(), RotationSweep(), and Transform().

SMESH_ComputeErrorPtr& SMESH_MeshEditor::GetError ( )
void SMESH_MeshEditor::GetHexaFacetsToSplit ( TIDSortedElemSet theHexas,
const gp_Ax1 &  theFacetNormal,
TFacetOfElem theFacets 
)
const SMESH_SequenceOfElemPtr& SMESH_MeshEditor::GetLastCreatedElems ( ) const
const SMESH_SequenceOfElemPtr& SMESH_MeshEditor::GetLastCreatedNodes ( ) const
void SMESH_MeshEditor::GetLinkedNodes ( const SMDS_MeshNode theNode,
TIDSortedElemSet linkedNodes,
SMDSAbs_ElementType  type = SMDSAbs_All 
)
static

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

Return nodes linked to the given one.

Parameters
theNode- the node
linkedNodes- the found nodes
type- the type of elements to check

Medium nodes are ignored

References cast2Node, SMDS_MeshNode::GetInverseElementIterator(), SMDS_MeshElement::GetNodeWrap(), SMDS_MeshElement::GetType(), SMDS_VolumeTool::IsLinked(), SMDS_MeshElement::IsQuadratic(), SMDS_MeshElement::NbNodes(), SMDS_MeshElement::nodesIterator(), SMDSAbs_0DElement, SMDSAbs_Volume, and SMESH_MesherHelper::WrapIndex().

Referenced by laplacianSmooth(), SMESH_MeshEditor_i::MoveClosestNodeToPoint(), and SMESH_MeshEditor_i::MoveNode().

SMESH_Mesh* SMESH_MeshEditor::GetMesh ( )
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
Returns
bool - check result

References SMDS_MeshNode::GetInverseElementIterator(), and SMDS_MeshElement::IsMediumNode().

Referenced by StdMeshers_FaceSide::GetEdgeNodes(), and SMESH_MesherHelper::IsMedium().

void SMESH_MeshEditor::linearAngleVariation ( const int  NbSteps,
std::list< double > &  theAngles 
)
staticprivate

Referenced by makeExtrElements().

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
int SMESH_MeshEditor::MakeBoundaryMesh ( const TIDSortedElemSet elements,
Bnd_Dimension  dimension,
SMESH_Group group = 0,
SMESH_Mesh targetMesh = 0,
bool  toCopyElements = false,
bool  toCopyExistingBondary = false,
bool  toAddExistingBondary = false,
bool  aroundElements = false 
)
SMESH_MeshEditor::Extrusion_Error SMESH_MeshEditor::makeEdgePathPoints ( std::list< double > &  aPrms,
const TopoDS_Edge &  aTrackEdge,
bool  aFirstIsStart,
std::list< SMESH_MeshEditor_PathPoint > &  aLPP 
)
private
void SMESH_MeshEditor::makeWalls ( TNodeOfNodeListMap mapNewNodes,
TTElemOfElemListMap newElemsMap,
TElemOfVecOfNnlmiMap elemNewNodesMap,
TIDSortedElemSet elemSet,
const int  nbSteps,
SMESH_SequenceOfElemPtr &  srcElements 
)
private
void SMESH_MeshEditor::MergeEqualElements ( )
void SMESH_MeshEditor::MergeNodes ( TListOfListOfNodes theNodeGroups,
const bool  theAvoidMakingHoles = false 
)

Referenced by SewFreeBorder().

double SMESH_MeshEditor::OrientedAngle ( const gp_Pnt &  p0,
const gp_Pnt &  p1,
const gp_Pnt &  g1,
const gp_Pnt &  g2 
)

compute an oriented angle between two planes defined by four points.

The vector (p0,p1) defines the intersection of the 2 planes (p0,p1,g1) and (p0,p1,g2)

Parameters
p0base of the rotation axe
p1extremity of the rotation axe
g1belongs to the first plane
g2belongs to the second plane

References Max().

Referenced by DoubleNodesOnGroupBoundaries().

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.
Returns
bool - Success or not.
void SMESH_MeshEditor::RemoveElemFromGroups ( const SMDS_MeshElement element,
SMESHDS_Mesh aMesh 
)
static
bool SMESH_MeshEditor::Reorient ( const SMDS_MeshElement theElement)

Referenced by Reorient2D(), and Reorient2DBy3D().

int SMESH_MeshEditor::Reorient2D ( TIDSortedElemSet theFaces,
const gp_Dir &  theDirection,
const SMDS_MeshElement theFace 
)

Reorient faces.

Parameters
theFaces- the faces to reorient. If empty the whole mesh is meant
theDirection- desired direction of normal of theFace
theFace- one of theFaces that should be oriented according to theDirection and whose orientation defines orientation of other faces
Returns
number of reoriented faces.

References Abs(), SMESH_MeshAlgos::FaceNormal(), SMDS_Mesh::facesIterator(), SMESH_MeshAlgos::FindFaceInSet(), GetMeshDS(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::GetType(), SMDS_MeshElement::NbCornerNodes(), Reorient(), and SMDSAbs_Face.

int SMESH_MeshEditor::Reorient2DBy3D ( TIDSortedElemSet theFaces,
TIDSortedElemSet theVolumes,
const bool  theOutsideNormal 
)

Reorient faces basing on orientation of adjacent volumes.

Parameters
theFaces- faces to reorient. If empty, all mesh faces are treated.
theVolumes- reference volumes.
theOutsideNormal- to orient faces to have their normal pointing either outside or inside the adjacent volumes.
Returns
number of reoriented faces.

References Abs(), SMDS_MeshElement::begin_nodes(), SMDS_Mesh::elementsIterator(), SMDS_MeshElement::end_nodes(), SMDS_VolumeTool::GetFaceIndex(), SMDS_VolumeTool::GetFaceNodes(), GetMeshDS(), SMDS_MeshElement::GetNodeIndex(), SMDS_MeshElement::GetType(), SMDS_MeshElement::NbCornerNodes(), Reorient(), SMDS_VolumeTool::Set(), SMDS_VolumeTool::SetExternalNormal(), and SMDSAbs_Face.

void SMESH_MeshEditor::ReplaceElemInGroups ( const SMDS_MeshElement elemToRm,
const SMDS_MeshElement elemToAdd,
SMESHDS_Mesh aMesh 
)
static
static void SMESH_MeshEditor::ReplaceElemInGroups ( const SMDS_MeshElement elemToRm,
const std::vector< const SMDS_MeshElement * > &  elemToAdd,
SMESHDS_Mesh aMesh 
)
static
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 
)
int SMESH_MeshEditor::SimplifyFace ( const std::vector< const SMDS_MeshNode * > &  faceNodes,
std::vector< const SMDS_MeshNode * > &  poly_nodes,
std::vector< int > &  quantities 
) const

Referenced by applyMerge().

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 
)
void SMESH_MeshEditor::SplitBiQuadraticIntoLinear ( TIDSortedElemSet theElems)

Split bi-quadratic elements into linear ones without creation of additional nodes.

  • bi-quadratic triangle will be split into 3 linear quadrangles;
  • bi-quadratic quadrangle will be split into 4 linear quadrangles;
  • tri-quadratic hexahedron will be split into 8 linear hexahedra; Quadratic elements of lower dimension adjacent to the split bi-quadratic element will be split in order to keep the mesh conformal.
    Parameters
    elems- elements to split

References SMESHDS_SubMesh::AddElement(), AddElement(), SMDS_MeshElement::begin_nodes(), SMDS_MeshElement::end_nodes(), SMDS_MeshElement::GetEntityType(), GetMeshDS(), SMDS_MeshElement::getshapeId(), SMESHDS_Mesh::MeshElements(), SMESHDS_Mesh::RemoveFreeElement(), ReplaceElemInGroups(), SMDSAbs_Edge, SMDSAbs_Face, SMDSEntity_BiQuad_Quadrangle, SMDSEntity_BiQuad_Triangle, SMDSEntity_Quad_Edge, and SMDSEntity_TriQuad_Hexa.

SMESH_MeshEditor::PGroupIDs SMESH_MeshEditor::Transform ( TIDSortedElemSet theElems,
const gp_Trsf &  theTrsf,
const bool  theCopy,
const bool  theMakeGroups,
SMESH_Mesh theTargetMesh = 0 
)
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.
Returns
bool - Success or not.

Field Documentation

SMESH_ComputeErrorPtr SMESH_MeshEditor::myError
private

Referenced by ConvertToQuadratic().