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... | |
Public Member Functions | |
| SMESH_MeshEditor (SMESH_Mesh *theMesh) | |
| SMESH_Mesh * | GetMesh () |
| SMESHDS_Mesh * | GetMeshDS () |
| Return mesh DS. More... | |
| const SMESH_SequenceOfElemPtr & | GetLastCreatedNodes () const |
| const SMESH_SequenceOfElemPtr & | GetLastCreatedElems () const |
| void | ClearLastCreated () |
| Clears myLastCreatedNodes and myLastCreatedElems. More... | |
| SMESH_ComputeErrorPtr & | GetError () |
| SMDS_MeshElement * | AddElement (const std::vector< const SMDS_MeshNode * > &nodes, const ElemFeatures &features) |
| Add element. More... | |
| SMDS_MeshElement * | AddElement (const std::vector< smIdType > &nodeIDs, const ElemFeatures &features) |
| Add element. More... | |
| void | RemoveNodeWithReconnection (const SMDS_MeshNode *node) |
| Remove a node and fill a hole appeared by changing surrounding faces. More... | |
| smIdType | Remove (const std::list< smIdType > &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) |
| void | SplitEdge (const SMDS_MeshNode *theNode1, const SMDS_MeshNode *theNode2, double thePosition) |
| void | SplitFace (const SMDS_MeshElement *theFace, double theX, double theY, double theZ) |
| bool | Reorient (const SMDS_MeshElement *theElement) |
| int | Reorient2D (TIDSortedElemSet &theFaces, const gp_Vec &theDirection, TIDSortedElemSet &theRefFaces, bool theAllowNonManifold) |
| 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, const bool avoidOverConstrainedVolumes=false) |
| 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... | |
| bool | isVariantOverConstrained (SMDS_VolumeTool &vol, const int *connVariants) |
| Return true if one of the tetras included in the variant will be an overconstrained tetra. 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_Mesh *theTrackMesh, SMDS_ElemIteratorPtr theTrackIterator, const SMDS_MeshNode *theNodeStart, std::list< double > &theAngles, const bool theAngleVariation, std::list< double > &theScales, const bool theScaleVariation, 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... | |
| PGroupIDs | Offset (TIDSortedElemSet &theElements, const double theValue, SMESH_Mesh *theTgtMesh, const bool theMakeGroups, const bool theCopyElements, const bool theFixSelfIntersection) |
| Make an offset mesh from a source 2D mesh. 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, bool toCreateAllElements=false) |
| Creates missing boundary elements. More... | |
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) |
| Replace elemToRm by elemToAdd in the all groups. More... | |
| 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 | |
| smIdType | convertElemToQuadratic (SMESHDS_SubMesh *theSm, SMESH_MesherHelper &theHelper, const bool theForce3d) |
| Convert elements contained in a submesh to quadratic. More... | |
| smIdType | 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... | |
| 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) |
| static void | linearScaleVariation (const int NbSteps, std::list< double > &theScales) |
Private Attributes | |
| SMESH_Mesh * | myMesh |
| SMESH_SequenceOfElemPtr | myLastCreatedNodes |
| SMESH_SequenceOfElemPtr | myLastCreatedElems |
| SMESH_ComputeErrorPtr | myError |
Editor of a mesh.
| typedef std::unique_ptr< std::list< int > > SMESH_MeshEditor::PGroupIDs |
| typedef std::map<const SMDS_MeshElement*, TVecOfNnlmiMap, TElemSort > SMESH_MeshEditor::TElemOfVecOfNnlmiMap |
| typedef std::map< const SMDS_MeshElement*, int, TIDCompare > SMESH_MeshEditor::TFacetOfElem |
2nd arg of SplitVolumes()
| typedef std::list< std::list< smIdType > > 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 |
| typedef std::vector<TNodeOfNodeListMapItr> SMESH_MeshEditor::TVecOfNnlmiMap |
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 ANGLE_LINEAR_VARIATION: to make linear variation of angles
| SMESH_MeshEditor::SMESH_MeshEditor | ( | SMESH_Mesh * | theMesh | ) |
| SMDS_MeshElement * SMESH_MeshEditor::AddElement | ( | const std::vector< const SMDS_MeshNode * > & | nodes, |
| const ElemFeatures & | features | ||
| ) |
Add element.
References SMESHDS_Mesh::Add0DElement(), SMESHDS_Mesh::Add0DElementWithID(), SMESHDS_Mesh::AddBall(), SMESHDS_Mesh::AddBallWithID(), SMESHDS_Mesh::AddEdge(), SMESHDS_Mesh::AddEdgeWithID(), SMESHDS_Mesh::AddFace(), SMESHDS_Mesh::AddFaceWithID(), SMESHDS_Mesh::AddNode(), SMESHDS_Mesh::AddNodeWithID(), SMESHDS_Mesh::AddPolygonalFace(), SMESHDS_Mesh::AddPolygonalFaceWithID(), SMESHDS_Mesh::AddPolyhedralVolume(), SMESHDS_Mesh::AddPolyhedralVolumeWithID(), SMESHDS_Mesh::AddQuadPolygonalFace(), SMESHDS_Mesh::AddQuadPolygonalFaceWithID(), SMESHDS_Mesh::AddVolume(), SMESHDS_Mesh::AddVolumeWithID(), GetMeshDS(), SMESH_MeshEditor::ElemFeatures::myBallDiameter, SMESH_MeshEditor::ElemFeatures::myID, SMESH_MeshEditor::ElemFeatures::myIsPoly, SMESH_MeshEditor::ElemFeatures::myIsQuad, myLastCreatedElems, SMESH_MeshEditor::ElemFeatures::myPolyhedQuantities, SMESH_MeshEditor::ElemFeatures::myType, SMDSAbs_0DElement, SMDSAbs_Ball, SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Node, and SMDSAbs_Volume.
Referenced by AddElement(), SMESH_Gen_i::ConcatenateCommon(), MeshEditor_I::TPreviewMesh::Copy(), SMESH_Gen_i::CopyMesh(), SMESH_Gen_i::CopyMeshWithGeom(), DoubleElements(), doubleNodes(), StdMeshers_Import_1D::importMesh(), Make2DMeshFrom3D(), MakeBoundaryMesh(), SMESH_Mesh_i::MakeGroupsOfBadInputElements(), makeWalls(), MergeNodes(), Offset(), removeQuadElem(), SewSideElements(), SplitBiQuadraticIntoLinear(), and Transform().
| SMDS_MeshElement * SMESH_MeshEditor::AddElement | ( | const std::vector< smIdType > & | nodeIDs, |
| const ElemFeatures & | features | ||
| ) |
Add element.
References AddElement(), DriverMED::FindNode(), and GetMeshDS().
|
static |
References SMDS_MeshGroup::Add(), SMESHDS_Group::Contains(), SMESHDS_Mesh::GetGroups(), and SMESHDS_Group::SMDSGroup().
Referenced by DeleteDiag(), InsertNodesIntoLink(), MergeElements(), MergeNodes(), QuadToTri(), SewSideElements(), SplitEdge(), SplitFace(), and TriToQuad().
| 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.
| theElems | - list of groups of elements (edges or faces) to be replicated |
| theNodesNot | - list of groups of nodes not to replicate |
| 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. |
References cast2Node, Face, SMDS_MeshNode::GetInverseElementIterator(), and SMDS_MeshElement::nodesIterator().
Referenced by SMESH_MeshEditor_i::AffectedElemGroupsInRegion().
|
private |
Computes new connectivity of an element after merging nodes.
| [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. |
References SMDS_MeshCell::applyInterlace(), SMDS_MeshCell::applyInterlaceRev(), SMESH_MeshAlgos::DeMerge(), SMDS_MeshElement::GetEntityType(), SMDS_VolumeTool::GetFaceNodesIndices(), SMDS_VolumeTool::GetOppFaceIndex(), SMESH_MeshEditor::ElemFeatures::Init(), SMDS_MeshCell::interlacedSmdsOrder(), SMDS_VolumeTool::IsForward(), SMDS_VolumeTool::IsLinked(), SMDS_MeshElement::IsMediumNode(), SMESH_MeshEditor::ElemFeatures::myIsQuad, SMESH_MeshEditor::ElemFeatures::myNodes, 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.
Referenced by MergeNodes().
| int SMESH_MeshEditor::BestSplit | ( | const SMDS_MeshElement * | theQuad, |
| SMESH::Controls::NumericalFunctorPtr | theCriterion | ||
| ) |
Find better diagonal for splitting.
| theQuad | - The face to find better splitting of. |
| theCriterion | - Is used to choose a diagonal for splitting. |
References ClearLastCreated(), getBadRate(), SMDS_MeshElement::GetType(), SMDS_MeshElement::IsQuadratic(), SMDS_MeshElement::NbNodes(), SMDS_MeshElement::nodesIterator(), and SMDSAbs_Face.
Referenced by SMESH_MeshEditor_i::BestSplit().
|
static |
References FindFreeBorder().
| void SMESH_MeshEditor::ClearLastCreated | ( | ) |
Clears myLastCreatedNodes and myLastCreatedElems.
References SMESHUtils::FreeVector(), myLastCreatedElems, and myLastCreatedNodes.
Referenced by BestSplit(), SMESH_MeshEditor_i::ClearLastCreated(), SMESH_Gen_i::ConcatenateCommon(), DeleteDiag(), DoubleElements(), DoubleNodes(), ExtrusionAlongTrack(), ExtrusionSweep(), SMESH_MeshEditor_i::FillHole(), FindCoincidentNodes(), FindEqualElements(), FindShape(), SMESH_MeshEditor_i::initData(), InverseDiag(), MergeElements(), MergeNodes(), Offset(), QuadTo4Tri(), QuadToTri(), Remove(), Reorient(), RotationSweep(), SewFreeBorder(), SewSideElements(), Smooth(), SplitEdge(), SplitFace(), Transform(), TriToQuad(), and UpdateVolumes().
|
private |
Convert elements contained in a submesh to quadratic.
Convert elements contained in a sub-mesh to quadratic.
References SMESH_MesherHelper::AddEdge(), SMESHDS_SubMesh::AddElement(), SMESH_MesherHelper::AddFace(), SMESH_MesherHelper::AddPolygonalFace(), SMESH_MesherHelper::AddPolyhedralVolume(), SMESH_MesherHelper::AddTLinks(), SMESH_MesherHelper::AddVolume(), SMDS_MeshElement::begin_nodes(), SMDS_MeshElement::end_nodes(), SMESHDS_SubMesh::GetElements(), SMDS_MeshElement::GetEntityType(), SMDS_MeshElement::GetID(), SMESH_MesherHelper::GetIsBiQuadratic(), GetMeshDS(), SMDS_MeshElement::getshapeId(), SMDS_MeshElement::GetType(), SMDS_MeshElement::IsQuadratic(), SMDS_MeshElement::NbCornerNodes(), SMESHDS_Mesh::RemoveFreeElement(), SMESHDS_Mesh::RemoveFreeNode(), ReplaceElemInGroups(), SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Volume, SMDSEntity_BiQuad_Penta, SMDSEntity_BiQuad_Quadrangle, SMDSEntity_BiQuad_Triangle, SMDSEntity_Hexa, SMDSEntity_Hexagonal_Prism, SMDSEntity_Penta, SMDSEntity_Polyhedra, SMDSEntity_Pyramid, SMDSEntity_Quad_Hexa, SMDSEntity_Quad_Penta, SMDSEntity_Quad_Quadrangle, SMDSEntity_Quad_Triangle, SMDSEntity_Tetra, and SMDSEntity_TriQuad_Hexa.
Referenced by ConvertToQuadratic().
| bool SMESH_MeshEditor::ConvertFromQuadratic | ( | ) |
References SMESH_subMesh::GetId(), GetMeshDS(), SMESH_Mesh::GetShapeToMesh(), SMESH_Mesh::GetSubMeshContaining(), SMESH_subMesh::GetSubMeshDS(), SMESH_Mesh::HasShapeToMesh(), myMesh, SMDS_Mesh::NbEdges(), SMDS_Mesh::NbFaces(), SMDS_Mesh::NbVolumes(), and removeQuadElem().
Referenced by SMESH_MeshEditor_i::ConvertFromQuadratic(), and SMESH_MeshEditor_i::ConvertFromQuadraticObject().
| void SMESH_MeshEditor::ConvertFromQuadratic | ( | TIDSortedElemSet & | theElements | ) |
Makes given elements linear.
References SMESHUtils::elemSetIterator(), DriverMED::FindNode(), SMDS_MeshElement::GetID(), GetMeshDS(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::GetType(), SMDS_MeshElement::IsQuadratic(), SMESH_MeshAlgos::NbCommonNodes(), SMDS_MeshElement::NbCornerNodes(), SMDS_MeshElement::NbNodes(), removeQuadElem(), SMDSAbs_0DElement, and SMDSAbs_NbElementTypes.
References SMESH_MesherHelper::AddEdge(), SMESH_MesherHelper::AddFace(), SMESH_MesherHelper::AddPolygonalFace(), SMESH_MesherHelper::AddPolyhedralVolume(), SMESH_MesherHelper::AddTLinks(), SMESH_MesherHelper::AddVolume(), SMDS_MeshElement::begin_nodes(), convertElemToQuadratic(), SMDS_Mesh::edgesIterator(), SMDS_MeshElement::end_nodes(), SMDS_Mesh::facesIterator(), SMESH_MesherHelper::FixQuadraticElements(), SMDS_MeshCell::GetEntityType(), SMDS_MeshElement::GetID(), GetMeshDS(), SMDS_MeshCell::GetNode(), SMESH_Mesh::GetShapeToMesh(), SMESH_Mesh::GetSubMeshContaining(), SMESH_subMesh::GetSubMeshDS(), SMESH_subMesh::GetSubShape(), SMESH_Mesh::HasShapeToMesh(), SMDS_MeshCell::IsQuadratic(), myError, myMesh, SMDS_Mesh::NbEdges(), SMDS_Mesh::NbFaces(), SMDS_Mesh::NbVolumes(), SMESHDS_Mesh::RemoveFreeElement(), SMESHDS_Mesh::RemoveFreeNode(), ReplaceElemInGroups(), SMESH_MesherHelper::SetElementsOnShape(), SMESH_MesherHelper::SetIsBiQuadratic(), SMESH_MesherHelper::SetIsQuadratic(), SMESH_MesherHelper::SetSubShape(), SMDSEntity_BiQuad_Penta, SMDSEntity_BiQuad_Quadrangle, SMDSEntity_BiQuad_Triangle, SMDSEntity_Hexa, SMDSEntity_Hexagonal_Prism, SMDSEntity_Penta, SMDSEntity_Polyhedra, SMDSEntity_Pyramid, SMDSEntity_Quad_Hexa, SMDSEntity_Quad_Penta, SMDSEntity_Quad_Quadrangle, SMDSEntity_Quad_Triangle, SMDSEntity_Quadrangle, SMDSEntity_Tetra, SMDSEntity_Triangle, SMDSEntity_TriQuad_Hexa, SMESH_MesherHelper::ToFixNodeParameters(), and SMDS_Mesh::volumesIterator().
Referenced by StdMeshers_Projection_2D::Compute(), and SMESH_MeshEditor_i::convertToQuadratic().
| void SMESH_MeshEditor::ConvertToQuadratic | ( | const bool | theForce3d, |
| TIDSortedElemSet & | theElements, | ||
| const bool | theToBiQuad | ||
| ) |
Makes given elements quadratic.
| theForce3d | - if true, the medium nodes will be placed in the middle of link |
| theElements | - elements to make quadratic |
References SMESH_MesherHelper::AddEdge(), SMESHDS_SubMesh::AddElement(), SMESH_MesherHelper::AddFace(), SMESH_MesherHelper::AddTLinks(), SMESH_MesherHelper::AddVolume(), begin(), SMDS_MeshElement::begin_nodes(), SMESHDS_SubMesh::Contains(), SMDS_MeshElement::end_nodes(), SMESH_MesherHelper::FixQuadraticElements(), SMDS_MeshElement::GetEntityType(), SMDS_MeshElement::GetID(), SMDS_MeshNode::GetInverseElementIterator(), GetMeshDS(), SMDS_MeshElement::getshapeId(), SMDS_MeshElement::GetType(), SMDS_MeshElement::IsQuadratic(), SMESHDS_Mesh::MeshElements(), myError, myMesh, SMDS_MeshElement::NbCornerNodes(), SMDS_MeshElement::nodeIterator(), SMESHDS_Mesh::RemoveFreeElement(), SMESHDS_Mesh::RemoveFreeNode(), ReplaceElemInGroups(), SMESH_MesherHelper::SetIsBiQuadratic(), SMESH_MesherHelper::SetIsQuadratic(), SMESH_MesherHelper::SetSubShape(), SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_NbElementTypes, SMDSAbs_Volume, SMDSEntity_BiQuad_Quadrangle, SMDSEntity_BiQuad_Triangle, SMDSEntity_Edge, SMDSEntity_Hexa, SMDSEntity_Penta, SMDSEntity_Pyramid, SMDSEntity_Quad_Hexa, SMDSEntity_Quad_Quadrangle, SMDSEntity_Quad_Triangle, SMDSEntity_Quadrangle, SMDSEntity_Tetra, SMDSEntity_Triangle, and SMDSEntity_TriQuad_Hexa.
|
private |
Copy node position and set to node on the same geometry.
References GetMeshDS(), SMDS_MeshNode::GetPosition(), SMDS_MeshElement::getshapeId(), SMESHDS_Mesh::SetNodeOnEdge(), SMESHDS_Mesh::SetNodeOnFace(), SMESHDS_Mesh::SetNodeOnVertex(), SMDS_TOP_3DSPACE, SMDS_TOP_EDGE, SMDS_TOP_FACE, SMDS_TOP_UNSPEC, and SMDS_TOP_VERTEX.
Referenced by CreateFlatElementsOnFacesGroups(), DoubleNodes(), doubleNodes(), and DoubleNodesOnGroupBoundaries().
| void SMESH_MeshEditor::Create0DElementsOnAllNodes | ( | const TIDSortedElemSet & | elements, |
| TIDSortedElemSet & | all0DElems, | ||
| const bool | duplicateElements | ||
| ) |
Create 0D elements on all nodes of the given object.
| 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(), SMESHUtils::elemSetIterator(), SMDS_MeshNode::GetInverseElementIterator(), GetMeshDS(), myLastCreatedElems, SMDS_MeshElement::nodesIterator(), SMDSAbs_0DElement, and SMDSAbs_Node.
Referenced by SMESH_MeshEditor_i::Create0DElementsOnAllNodes().
| 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.
| theElems | - list of groups of faces, where a group of faces is a set of SMDS_MeshElements sorted by Id. |
References SMESHDS_Group::Add(), SMESH_Mesh::AddGroup(), SMESHDS_Mesh::AddNode(), SMESHDS_Mesh::AddVolume(), copyPosition(), SMDS_Mesh::DownCast(), SMDS_MeshElement::GetID(), SMESH_Mesh::GetMeshDS(), SMDS_MeshCell::GetVtkType(), SMDS_MeshElement::IsMediumNode(), SMDS_MeshCell::IsQuadratic(), myMesh, SMDS_MeshCell::nodeIterator(), SMDSAbs_Volume, SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().
Referenced by SMESH_MeshEditor_i::CreateFlatElementsOnFacesGroups().
| 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 | ||
| ) |
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).
Build ordered list of nodes at the border of each group of faces to replace (to be used to build a geom subshape)
References SMESHDS_Group::Add(), SMESH_Mesh::AddGroup(), SMESHDS_Mesh::BuildDownWardConnectivity(), SMESHDS_Group::Contains(), MESHCUT::distance2(), SMESH_NodeSearcher::FindClosestTo(), SMDS_Mesh::FindElement(), SMDS_Mesh::FromVtkToSmds(), SMDS_Downward::getCellDimension(), SMDS_UnstructuredGrid::getDownArray(), SMDS_Downward::getDownCells(), SMDS_Downward::getDownTypes(), SMESHDS_Group::GetElements(), SMESHDS_GroupBase::GetElements(), SMDS_Mesh::GetGrid(), SMESH_Group::GetGroupDS(), SMESH_Mesh::GetGroups(), SMDS_MeshElement::GetID(), SMDS_MeshNode::GetInverseElementIterator(), SMESH_Mesh::GetMeshDS(), SMESH_Group::GetName(), SMDS_UnstructuredGrid::GetNeighbors(), SMDS_Downward::getNodes(), SMDS_Downward::getNumberOfDownCells(), SMDS_MeshElement::getshapeId(), SMESHDS_GroupBase::GetType(), SMDS_Downward::getVtkCellId(), SMDS_MeshElement::GetVtkID(), SMESHDS_GroupBase::IsEmpty(), MESSAGE, myMesh, NBMAXNEIGHBORS, SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Node, SMDSAbs_Volume, and MeshEditor_I::theNodeSearcher.
Referenced by SMESH_MeshEditor_i::CreateHoleSkin().
| bool SMESH_MeshEditor::DeleteDiag | ( | const SMDS_MeshNode * | theNode1, |
| const SMDS_MeshNode * | theNode2 | ||
| ) |
References SMESHDS_Mesh::AddFace(), AddToSameGroups(), ClearLastCreated(), findTriangles(), SMDS_MeshElement::GetEntityType(), GetMeshDS(), getNodesFromTwoTria(), getQuadrangleNodes(), SMDS_MeshElement::getshapeId(), myLastCreatedElems, SMESHDS_Mesh::RemoveElement(), SMESHDS_Mesh::RemoveNode(), SMESHDS_Mesh::SetMeshElementOnShape(), SMDSEntity_Quad_Triangle, and SMDSEntity_Triangle.
Referenced by SMESH_MeshEditor_i::DeleteDiag().
| void SMESH_MeshEditor::DoubleElements | ( | const TIDSortedElemSet & | theElements | ) |
Create elements equal (on same nodes) to given ones.
| [in] | theElements | - a set of elems to duplicate. If it is empty, all elements of the uppest dimension are duplicated. |
References AddElement(), SMDS_MeshElement::begin_nodes(), ClearLastCreated(), SMDS_Mesh::elementsIterator(), SMESHUtils::elemSetIterator(), SMDS_MeshElement::end_nodes(), GetMeshDS(), SMDS_Mesh::GetMeshInfo(), SMDS_MeshElement::GetType(), SMESH_MeshEditor::ElemFeatures::Init(), SMDS_MeshElement::isMarked(), SMESH_MeshAlgos::MarkElems(), SMDS_MeshInfo::NbElements(), SMDS_Mesh::NbNodes(), SMDSAbs_0DElement, SMDSAbs_All, SMDSAbs_Ball, SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_NbElementTypes, SMDSAbs_Node, and SMDSAbs_Volume.
Referenced by SMESH_MeshEditor_i::DoubleElements().
| 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.
| 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 |
References SMESHDS_Mesh::AddNode(), SMDS_MeshElement::begin_nodes(), SMESHDS_Mesh::ChangeElementNodes(), ClearLastCreated(), copyPosition(), SMDS_MeshElement::end_nodes(), SMDS_Mesh::FindElement(), SMDS_Mesh::FindNode(), GetMeshDS(), myLastCreatedNodes, SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().
Referenced by SMESH_MeshEditor_i::DoubleNodeElem(), SMESH_MeshEditor_i::DoubleNodeElemGroup(), SMESH_MeshEditor_i::DoubleNodeElemGroup2New(), SMESH_MeshEditor_i::DoubleNodeElemGroups(), SMESH_MeshEditor_i::DoubleNodeElemGroups2New(), SMESH_MeshEditor_i::DoubleNodeGroups(), SMESH_MeshEditor_i::DoubleNodes(), and 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.
| 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. |
References ClearLastCreated(), doubleNodes(), and GetMeshDS().
|
private |
Creates a hole in a mesh by doubling the nodes of some particular elements.
| 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 |
References AddElement(), SMESHDS_Mesh::AddNode(), SMESHDS_Mesh::ChangeElementNodes(), SMESHDS_Mesh::ChangePolyhedronNodes(), copyPosition(), SMDS_MeshElement::GetEntityType(), SMDS_MeshVolume::GetQuantities(), SMESH_MeshEditor::ElemFeatures::Init(), MESSAGE, myLastCreatedNodes, SMDS_MeshElement::NbNodes(), SMDS_MeshElement::nodesIterator(), SMDSEntity_Polyhedra, 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.
| 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. |
References SMESHUtils::Deleter< TOBJ >::_obj, cast2Node, DoubleNodes(), Face, SMDS_MeshNode::GetInverseElementIterator(), and SMDS_MeshElement::nodesIterator().
Referenced by SMESH_MeshEditor_i::DoubleNodeElemGroupInRegion(), SMESH_MeshEditor_i::DoubleNodeElemGroupsInRegion(), and SMESH_MeshEditor_i::DoubleNodeElemInRegion().
| 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".
| 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 |
References SMESHDS_Group::Add(), SMDS_Mesh::AddFaceFromVtkIds(), SMESH_Mesh::AddGroup(), 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(), SMDS_UnstructuredGrid::GetLinks(), SMESH_Mesh::GetMeshDS(), GetMeshDS(), SMDS_UnstructuredGrid::GetNeighbors(), SMDS_UnstructuredGrid::GetNodeIds(), SMDS_Downward::getNodes(), SMDS_Downward::getNumberOfDownCells(), SMDS_Downward::getNumberOfUpCells(), SMDS_UnstructuredGrid::GetParentVolumes(), SMDS_MeshCell::GetType(), SMDS_Downward::getUpCells(), SMDS_Downward::getUpTypes(), SMDS_Downward::getVtkCellId(), SMDS_MeshElement::GetVtkID(), MESSAGE, SMESHDS_Mesh::ModifyCellNodes(), myMesh, NBMAXNEIGHBORS, OrientedAngle(), SMESH_Mesh::RemoveGroup(), SMDSAbs_Face, and SMDSAbs_Volume.
Referenced by SMESH_MeshEditor_i::DoubleNodesOnGroupBoundaries().
| SMESH_MeshEditor::Extrusion_Error SMESH_MeshEditor::ExtrusionAlongTrack | ( | TIDSortedElemSet | theElements[2], |
| SMESH_Mesh * | theTrackMesh, | ||
| SMDS_ElemIteratorPtr | theTrackIterator, | ||
| const SMDS_MeshNode * | theNodeStart, | ||
| std::list< double > & | theAngles, | ||
| const bool | theAngleVariation, | ||
| std::list< double > & | theScales, | ||
| const bool | theScaleVariation, | ||
| const gp_Pnt * | theRefPoint, | ||
| const bool | theMakeGroups | ||
| ) |
References ClearLastCreated(), Edge, EXTR_BAD_PATH_SHAPE, EXTR_BAD_STARTING_NODE, EXTR_CANT_GET_TANGENT, EXTR_NO_ELEMENTS, EXTR_OK, EXTR_PATH_NOT_EDGE, ExtrusionSweep(), SMESH_MeshAlgos::Get1DBranches(), SMESH_MesherHelper::GetAncestors(), SMESH_Mesh::GetMeshDS(), SMESH_MesherHelper::GetNodeU(), Handle(), SMESHDS_Mesh::IndexToShape(), linearAngleVariation(), linearScaleVariation(), SMESH_MeshEditor::ExtrusParam::PathPoint::myAngle, SMESH_MeshEditor::ExtrusParam::PathPoint::myPnt, SMESH_MeshEditor::ExtrusParam::PathPoint::myTgt, SMESH_Mesh::NbEdges(), ORDER_QUADRATIC, and SMESHDS_Mesh::ShapeToIndex().
Referenced by SMESH_MeshEditor_i::ExtrusionAlongPathObjects().
| SMESH_MeshEditor::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.
| theElems | - list of elements for extrusion |
| newElemsMap | returns history of extrusion |
| theFlags | set 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 |
References ExtrusionSweep().
Referenced by SMESH_MeshEditor_i::AdvancedExtrusion(), ExtrusionAlongTrack(), SMESH_MeshEditor_i::ExtrusionByNormal(), ExtrusionSweep(), and SMESH_MeshEditor_i::ExtrusionSweepObjects().
| SMESH_MeshEditor::PGroupIDs SMESH_MeshEditor::ExtrusionSweep | ( | TIDSortedElemSet | theElems[2], |
| ExtrusParam & | theParams, | ||
| TTElemOfElemListMap & | newElemsMap | ||
| ) |
Generate new elements by extrusion of theElements.
| theElems | - list of elements for extrusion |
| newElemsMap | returns history of extrusion |
| theFlags | set 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 |
References ClearLastCreated(), generateGroups(), SMDS_MeshElement::GetEntityType(), SMDS_MeshElement::GetID(), SMDS_MeshNode::GetInverseElementIterator(), GetMeshDS(), SMDS_MeshElement::GetType(), SMDS_MeshElement::IsMediumNode(), SMDS_MeshElement::IsQuadratic(), SMESH_MeshEditor::ExtrusParam::MakeNodes(), makeWalls(), SMDS_Mesh::Modified(), myLastCreatedElems, myLastCreatedNodes, myMesh, SMESH_Mesh::NbEdges(), SMESH_Mesh::NbFaces(), SMDS_MeshElement::NbNodes(), SMESH_MeshEditor::ExtrusParam::NbSteps(), SMESH_Mesh::NbVolumes(), SMDS_MeshElement::nodeIterator(), ORDER_QUADRATIC, SMESH_MeshEditor::ExtrusParam::SetElementsToUse(), SMDSAbs_Volume, SMDSEntity_BiQuad_Quadrangle, sweepElement(), SMESH_MeshEditor::ExtrusParam::ToMakeBoundary(), and SMESH_MeshEditor::ExtrusParam::ToMakeGroups().
| 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
| [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 ClearLastCreated(), SMESH_OctreeNode::FindCoincidentNodes(), GetMeshDS(), SMESH_MesherHelper::IsMedium(), myMesh, SMESH_Mesh::NbEdges(), SMESH_Mesh::NbFaces(), SMESH_Mesh::NbVolumes(), SMDS_Mesh::nodesIterator(), and ORDER_QUADRATIC.
Referenced by SMESH_Gen_i::ConcatenateCommon(), SMESH_MeshEditor_i::findCoincidentNodes(), and StdMeshers_Cartesian_VL::ViscousBuilder::MakeViscousLayers().
| void SMESH_MeshEditor::FindEqualElements | ( | TIDSortedElemSet & | theElements, |
| TListOfListOfElementsID & | theGroupsOfElementsID | ||
| ) |
References ClearLastCreated(), SMDS_Mesh::elementsIterator(), SMESHUtils::elemSetIterator(), ComparableElement::GetElem(), SMDS_MeshElement::GetID(), GetMeshDS(), ComparableElement::GroupID(), and SMDS_MeshElement::IsNull().
Referenced by SMESH_MeshEditor_i::FindEqualElements(), MergeEqualElements(), and SewFreeBorder().
|
static |
References ControlFreeBorder, findAdjacentFace(), FindFreeBorder(), SMDS_MeshElement::GetID(), SMDS_MeshElement::interlacedNodesIterator(), and SMDSAbs_Face.
Referenced by CheckFreeBorderNodes(), FindFreeBorder(), and SewFreeBorder().
|
static |
Find corresponding nodes in two sets of faces.
| 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 |
| 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 |
References SMDS_MeshElement::GetID(), SMDS_MeshNode::GetInverseElementIterator(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::GetNodeIndex(), SMDS_MeshElement::IsQuadratic(), MESSAGE, SMDS_MeshElement::NbNodes(), reverse(), SEW_BAD_SIDE1_NODES, SEW_BAD_SIDE2_NODES, SEW_OK, SEW_TOPO_DIFF_SETS_OF_ELEMENTS, and SMDSAbs_Face.
Referenced by StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), and VISCOUS_3D::ShrinkFace::IsPeriodic().
| int SMESH_MeshEditor::FindShape | ( | const SMDS_MeshElement * | theElem | ) |
References ClearLastCreated(), SMESHDS_SubMesh::Contains(), SMDS_MeshElement::GetID(), GetMesh(), GetMeshDS(), SMDS_MeshElement::getshapeId(), SMDS_MeshElement::GetType(), SMESHDS_Mesh::IndexToShape(), SMESHDS_Mesh::MeshElements(), MESSAGE, SMDS_MeshElement::nodesIterator(), SMESHDS_Mesh::ShapeToIndex(), SMESHDS_Mesh::ShapeToMesh(), SMDSAbs_Node, and SMESHDS_Mesh::SubMeshes().
Referenced by SMESH_Pattern::Apply(), StdMeshers_Import_1D2D::Compute(), SMESH_Pattern::createElements(), SMESH_Mesh_i::GetShapeIDForElem(), QuadToTri(), StdMeshers_SegmentLengthAroundVertex::SetParametersByMesh(), Smooth(), and SplitVolumes().
|
private |
Create groups of elements made during transformation.
| 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 |
| nodeGens | - nodes making corresponding myLastCreatedNodes |
| elemGens | - elements making corresponding myLastCreatedElems |
| postfix | - to push_back to names of new groups |
| targetMesh | - mesh to create groups in |
| topPresent | - is there are "top" elements that are created by sweeping |
References SMDS_MeshGroup::Add(), SMESH_Mesh::AddGroup(), SMESHDS_GroupBase::Contains(), SMESHDS_Group::GetElements(), SMESH_Group::GetGroupDS(), SMESH_Mesh::GetGroupIds(), SMESH_Mesh::GetGroups(), SMESHDS_GroupBase::GetID(), GetMesh(), SMESH_Mesh::GetMeshDS(), SMESH_Group::GetName(), SMESHDS_GroupBase::GetStoreName(), SMESHDS_GroupBase::GetType(), SMDS_MeshElement::GetType(), SMESHDS_Group::IsEmpty(), SMESHDS_GroupBase::IsEmpty(), MESSAGE, myLastCreatedElems, myLastCreatedNodes, SMESHDS_Mesh::RemoveGroup(), SMESHDS_GroupBase::SetStoreName(), SMESHDS_Group::SetType(), and SMDSAbs_NbElementTypes.
Referenced by ExtrusionSweep(), Offset(), RotationSweep(), and Transform().
| SMESH_ComputeErrorPtr & SMESH_MeshEditor::GetError | ( | ) |
| void SMESH_MeshEditor::GetHexaFacetsToSplit | ( | TIDSortedElemSet & | theHexas, |
| const gp_Ax1 & | theFacetNormal, | ||
| TFacetOfElem & | theFacets | ||
| ) |
For hexahedra that will be split into prisms, finds facets to split into triangles.
| [in,out] | theHexas | - the hexahedra |
| [in] | theFacetNormal | - facet normal |
| [out] | theFacets | - the hexahedra and found facet IDs |
References SMESH_ElementSearcher::FindClosestTo(), SMESH_MeshAlgos::GetElementSearcher(), SMDS_VolumeTool::GetFaceIndex(), SMDS_VolumeTool::GetFaceNodes(), SMDS_VolumeTool::GetFaceNormal(), SMDS_MeshElement::GetGeomType(), SMESH_Mesh::GetMeshDS(), SMDS_VolumeTool::GetOppFaceIndexOfHex(), SMDS_VolumeTool::IsFreeFace(), myMesh, SMDS_VolumeTool::NbFaceNodes(), SMDS_VolumeTool::NbFaces(), SMESH_Mesh::NbHexas(), SMDS_VolumeTool::Set(), SMDSAbs_Volume, SMDSGeom_HEXA, and THIS_METHOD.
Referenced by SMESH_MeshEditor_i::SplitHexahedraIntoPrisms().
| const SMESH_SequenceOfElemPtr & SMESH_MeshEditor::GetLastCreatedElems | ( | ) | const |
| const SMESH_SequenceOfElemPtr & SMESH_MeshEditor::GetLastCreatedNodes | ( | ) | const |
Referenced by SMESH_MeshEditor_i::GetLastCreatedNodes(), and SMESH_MeshEditor_i::MakePolyLine().
|
static |
Return nodes linked to the given one in elements of the type.
Return nodes linked to the given one.
| 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(), SMESH_MeshEditor_i::MoveNode(), RemoveNodeWithReconnection(), and SMESH_MeshEditor_i::RemoveNodeWithReconnection().
| SMESH_Mesh * SMESH_MeshEditor::GetMesh | ( | ) |
| SMESHDS_Mesh * SMESH_MeshEditor::GetMeshDS | ( | ) |
Return mesh DS.
References SMESH_Mesh::GetMeshDS(), and myMesh.
Referenced by AddElement(), convertElemToQuadratic(), ConvertFromQuadratic(), ConvertToQuadratic(), copyPosition(), Create0DElementsOnAllNodes(), DeleteDiag(), DoubleElements(), DoubleNodes(), DoubleNodesOnGroupBoundaries(), ExtrusionSweep(), FindCoincidentNodes(), FindEqualElements(), FindShape(), SMESH_MeshEditor_i::GetPreviewData(), InsertNodesIntoLink(), InverseDiag(), Make2DMeshFrom3D(), MakeBoundaryMesh(), makeWalls(), MergeElements(), MergeNodes(), Offset(), QuadTo4Tri(), QuadToTri(), Remove(), removeQuadElem(), Reorient(), Reorient2D(), Reorient2DBy3D(), RotationSweep(), StdMeshers_SegmentLengthAroundVertex::SetParametersByMesh(), SewFreeBorder(), SewSideElements(), Smooth(), SplitBiQuadraticIntoLinear(), SplitEdge(), SplitFace(), SplitVolumes(), sweepElement(), Transform(), TriToQuad(), and UpdateVolumes().
| 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 |
||
| ) |
References SMESHDS_Mesh::AddEdge(), SMESHDS_Mesh::AddFace(), SMESHDS_Mesh::AddPolygonalFace(), AddToSameGroups(), SMDS_MeshElement::begin_nodes(), SMDS_MeshElement::end_nodes(), SMDS_Mesh::FindEdge(), getBadRate(), GetMeshDS(), SMDS_MeshElement::getshapeId(), SMDS_MeshElement::GetType(), SMDS_MeshElement::interlacedNodesIterator(), SMDS_MeshElement::IsMediumNode(), SMDS_MeshElement::IsPoly(), SMDS_MeshElement::IsQuadratic(), myLastCreatedElems, SMDS_MeshElement::NbNodes(), SMESHDS_Mesh::RemoveElement(), ReplaceElemInGroups(), reverse(), SMESHDS_Mesh::SetMeshElementOnShape(), SMDSAbs_Edge, and SMDSAbs_Face.
Referenced by SewFreeBorder().
| bool SMESH_MeshEditor::InverseDiag | ( | const SMDS_MeshElement * | theTria1, |
| const SMDS_MeshElement * | theTria2 | ||
| ) |
References SMESHDS_Mesh::ChangeElementNodes(), ClearLastCreated(), Face, SMDS_MeshElement::GetEntityType(), GetMesh(), GetMeshDS(), getNodesFromTwoTria(), SMESH_MesherHelper::GetNodeUV(), SMDS_MeshElement::getshapeId(), SMESH_MesherHelper::GetSubShape(), SMDS_MeshElement::GetType(), Handle(), SMESHDS_Mesh::MoveNode(), SMDS_MeshElement::nodesIterator(), SMESHDS_Mesh::SetNodeOnFace(), SMESH_MesherHelper::SetSubShape(), SMDS_TOP_FACE, SMDSAbs_Face, SMDSEntity_BiQuad_Triangle, SMDSEntity_Quad_Triangle, and SMDSEntity_Triangle.
Referenced by VISCOUS_3D::_ViscousBuilder::fixBadFaces(), InverseDiag(), and SMESH_MeshEditor_i::InverseDiag().
| bool SMESH_MeshEditor::InverseDiag | ( | const SMDS_MeshNode * | theNode1, |
| const SMDS_MeshNode * | theNode2 | ||
| ) |
|
static |
Returns true if given node is medium.
| n | - node to check |
| typeToCheck | - type of elements containing the node to ask about node status |
References SMDS_MeshNode::GetInverseElementIterator(), and SMDS_MeshElement::IsMediumNode().
Referenced by StdMeshers_FaceSide::GetEdgeNodes(), SMESH_MesherHelper::IsMedium(), SMESH_Pattern::Load(), and Smooth().
| bool SMESH_MeshEditor::isVariantOverConstrained | ( | SMDS_VolumeTool & | vol, |
| const int * | connVariants | ||
| ) |
Return true if one of the tetras included in the variant will be an overconstrained tetra.
|
staticprivate |
Referenced by ExtrusionAlongTrack(), and SMESH_MeshEditor::ExtrusParam::ExtrusParam().
|
staticprivate |
Referenced by ExtrusionAlongTrack(), and SMESH_MeshEditor::ExtrusParam::ExtrusParam().
| 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.
Generates skin mesh (containing 2D cells) from 3D mesh The created 2D mesh elements based on nodes of free faces of boundary volumes.
References AddElement(), SMDS_Mesh::FindElement(), SMDS_VolumeTool::GetFaceNodes(), GetMeshDS(), SMDS_VolumeTool::IsFreeFace(), SMDS_MeshCell::IsQuadratic(), SMDS_VolumeTool::NbFaceNodes(), SMDS_VolumeTool::NbFaces(), SMDS_VolumeTool::SetExternalNormal(), SMESH_MeshEditor::ElemFeatures::SetPoly(), SMESH_MeshEditor::ElemFeatures::SetQuad(), SMDSAbs_Face, and SMDS_Mesh::volumesIterator().
Referenced by SMESH_MeshEditor_i::Make2DMeshFrom3D().
| int SMESH_MeshEditor::MakeBoundaryMesh | ( | const TIDSortedElemSet & | elements, |
| Bnd_Dimension | dimension, | ||
| SMESH_Group * | group = 0, |
||
| SMESH_Mesh * | targetMesh = 0, |
||
| bool | toCopyElements = false, |
||
| bool | toCopyExistingBoundary = false, |
||
| bool | toAddExistingBondary = false, |
||
| bool | aroundElements = false, |
||
| bool | toCreateAllElements = false |
||
| ) |
Creates missing boundary elements.
| elements | - elements whose boundary is to be checked |
| dimension | - defines type of boundary elements to create |
| group | - a group to store created boundary elements in |
| targetMesh | - a mesh to store created boundary elements in |
| toCopyElements | - if true, the checked elements will be copied into the targetMesh |
| toCopyExistingBoundary | - if true, not only new but also pre-existing boundary elements will be copied into the targetMesh |
| toAddExistingBondary | - if true, not only new but also pre-existing boundary elements will be added into the new group |
| aroundElements | - if true, elements will be created on boundary of given elements else, on boundary of the whole mesh. |
References AddElement(), SMESH_MesherHelper::AddNode(), BND_1DFROM2D, BND_2DFROM3D, SMDS_Mesh::elementsIterator(), SMESHUtils::elemSetIterator(), SMDS_Mesh::FindEdge(), SMDS_Mesh::FindElement(), SMESH_MeshAlgos::FindFaceInSet(), SMDS_VolumeTool::GetCenterNodeIndex(), SMDS_VolumeTool::GetFaceBaryCenter(), SMDS_VolumeTool::GetFaceNodes(), SMESH_Group::GetGroupDS(), SMESH_MesherHelper::GetMediumPos(), GetMesh(), GetMeshDS(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::GetNodeIndex(), SMDS_VolumeTool::GetNodes(), SMDS_MeshElement::GetType(), SMESH_Mesh::HasShapeToMesh(), SMESHDS_Mesh::IndexToShape(), SMESH_MeshEditor::ElemFeatures::Init(), SMDS_MeshElement::interlacedNodesIterator(), SMDS_VolumeTool::IsFreeFace(), SMDS_MeshElement::IsQuadratic(), SMESH_MesherHelper::IsSubShape(), myLastCreatedElems, myMesh, SMDS_MeshElement::NbCornerNodes(), SMDS_VolumeTool::NbFaceNodes(), SMDS_VolumeTool::NbFaces(), SMDS_MeshElement::NbNodes(), SMDS_VolumeTool::Set(), SMDS_VolumeTool::SetExternalNormal(), SMESHDS_Mesh::SetMeshElementOnShape(), SMDSAbs_Edge, SMDSAbs_Face, and SMDSAbs_Volume.
Referenced by VISCOUS_3D::_ViscousBuilder::Compute(), SMESH_MeshEditor_i::MakeBoundaryElements(), and SMESH_MeshEditor_i::MakeBoundaryMesh().
|
private |
Create 1D and 2D elements around swept elements.
| 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 |
References SMESHDS_Mesh::AddEdge(), AddElement(), SMESHDS_Mesh::AddFace(), SMDS_MeshCell::applyInterlaceRev(), SMESHDS_Mesh::ChangeElementNodes(), SMDS_Mesh::FindEdge(), SMDS_Mesh::FindElement(), SMDS_Mesh::FindFace(), SMESH_MeshAlgos::FindFaceInSet(), SMDS_MeshElement::GetEntityType(), SMDS_VolumeTool::GetFaceIndex(), SMDS_VolumeTool::GetFaceNodes(), SMDS_MeshNode::GetInverseElementIterator(), GetMeshDS(), SMDS_MeshCell::GetNodeIndex(), SMDS_MeshElement::GetNodeIndex(), SMDS_MeshElement::GetNodeWrap(), SMDS_MeshElement::GetType(), SMDS_VolumeTool::ID(), SMESH_MeshEditor::ElemFeatures::Init(), SMDS_MeshCell::interlacedSmdsOrder(), SMDS_VolumeTool::IsForward(), SMDS_VolumeTool::IsFreeFace(), SMDS_MeshElement::IsMediumNode(), SMDS_MeshElement::IsQuadratic(), myLastCreatedElems, SMDS_VolumeTool::NbFaceNodes(), SMDS_VolumeTool::NbFaces(), reverse(), SMDS_VolumeTool::Set(), SMDS_VolumeTool::SetExternalNormal(), SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Volume, and sweepElement().
Referenced by ExtrusionSweep(), and RotationSweep().
| void SMESH_MeshEditor::MergeElements | ( | TListOfListOfElementsID & | theGroupsOfElementsID | ) |
References AddToSameGroups(), ClearLastCreated(), SMDS_Mesh::FindElement(), GetMeshDS(), and Remove().
Referenced by SMESH_MeshEditor_i::MergeElements(), MergeEqualElements(), and SewFreeBorder().
| void SMESH_MeshEditor::MergeEqualElements | ( | ) |
References FindEqualElements(), and MergeElements().
Referenced by SMESH_Gen_i::ConcatenateCommon(), and SMESH_MeshEditor_i::MergeEqualElements().
| void SMESH_MeshEditor::MergeNodes | ( | TListOfListOfNodes & | theNodeGroups, |
| const bool | theAvoidMakingHoles = false |
||
| ) |
References SMESHDS_SubMesh::AddElement(), AddElement(), AddToSameGroups(), applyMerge(), SMESHDS_Mesh::ChangeElementNodes(), SMESHDS_Mesh::ChangePolyhedronNodes(), ClearLastCreated(), SMDS_MeshElement::GetGeomType(), SMDS_MeshElement::GetID(), SMDS_MeshNode::GetInverseElementIterator(), GetMeshDS(), SMDS_MeshElement::GetNodeIndex(), SMDS_MeshNode::GetPosition(), SMDS_MeshElement::getshapeId(), SMESH_Mesh::GetSubMeshContaining(), SMDS_MeshElement::isMarked(), SMESHDS_Mesh::MeshElements(), myMesh, SMDS_MeshElement::nodesIterator(), Remove(), SMESHDS_Mesh::RemoveFreeElement(), ReplaceElemInGroups(), SMDS_MeshElement::setIsMarked(), SMDS_TOP_VERTEX, and SMDSGeom_POLYHEDRA.
Referenced by StdMeshers_Projection_2D::Compute(), StdMeshers_Prism_3D::computeWalls(), SMESH_Gen_i::ConcatenateCommon(), StdMeshers_RenumberHelper::DoReplaceNodes(), StdMeshers_Cartesian_VL::ViscousBuilder::MakeViscousLayers(), SMESH_MeshEditor_i::MergeNodes(), RemoveNodeWithReconnection(), and SewFreeBorder().
| SMESH_MeshEditor::PGroupIDs SMESH_MeshEditor::Offset | ( | TIDSortedElemSet & | theElements, |
| const double | theValue, | ||
| SMESH_Mesh * | theTgtMesh, | ||
| const bool | theMakeGroups, | ||
| const bool | theCopyElements, | ||
| const bool | theFixSelfIntersection | ||
| ) |
Make an offset mesh from a source 2D mesh.
| [in] | theElements | - source faces |
| [in] | theValue | - offset value |
| [out] | theTgtMesh | - a mesh to add offset elements to |
| [in] | theMakeGroups | - to generate groups |
References AddElement(), SMESHDS_Mesh::AddNodeWithID(), ClearLastCreated(), SMDS_Mesh::elementsIterator(), SMESHUtils::elemSetIterator(), SMDS_Mesh::FindElement(), SMDS_Mesh::FindNode(), generateGroups(), SMDS_MeshElement::GetID(), SMESH_Mesh::GetMeshDS(), GetMeshDS(), SMESH_MeshEditor::ElemFeatures::Init(), SMESH_MeshAlgos::MakeOffset(), SMDS_Mesh::MaxNodeID(), myLastCreatedElems, myLastCreatedNodes, myMesh, SMESH_MeshEditor::ElemFeatures::myNodes, SMESHDS_Mesh::RemoveFreeElement(), and SMDSAbs_Face.
Referenced by SMESH_MeshEditor_i::Offset().
| 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)
| p0 | base of the rotation axe |
| p1 | extremity of the rotation axe |
| g1 | belongs to the first plane |
| g2 | belongs to the second plane |
Referenced by DoubleNodesOnGroupBoundaries().
| void SMESH_MeshEditor::QuadTo4Tri | ( | TIDSortedElemSet & | theElems | ) |
Split each of given quadrangles into 4 triangles.
| theElems | - The faces to be split. If empty all faces are split. |
References SMESH_MesherHelper::AddFace(), SMESH_MesherHelper::AddNode(), SMESH_MesherHelper::AddTLinks(), SMDS_MeshElement::begin_nodes(), SMESH_MesherHelper::calcTFI(), ClearLastCreated(), SMDS_Mesh::elementsIterator(), SMESHUtils::elemSetIterator(), SMDS_MeshElement::end_nodes(), Face, SMESH_MesherHelper::GetIsQuadratic(), GetMesh(), GetMeshDS(), SMESH_MesherHelper::GetMiddleUV(), SMESH_MesherHelper::GetNodeUV(), SMDS_MeshElement::getshapeId(), SMESH_MesherHelper::GetSubShape(), SMESH_MesherHelper::GetSubShapeID(), Handle(), SMESHDS_Mesh::MeshElements(), myLastCreatedElems, myLastCreatedNodes, SMDS_MeshElement::NbCornerNodes(), SMESHDS_Mesh::RemoveFreeElement(), SMESH_MesherHelper::SetElementsOnShape(), SMESH_MesherHelper::SetIsBiQuadratic(), SMESH_MesherHelper::SetIsQuadratic(), SMESH_MesherHelper::SetSubShape(), and SMDSAbs_Face.
Referenced by SMESH_MeshEditor_i::QuadTo4Tri().
| bool SMESH_MeshEditor::QuadToTri | ( | TIDSortedElemSet & | theElems, |
| const bool | the13Diag | ||
| ) |
Split quadrangles into triangles.
| theElems | - The faces to be split. |
| the13Diag | - Is used to choose a diagonal for splitting. |
References SMESHDS_Mesh::AddFace(), AddToSameGroups(), ClearLastCreated(), Face, FindShape(), SMESH_MesherHelper::GetCentralNode(), SMDS_MeshElement::GetGeomType(), GetMesh(), GetMeshDS(), SMESH_MesherHelper::GetSubShapeID(), Handle(), SMESHDS_Mesh::IndexToShape(), SMDS_MeshElement::IsNull(), myLastCreatedElems, myLastCreatedNodes, SMDS_MeshElement::NbNodes(), SMDS_MeshElement::nodesIterator(), SMESHDS_Mesh::RemoveElement(), SMESHDS_Mesh::SetMeshElementOnShape(), SMESH_MesherHelper::SetSubShape(), and SMDSGeom_QUADRANGLE.
| bool SMESH_MeshEditor::QuadToTri | ( | TIDSortedElemSet & | theElems, |
| SMESH::Controls::NumericalFunctorPtr | theCriterion | ||
| ) |
Split quadrangles into triangles.
| theElems | - The faces to be split. |
| theCriterion | - Is used to choose a diagonal for splitting. |
References SMESHDS_Mesh::AddFace(), SMESH_MesherHelper::AddFace(), SMESH_MesherHelper::AddTLinkNode(), SMESH_MesherHelper::AddTLinks(), AddToSameGroups(), SMDS_MeshElement::begin_nodes(), ClearLastCreated(), SMDS_MeshElement::end_nodes(), FindShape(), getBadRate(), GetMesh(), GetMeshDS(), SMDS_MeshElement::GetType(), Handle(), SMDS_MeshElement::IsQuadratic(), myLastCreatedElems, SMDS_MeshElement::NbCornerNodes(), SMESHDS_Mesh::RemoveElement(), SMESH_MesherHelper::SetIsBiQuadratic(), SMESH_MesherHelper::SetIsQuadratic(), SMESHDS_Mesh::SetMeshElementOnShape(), and SMDSAbs_Face.
Referenced by SMESH_MeshEditor_i::QuadToTri(), and SMESH_MeshEditor_i::SplitQuad().
| smIdType SMESH_MeshEditor::Remove | ( | const std::list< smIdType > & | theElemIDs, |
| const bool | isNodes | ||
| ) |
References cast2Node, ClearLastCreated(), SMDS_Mesh::FindElement(), SMDS_Mesh::FindNode(), GetMesh(), GetMeshDS(), SMDS_MeshNode::GetPosition(), SMDS_MeshElement::getshapeId(), SMESH_subMesh::MESH_ENTITY_REMOVED, SMESHDS_Mesh::RemoveElement(), SMESHDS_Mesh::RemoveNode(), and SMDS_TOP_VERTEX.
Referenced by SMESH_Pattern::createElements(), MergeElements(), MergeNodes(), SMESH_MeshEditor_i::RemoveElements(), SMESH_MeshEditor_i::RemoveNodes(), RemoveNodeWithReconnection(), SMESH_MeshEditor_i::RemoveOrphanNodes(), and SewSideElements().
|
static |
| void SMESH_MeshEditor::RemoveNodeWithReconnection | ( | const SMDS_MeshNode * | node | ) |
Remove a node and fill a hole appeared by changing surrounding faces.
Remove a node and fill a hole appeared, by changing surrounding faces.
References cast2Node, SMDS_MeshElement::GetGeomType(), SMDS_MeshElement::GetID(), SMDS_MeshNode::GetInverseElementIterator(), GetLinkedNodes(), SMESH_MeshAlgos::IsOn2DBoundary(), SMDS_MeshElement::IsQuadratic(), MergeNodes(), SMDS_MeshNode::NbInverseElements(), Remove(), SMDSAbs_Face, SMDSAbs_Volume, SMDSGeom_TRIANGLE, and SMESH_TNodeXYZ::SquareDistance().
Referenced by SMESH_MeshEditor_i::RemoveNodeWithReconnection().
|
private |
Convert quadratic elements to linear ones and remove quadratic nodes.
References SMESHDS_SubMesh::AddElement(), AddElement(), SMDS_MeshElement::begin_nodes(), SMESHDS_SubMesh::Contains(), SMDS_MeshElement::end_nodes(), SMDS_MeshElement::GetID(), GetMeshDS(), SMDS_MeshElement::getshapeId(), SMESH_MeshEditor::ElemFeatures::Init(), SMDS_MeshElement::IsQuadratic(), SMESHDS_Mesh::MeshElements(), SMDS_MeshElement::NbCornerNodes(), SMESHDS_Mesh::RemoveFreeElement(), SMESHDS_Mesh::RemoveFreeNode(), ReplaceElemInGroups(), SMESH_MeshEditor::ElemFeatures::SetID(), and SMESH_MeshEditor::ElemFeatures::SetQuad().
Referenced by ConvertFromQuadratic().
| bool SMESH_MeshEditor::Reorient | ( | const SMDS_MeshElement * | theElement | ) |
References SMDS_MeshCell::applyInterlace(), SMDS_MeshElement::begin_nodes(), SMESHDS_Mesh::ChangeElementNodes(), SMESHDS_Mesh::ChangePolyhedronNodes(), ClearLastCreated(), SMDS_MeshElement::end_nodes(), SMDS_MeshElement::GetEntityType(), SMDS_VolumeTool::GetFaceNodes(), GetMeshDS(), SMDS_MeshElement::GetType(), SMDS_VolumeTool::IsFaceExternal(), MESSAGE, SMDS_VolumeTool::NbFaceNodes(), SMDS_VolumeTool::NbFaces(), SMDS_VolumeTool::NbNodes(), SMDS_MeshElement::nodesIterator(), reverse(), SMDS_MeshCell::reverseSmdsOrder(), SMDSAbs_Volume, and SMDSEntity_Polyhedra.
Referenced by StdMeshers_PolyhedronPerSolid_3D::Compute(), StdMeshers_Projection_2D::Compute(), SMESH_MeshEditor_i::Reorient(), Reorient2D(), and Reorient2DBy3D().
| int SMESH_MeshEditor::Reorient2D | ( | TIDSortedElemSet & | theFaces, |
| const gp_Vec & | theDirection, | ||
| TIDSortedElemSet & | theRefFaces, | ||
| bool | theAllowNonManifold | ||
| ) |
Reorient faces.
| theFaces | - the faces to reorient. If empty the whole mesh is meant |
| theDirection | - desired direction of normal of theRefFaces. It can be (0,0,0) in order to keep orientation of theRefFaces. |
| theRefFaces | - correctly oriented faces whose orientation defines orientation of other faces. |
References SMESH_MeshAlgos::FaceNormal(), SMDS_Mesh::facesIterator(), SMESH_MeshAlgos::FindFaceInSet(), GetMeshDS(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::isMarked(), SMDS_MeshElement::NbCornerNodes(), Reorient(), and SMDS_Mesh::SetAllCellsNotMarked().
Referenced by SMESH_MeshEditor_i::Reorient2D(), and SMESH_MeshEditor_i::Reorient2DByNeighbours().
| int SMESH_MeshEditor::Reorient2DBy3D | ( | TIDSortedElemSet & | theFaces, |
| TIDSortedElemSet & | theVolumes, | ||
| const bool | theOutsideNormal | ||
| ) |
Reorient faces basing on orientation of adjacent volumes.
| 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. |
References SMDS_MeshElement::begin_nodes(), SMDS_Mesh::elementsIterator(), SMESHUtils::elemSetIterator(), 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(), SMDSAbs_Face, and SMDSAbs_Volume.
Referenced by SMESH_MeshEditor_i::Reorient2DBy3D().
|
static |
Replace elemToRm by elemToAdd in the all groups.
References SMDS_MeshGroup::Add(), SMESHDS_Mesh::GetGroups(), SMDS_MeshGroup::Remove(), and SMESHDS_Group::SMDSGroup().
Referenced by convertElemToQuadratic(), ConvertToQuadratic(), InsertNodesIntoLink(), MergeNodes(), removeQuadElem(), SplitBiQuadraticIntoLinear(), SplitVolumes(), and UpdateVolumes().
|
static |
Replace elemToRm by elemToAdd in the all groups.
References SMDS_MeshGroup::Add(), SMESHDS_Mesh::GetGroups(), SMDS_MeshGroup::Remove(), and SMESHDS_Group::SMDSGroup().
| SMESH_MeshEditor::PGroupIDs SMESH_MeshEditor::RotationSweep | ( | TIDSortedElemSet | theElements[2], |
| const gp_Ax1 & | theAxis, | ||
| const double | theAngle, | ||
| const int | theNbSteps, | ||
| const double | theToler, | ||
| const bool | theMakeGroups, | ||
| const bool | theMakeWalls = true |
||
| ) |
References SMESHDS_Mesh::AddNode(), cast2Node, ClearLastCreated(), generateGroups(), SMDS_MeshElement::GetEntityType(), SMDS_MeshNode::GetInverseElementIterator(), GetMeshDS(), SMDS_MeshElement::GetType(), SMDS_MeshElement::IsMediumNode(), SMDS_MeshElement::IsQuadratic(), makeWalls(), myLastCreatedElems, myLastCreatedNodes, myMesh, SMESH_Mesh::NbEdges(), SMESH_Mesh::NbFaces(), SMDS_MeshElement::NbNodes(), SMESH_Mesh::NbVolumes(), SMDS_MeshElement::nodesIterator(), ORDER_QUADRATIC, SMDSAbs_Volume, SMDSEntity_BiQuad_Quadrangle, sweepElement(), SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().
Referenced by SMESH_MeshEditor_i::RotationSweepObjects().
| SMESH_MeshEditor::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 |
||
| ) |
References begin(), cast2Node, ClearLastCreated(), end(), findAdjacentFace(), FindEqualElements(), FindFreeBorder(), findSegment(), SMDS_MeshNode::GetInverseElementIterator(), LinkID_Gen::GetLinkID(), GetMeshDS(), SMDS_VolumeTool::GetNodes(), SMDS_MeshElement::GetType(), InsertNodesIntoLink(), SMDS_MeshElement::interlacedNodesIterator(), SMDS_VolumeTool::IsLinked(), MergeElements(), MergeNodes(), MESSAGE, SMESHDS_Mesh::MoveNode(), myLastCreatedElems, SMDS_MeshElement::NbNodes(), SMDS_VolumeTool::Set(), SEW_BAD_SIDE_NODES, SEW_BORDER1_NOT_FOUND, SEW_BORDER2_NOT_FOUND, SEW_BOTH_BORDERS_NOT_FOUND, SEW_OK, SEW_VOLUMES_TO_SPLIT, SMDSAbs_Edge, SMDSAbs_Face, UpdateVolumes(), SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().
Referenced by SMESH_MeshEditor_i::SewCoincidentFreeBorders().
| SMESH_MeshEditor::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 | ||
| ) |
References AddElement(), SMESHDS_Mesh::AddFace(), SMESHDS_Mesh::AddPolygonalFace(), AddToSameGroups(), ClearLastCreated(), end(), SMDS_Mesh::FindElement(), SMESH_MeshAlgos::FindFaceInSet(), SMDS_VolumeTool::GetFaceNodes(), SMDS_MeshElement::GetID(), SMDS_MeshNode::GetInverseElementIterator(), LinkID_Gen::GetLinkID(), GetMeshDS(), SMDS_MeshElement::GetNodeIndex(), SMDS_MeshElement::getshapeId(), SMDS_MeshElement::GetType(), SMESH_MeshEditor::ElemFeatures::Init(), SMDS_VolumeTool::IsFreeFace(), MESSAGE, SMDS_VolumeTool::NbFaceNodes(), SMDS_VolumeTool::NbFaces(), SMDS_MeshElement::NbNodes(), SMDS_MeshCell::nodesIterator(), SMDS_MeshNode::nodesIterator(), SMDS_MeshElement::nodesIterator(), Remove(), SMESHDS_Mesh::RemoveElement(), reverse(), SMESH_MeshEditor::ElemFeatures::SetID(), SMESHDS_Mesh::SetMeshElementOnShape(), SEW_BAD_SIDE1_NODES, SEW_BAD_SIDE2_NODES, SEW_DIFF_NB_OF_ELEMENTS, SEW_OK, SEW_TOPO_DIFF_SETS_OF_ELEMENTS, SMDSAbs_Face, SMDSAbs_Volume, SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().
| 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 |
||
| ) |
References CENTROIDAL, centroidalSmooth(), ClearLastCreated(), SMESHDS_SubMesh::Contains(), Edge, Face, SMDS_Mesh::facesIterator(), FindShape(), getClosestUV(), SMDS_MeshNode::GetInverseElementIterator(), GetMesh(), GetMeshDS(), SMESH_MesherHelper::GetMiddleUV(), SMDS_MeshElement::GetNode(), SMESHDS_SubMesh::GetNodes(), SMESH_MesherHelper::GetNodeUV(), SMESH::Controls::NumericalFunctor::GetPoints(), SMDS_MeshNode::GetPosition(), SMDS_MeshElement::GetType(), SMESH::Controls::AspectRatio::GetValue(), Handle(), SMESHDS_Mesh::IndexToShape(), SMDS_MeshElement::interlacedNodesIterator(), IsMedium(), SMDS_MeshElement::IsQuadratic(), LAPLACIAN, laplacianSmooth(), SMESHDS_Mesh::MeshElements(), MESSAGE, SMESHDS_Mesh::MoveNode(), SMDS_MeshElement::NbCornerNodes(), SMESHDS_SubMesh::NbElements(), SMDS_MeshElement::NbNodes(), SMDS_MeshElement::nodesIterator(), project(), SMDS_MeshNode::SetPosition(), SMESH_MesherHelper::SetSubShape(), SMDS_TOP_3DSPACE, SMDS_TOP_EDGE, SMDS_TOP_VERTEX, SMDSAbs_Face, SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().
Referenced by VISCOUS_2D::_ViscousBuilder2D::improve(), StdMeshers_Prism_3D::projectBottomToTop(), and SMESH_MeshEditor_i::smooth().
| void SMESH_MeshEditor::SplitBiQuadraticIntoLinear | ( | TIDSortedElemSet & | theElems | ) |
Split bi-quadratic elements into linear ones without creation of additional nodes.
| elems | - elements to split |
References SMESHDS_SubMesh::AddElement(), AddElement(), SMDS_MeshElement::begin_nodes(), SMDS_ElementHolder::clear(), SMDS_MeshElement::end_nodes(), SMDS_MeshElement::GetEntityType(), GetMeshDS(), SMDS_MeshElement::getshapeId(), SMESHDS_Mesh::MeshElements(), SMESHDS_Mesh::RemoveFreeElement(), ReplaceElemInGroups(), SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Volume, SMDSEntity_BiQuad_Quadrangle, SMDSEntity_BiQuad_Triangle, SMDSEntity_Quad_Edge, and SMDSEntity_TriQuad_Hexa.
Referenced by SMESH_MeshEditor_i::SplitBiQuadraticIntoLinear().
| void SMESH_MeshEditor::SplitEdge | ( | const SMDS_MeshNode * | theNode1, |
| const SMDS_MeshNode * | theNode2, | ||
| double | thePosition | ||
| ) |
References SMESH_MesherHelper::AddEdge(), SMESH_MesherHelper::AddFace(), SMESH_MesherHelper::AddTLinks(), AddToSameGroups(), SMESH_MesherHelper::CheckNodeU(), ClearLastCreated(), Edge, Face, SMDS_Mesh::GetElementsByNodes(), SMDS_MeshElement::GetID(), SMESH_MesherHelper::GetMediumNode(), GetMesh(), GetMeshDS(), SMDS_MeshNode::GetNode(), SMDS_MeshNode::GetPosition(), SMDS_MeshElement::GetShapeID(), Handle(), SMESHDS_Mesh::IndexToShape(), SMESH_MesherHelper::MaxTolerance(), SMESHDS_Mesh::MoveNode(), myLastCreatedElems, SMESHDS_Mesh::RemoveFreeElement(), SMESHDS_Mesh::RemoveFreeNode(), SMESH_MesherHelper::SetIsBiQuadratic(), SMESH_MesherHelper::SetIsQuadratic(), SMESHDS_Mesh::SetMeshElementOnShape(), SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Volume, SMDSEntity_BiQuad_Triangle, SMDSGeom_TRIANGLE, SMESH_MesherHelper::ToFixNodeParameters(), and SMDS_MeshNode::X().
Referenced by SMESH_MeshEditor_i::AddNodeOnSegment().
| void SMESH_MeshEditor::SplitFace | ( | const SMDS_MeshElement * | theFace, |
| double | theX, | ||
| double | theY, | ||
| double | theZ | ||
| ) |
References SMESH_MesherHelper::AddFace(), SMESH_MesherHelper::AddNode(), SMESH_MesherHelper::AddTLinks(), AddToSameGroups(), SMDS_MeshElement::begin_nodes(), ClearLastCreated(), SMDS_MeshElement::end_nodes(), SMDS_MeshElement::GetEntityType(), SMDS_MeshElement::GetID(), GetMesh(), GetMeshDS(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::GetShapeID(), SMDS_MeshElement::GetType(), SMESHDS_Mesh::IndexToShape(), SMDS_MeshElement::IsQuadratic(), SMESHDS_Mesh::MoveNode(), myLastCreatedElems, SMDS_MeshElement::NbCornerNodes(), SMDS_MeshElement::NbNodes(), SMESHDS_Mesh::RemoveFreeElement(), SMESH_MesherHelper::SetElementsOnShape(), SMESH_MesherHelper::SetIsBiQuadratic(), SMESH_MesherHelper::SetIsQuadratic(), SMESHDS_Mesh::SetMeshElementOnShape(), SMESH_MesherHelper::SetSubShape(), SMDSAbs_Face, SMDSEntity_BiQuad_Quadrangle, and SMDSEntity_BiQuad_Triangle.
Referenced by SMESH_MeshEditor_i::AddNodeOnFace().
| void SMESH_MeshEditor::SplitVolumes | ( | const TFacetOfElem & | theElems, |
| const int | theMethodFlags, | ||
| const bool | avoidOverConstrainedVolumes = false |
||
| ) |
Split volumic elements into tetrahedra or prisms.
If facet ID < 0, element is split into tetrahedra, else a hexahedron is split into prisms so that the given facet is split into triangles if avoidOverConstrainedVolumes is True , the split method will choose the variant with no over-constrained volumes.
References SMESHDS_SubMesh::AddElement(), SMESH_MesherHelper::CheckNodeUV(), SMESHDS_SubMesh::Contains(), Face, FindShape(), SMDS_VolumeTool::GetBaryCenter(), SMDS_VolumeTool::GetCenterNodeIndex(), SMDS_MeshElement::GetEntityType(), SMDS_VolumeTool::GetFaceBaryCenter(), SMDS_VolumeTool::GetFaceNodes(), SMDS_VolumeTool::GetFaceNodesIndices(), SMESHDS_SubMesh::GetID(), GetMesh(), GetMeshDS(), SMDS_VolumeTool::GetNodes(), SMDS_MeshElement::GetType(), SMESHDS_Mesh::IndexToShape(), SMDS_VolumeTool::IsFaceExternal(), SMDS_MeshElement::IsQuadratic(), SMESHDS_Mesh::MeshElements(), SMESHDS_Mesh::MoveNode(), myLastCreatedElems, myLastCreatedNodes, SMDS_VolumeTool::NbFaceNodes(), SMDS_VolumeTool::NbFaces(), SMDS_VolumeTool::NbNodes(), SMDS_MeshElement::NbNodes(), SMESHDS_Mesh::RemoveFreeElement(), SMESHDS_Mesh::RemoveNode(), SMESHDS_SubMesh::RemoveNode(), ReplaceElemInGroups(), SMDS_VolumeTool::Set(), SMESHDS_Mesh::SetNodeOnFace(), SMESH_MesherHelper::SetSubShape(), SMDSAbs_Face, SMDSAbs_Volume, SMDSEntity_Quad_Tetra, SMDSEntity_Tetra, SMDSEntity_TriQuad_Hexa, and SMESH_MesherHelper::ToFixNodeParameters().
Referenced by SMESH_MeshEditor_i::SplitHexahedraIntoPrisms(), SMESH_MeshEditor_i::SplitVolumesIntoTetra(), and SMESH_MeshEditor_i::SplitVolumesIntoTetraAvoidOverConstrainedVolumes().
|
private |
Create elements by sweeping an element.
| 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 |
References SMESHDS_Mesh::AddEdge(), SMESHDS_Mesh::AddFace(), SMESHDS_Mesh::AddPolygonalFace(), SMESHDS_Mesh::AddPolyhedralVolume(), SMESHDS_Mesh::AddVolume(), SMDS_MeshCell::applyInterlace(), SMESH_MeshAlgos::FindFaceInSet(), SMDS_MeshElement::GetEntityType(), SMDS_MeshElement::GetID(), GetMeshDS(), SMDS_MeshElement::GetType(), SMDS_MeshCell::interlacedSmdsOrder(), SMDS_MeshElement::IsQuadratic(), MESSAGE, myLastCreatedElems, SMDS_MeshElement::NbCornerNodes(), SMDS_MeshElement::NbNodes(), reverse(), SMDS_MeshCell::reverseSmdsOrder(), SMDSAbs_Edge, SMDSAbs_Face, SMDSEntity_0D, SMDSEntity_Ball, SMDSEntity_BiQuad_Quadrangle, SMDSEntity_BiQuad_Triangle, SMDSEntity_Edge, SMDSEntity_Node, SMDSEntity_Polygon, SMDSEntity_Quad_Edge, SMDSEntity_Quad_Polygon, SMDSEntity_Quad_Quadrangle, SMDSEntity_Quad_Triangle, SMDSEntity_Quadrangle, and SMDSEntity_Triangle.
Referenced by ExtrusionSweep(), makeWalls(), and RotationSweep().
| SMESH_MeshEditor::PGroupIDs SMESH_MeshEditor::Transform | ( | TIDSortedElemSet & | theElems, |
| const gp_Trsf & | theTrsf, | ||
| const bool | theCopy, | ||
| const bool | theMakeGroups, | ||
| SMESH_Mesh * | theTargetMesh = 0 |
||
| ) |
Move or copy theElements applying theTrsf to their nodes.
| theElems | - elements to transform, if theElems is empty then apply to all mesh nodes |
| theTrsf | - transformation to apply |
| theCopy | - if true, create translated copies of theElems |
| theMakeGroups | - if true and theCopy, create translated groups |
| theTargetMesh | - mesh to copy translated elements into |
References AddElement(), SMESHDS_Mesh::AddNode(), begin(), cast2Node, SMESHDS_Mesh::ChangeElementNodes(), ClearLastCreated(), SMDS_Mesh::elementsIterator(), generateGroups(), SMDS_MeshElement::GetEntityType(), SMDS_MeshVolume::GetFaceNode(), SMDS_MeshElement::GetGeomType(), SMDS_MeshNode::GetInverseElementIterator(), SMESH_Mesh::GetMeshDS(), GetMeshDS(), SMDS_MeshNode::GetXYZ(), SMESH_MeshEditor::ElemFeatures::Init(), SMESHDS_Mesh::MoveNode(), myLastCreatedElems, myLastCreatedNodes, SMDS_MeshVolume::NbFaceNodes(), SMDS_MeshVolume::NbFaces(), SMDS_MeshNode::NbInverseElements(), SMDS_MeshElement::NbNodes(), SMDS_Mesh::nodesIterator(), SMDS_MeshElement::nodesIterator(), SMDS_SpacePosition::originSpacePosition(), reverse(), SMDS_MeshCell::reverseSmdsOrder(), SMDSGeom_NONE, and SMDSGeom_POLYHEDRA.
Referenced by SMESH_MeshEditor_i::mirror(), SMESH_MeshEditor_i::rotate(), SMESH_MeshEditor_i::scale(), and SMESH_MeshEditor_i::translate().
| bool SMESH_MeshEditor::TriToQuad | ( | TIDSortedElemSet & | theElems, |
| SMESH::Controls::NumericalFunctorPtr | theCriterion, | ||
| const double | theMaxAngle | ||
| ) |
Fuse neighbour triangles into quadrangles.
| 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 measured in radians. |
References SMESHDS_Mesh::AddFace(), AddToSameGroups(), ClearLastCreated(), getAngle(), getBadRate(), GetMeshDS(), getNodesFromTwoTria(), getQuadrangleNodes(), SMDS_MeshElement::getshapeId(), SMDS_MeshElement::GetType(), myLastCreatedElems, SMDS_MeshElement::NbCornerNodes(), SMDS_MeshElement::NbNodes(), SMDS_MeshElement::nodeIterator(), SMESHDS_Mesh::RemoveElement(), SMESHDS_Mesh::RemoveNode(), SMESHDS_Mesh::SetMeshElementOnShape(), and SMDSAbs_Face.
Referenced by SMESH_MeshEditor_i::TriToQuad().
| void SMESH_MeshEditor::UpdateVolumes | ( | const SMDS_MeshNode * | theBetweenNode1, |
| const SMDS_MeshNode * | theBetweenNode2, | ||
| std::list< const SMDS_MeshNode * > & | theNodesToInsert | ||
| ) |
References SMESHDS_Mesh::AddPolyhedralVolume(), ClearLastCreated(), SMDS_VolumeTool::GetFaceNodes(), SMDS_MeshNode::GetInverseElementIterator(), GetMeshDS(), SMDS_MeshElement::getshapeId(), SMDS_VolumeTool::IsLinked(), myLastCreatedElems, SMDS_VolumeTool::NbFaceNodes(), SMDS_VolumeTool::NbFaces(), SMESHDS_Mesh::RemoveElement(), ReplaceElemInGroups(), SMESHDS_Mesh::SetMeshElementOnShape(), and SMDSAbs_Volume.
Referenced by SewFreeBorder().
|
private |
Referenced by ConvertToQuadratic().
|
private |
Referenced by AddElement(), ClearLastCreated(), Create0DElementsOnAllNodes(), DeleteDiag(), ExtrusionSweep(), generateGroups(), InsertNodesIntoLink(), MakeBoundaryMesh(), makeWalls(), Offset(), QuadTo4Tri(), QuadToTri(), RotationSweep(), SewFreeBorder(), SplitEdge(), SplitFace(), SplitVolumes(), sweepElement(), Transform(), TriToQuad(), and UpdateVolumes().
|
private |
Referenced by ClearLastCreated(), DoubleNodes(), doubleNodes(), ExtrusionSweep(), generateGroups(), Offset(), QuadTo4Tri(), QuadToTri(), RotationSweep(), SplitVolumes(), and Transform().
|
private |
Referenced by ConvertFromQuadratic(), ConvertToQuadratic(), CreateFlatElementsOnFacesGroups(), CreateHoleSkin(), DoubleNodesOnGroupBoundaries(), ExtrusionSweep(), FindCoincidentNodes(), GetHexaFacetsToSplit(), GetMeshDS(), LinkID_Gen::GetNodes(), MakeBoundaryMesh(), MergeNodes(), Offset(), and RotationSweep().