Salome HOME
IsDimSupported method added
[modules/smesh.git] / src / SMDS / SMDS_Mesh.hxx
index cdcc9166b011e593385bb5f59de16f2677ff4d28..9d59a3ddff3c0360510ef3651b5504dfd847e34d 100644 (file)
@@ -32,7 +32,8 @@
 #include "SMDS_MeshFace.hxx"
 #include "SMDS_MeshVolume.hxx"
 #include "SMDS_MeshElementIDFactory.hxx"
-#include "SMDS_Iterator.hxx"
+#include "SMDS_ElemIterator.hxx"
+#include <NCollection_Map.hxx>
 
 #include <boost/shared_ptr.hpp>
 #include <set>
@@ -200,6 +201,28 @@ public:
                                      const SMDS_MeshFace * f5,
                                      const SMDS_MeshFace * f6);
 
+  virtual SMDS_MeshFace* AddPolygonalFaceWithID (std::vector<int> nodes_ids,
+                                                 const int        ID);
+
+  virtual SMDS_MeshFace* AddPolygonalFaceWithID (std::vector<const SMDS_MeshNode*> nodes,
+                                                 const int                         ID);
+
+  virtual SMDS_MeshFace* AddPolygonalFace (std::vector<const SMDS_MeshNode*> nodes);
+
+  virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
+                           (std::vector<int> nodes_ids,
+                            std::vector<int> quantities,
+                            const int        ID);
+
+  virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
+                           (std::vector<const SMDS_MeshNode*> nodes,
+                            std::vector<int>                  quantities,
+                            const int                         ID);
+
+  virtual SMDS_MeshVolume* AddPolyhedralVolume
+                           (std::vector<const SMDS_MeshNode*> nodes,
+                            std::vector<int>                  quantities);
+
   virtual void RemoveElement(const SMDS_MeshElement *        elem,
                              std::list<const SMDS_MeshElement *>& removedElems,
                              std::list<const SMDS_MeshElement *>& removedNodes,
@@ -216,6 +239,9 @@ public:
   static bool ChangeElementNodes(const SMDS_MeshElement * elem,
                                  const SMDS_MeshNode    * nodes[],
                                  const int                nbnodes);
+  static bool ChangePolyhedronNodes(const SMDS_MeshElement * elem,
+                                    std::vector<const SMDS_MeshNode*> nodes,
+                                    std::vector<int>                  quantities);
 
   virtual void Renumber (const bool isNodes, const int startID = 1, const int deltaID = 1);
   // Renumber all nodes or elements.
@@ -234,6 +260,10 @@ public:
                                        const SMDS_MeshNode *n2,
                                        const SMDS_MeshNode *n3,
                                        const SMDS_MeshNode *n4);
+
+  const SMDS_MeshFace *FindFace(std::vector<int> nodes_ids) const;
+  static const SMDS_MeshFace* FindFace(std::vector<const SMDS_MeshNode *> nodes);
+
   int MaxNodeID() const;
   int MinNodeID() const;
   int MaxElementID() const;
@@ -268,10 +298,10 @@ public:
    */
   bool Contains (const SMDS_MeshElement* elem) const;
 
-  typedef std::set<SMDS_MeshNode *> SetOfNodes;
-  typedef std::set<SMDS_MeshEdge *> SetOfEdges;
-  typedef std::set<SMDS_MeshFace *> SetOfFaces;
-  typedef std::set<SMDS_MeshVolume *> SetOfVolumes;
+  typedef NCollection_Map<SMDS_MeshNode *> SetOfNodes;
+  typedef NCollection_Map<SMDS_MeshEdge *> SetOfEdges;
+  typedef NCollection_Map<SMDS_MeshFace *> SetOfFaces;
+  typedef NCollection_Map<SMDS_MeshVolume *> SetOfVolumes;
 
 private:
   SMDS_Mesh(SMDS_Mesh * parent);