Salome HOME
IMP 10199 (add Volume Control)
[modules/smesh.git] / src / SMDS / SMDS_Mesh.hxx
index 1aa9dda929b099a928470653511f18faefdef086..612082ce47ea78b9cf49bc4571e89459098be71d 100644 (file)
 #include "SMDS_ElemIterator.hxx"
 #include <NCollection_Map.hxx>
 
+//#ifdef WNT
+//#include <SALOME_WNT.hxx>
+//#else
+//#define SALOME_WNT_EXPORT
+//#endif
+#if defined WNT && defined WIN32 && defined SMDS_EXPORTS
+#define SMDS_WNT_EXPORT __declspec( dllexport )
+#else
+#define SMDS_WNT_EXPORT
+#endif
+
 #include <boost/shared_ptr.hpp>
 #include <set>
 #include <list>
@@ -48,7 +59,7 @@ typedef boost::shared_ptr<SMDS_Iterator<const SMDS_MeshFace *> > SMDS_FaceIterat
 typedef SMDS_Iterator<const SMDS_MeshVolume *> SMDS_VolumeIterator;
 typedef boost::shared_ptr<SMDS_Iterator<const SMDS_MeshVolume *> > SMDS_VolumeIteratorPtr;
 
-class SMDS_Mesh:public SMDS_MeshObject{
+class SMDS_WNT_EXPORT SMDS_Mesh:public SMDS_MeshObject{
 public:
   
   SMDS_Mesh();
@@ -58,6 +69,8 @@ public:
   SMDS_FaceIteratorPtr facesIterator() const;
   SMDS_VolumeIteratorPtr volumesIterator() const;
   SMDS_ElemIteratorPtr elementsIterator() const;  
+  
+  SMDSAbs_ElementType GetElementType( const int id, const bool iselem ) const;
 
   SMDS_Mesh *AddSubMesh();
   
@@ -201,6 +214,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,
@@ -217,6 +252,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.
@@ -235,6 +273,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;