Salome HOME
Switch development flag to 1
[modules/hexablock.git] / src / HEXABLOCK / HexDocument.hxx
index dacddc6eede2a4e3488879bbbdc8bae98591f41c..afd9e0643f6e217c491c7562bb4d36e8efe2cdf7 100755 (executable)
@@ -1,12 +1,12 @@
 
 // class : Document
 
-// Copyright (C) 2009-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2009-2016  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #ifndef __DOCUMENT_H_
 #define __DOCUMENT_H_
 
+#include "Hex_defines.hxx"
 #include "HexEltBase.hxx"
 
+#include <algorithm>
+
+#ifdef WIN32
+ #ifdef max
+  #undef max
+#endif
+#endif
+
 
 BEGIN_NAMESPACE_HEXA
 
-class HexaExport NewShape;
+class NewShape;
 
-class Document : public EltBase
+class HexaExport Document : public EltBase
 {
                                    // Fonctions utilisateur
 public :
@@ -100,8 +109,8 @@ public :
    Elements* disconnectVertex (Hexa* maille, Vertex* noeud);
    Elements* disconnectEdges  (Hexas thexas, Edges   edges);
 
-   Elements* replace (Quads pattern, Vertex* p1, Vertex* c1,
-                      Vertex* p2, Vertex* c2,  Vertex* p3, Vertex* c3);
+   Elements* replace (Quads pattern, Quads cible, Vertex* p1, Vertex* c1,
+                                                  Vertex* p2, Vertex* c2);
 
    int     mergeVertices (Vertex* v1, Vertex* v2);
    int     mergeEdges    (Edge* e1, Edge* e2, Vertex* v1, Vertex* v2);
@@ -149,6 +158,7 @@ public :
    Group*       getGroup    (int nro);
    Law*         getLaw      (int nro);
    Propagation* getPropagation   (int nro);
+   cpchar       getFirstExplicitShape();
 
                                  // ----------------- find
    Vertex* findVertex (double  vx, double  vy, double vz);
@@ -294,6 +304,18 @@ public :
    void clearAssoEdges   ();
    void clearAssoQuads   ();
 
+                               // PERIMES
+   Elements* replaceHexa (Quads pattern, Vertex* p1, Vertex* c1, Vertex* p2,
+                          Vertex* c2,  Vertex* p3, Vertex* c3);
+   Elements* replace (Quads pattern, Vertex* p1, Vertex* c1, Vertex* p2,
+                      Vertex* c2,  Vertex* p3, Vertex* c3)
+   { return  replaceHexa (pattern, p1, c1, p2, c2, p3, c3);  }
+
+   Elements* replaceHexas (Quads pattern, Quads cible, Vertex* p1, Vertex* c1,
+                           Vertex* p2, Vertex* c2, Vertex* p3, Vertex* c3)
+   { return  replace (pattern, cible, p1, c1, p2, c2); }
+
+
 public:
    ~Document ();