#include <list>
#include <map>
-typedef map<const SMDS_MeshElement*,
- list<const SMDS_MeshElement*> > TElemOfElemListMap;
-typedef map<const SMDS_MeshNode*, const SMDS_MeshNode*> TNodeNodeMap;
-
-typedef map<const SMDS_MeshNode*, SMESHDS_SubMesh*> RemoveQuadNodeMap;
-typedef map<const SMDS_MeshNode*, SMESHDS_SubMesh*>::iterator ItRemoveQuadNodeMap;
+typedef std::map<const SMDS_MeshElement*,
+ std::list<const SMDS_MeshElement*> > TElemOfElemListMap;
+typedef std::map<const SMDS_MeshNode*, const SMDS_MeshNode*> TNodeNodeMap;
class SMDS_MeshFace;
class SMDS_MeshNode;
*/
// ============================================================
-template < class TMeshElem >
+template < class TMeshElem = SMDS_MeshElement>
struct TIDCompare {
bool operator () (const TMeshElem* e1, const TMeshElem* e2) const
{ return e1->GetID() < e2->GetID(); }
SMESH_MeshEditor( SMESH_Mesh* theMesh );
+ /*!
+ * \brief Add element
+ */
+ SMDS_MeshElement* AddElement(const std::vector<const SMDS_MeshNode*> & nodes,
+ const SMDSAbs_ElementType type,
+ const bool isPoly,
+ const int ID = 0);
+ /*!
+ * \brief Add element
+ */
+ SMDS_MeshElement* AddElement(const std::vector<int> & nodeIDs,
+ const SMDSAbs_ElementType type,
+ const bool isPoly,
+ const int ID = 0);
+
bool Remove (const std::list< int >& theElemIDs, const bool isNodes);
// Remove a node or an element.
// Modify a compute state of sub-meshes which become empty
const gp_Ax1& theAxis,
const double theAngle,
const int theNbSteps,
- const double theToler);
+ const double theToler,
+ const bool theMakeWalls=true);
// Generate new elements by rotation of theElements around theAxis
// by theAngle by theNbSteps
SMESHDS_Mesh * GetMeshDS() { return myMesh->GetMeshDS(); }
- SMESH_SequenceOfElemPtr GetLastCreatedNodes() { return myLastCreatedNodes; }
+ const SMESH_SequenceOfElemPtr& GetLastCreatedNodes() const { return myLastCreatedNodes; }
- SMESH_SequenceOfElemPtr GetLastCreatedElems() { return myLastCreatedElems; }
+ const SMESH_SequenceOfElemPtr& GetLastCreatedElems() const { return myLastCreatedElems; }
private:
- void ConvertElemToQuadratic(SMESHDS_SubMesh *theSm,
- SMESH_MesherHelper* theHelper,
- const bool theForce3d);
+ void ConvertElemToQuadratic(SMESHDS_SubMesh * theSm,
+ SMESH_MesherHelper& theHelper,
+ const bool theForce3d);
//Auxiliary function for "ConvertToQuadratic" is intended to convert
//elements contained in submesh to quadratic
- void RemoveQuadElem( SMESHDS_SubMesh *theSm,
+ void RemoveQuadElem( SMESHDS_SubMesh * theSm,
SMDS_ElemIteratorPtr theItr,
- RemoveQuadNodeMap& theRemoveNodeMap);
+ const int theShapeID);
//Auxiliary function for "ConvertFromQuadratic" is intended to convert quadratic
//element to ordinary and for removing quadratic nodes