Salome HOME
Copyright update 2020
[modules/hexablock.git] / src / HEXABLOCK / HexDocument.hxx
old mode 100755 (executable)
new mode 100644 (file)
index 991de22..1f9e49e
@@ -1,12 +1,12 @@
 
 // class : Document
 
-// Copyright (C) 2009-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2009-2020  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
@@ -26,6 +26,8 @@
 #include "Hex_defines.hxx"
 #include "HexEltBase.hxx"
 
+#include <algorithm>
+
 #ifdef WIN32
  #ifdef max
   #undef max
@@ -37,7 +39,7 @@ BEGIN_NAMESPACE_HEXA
 
 class NewShape;
 
-class HEXABLOCKENGINE_EXPORT Document : public EltBase
+class HexaExport Document : public EltBase
 {
                                    // Fonctions utilisateur
 public :
@@ -107,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);
@@ -156,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);
@@ -301,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 ();
 
@@ -328,8 +343,8 @@ public:
     void  reorderQuads ();
 
    // --------------------------------------------------- Evols Hexa5
-   cpchar getNextName (EnumElt type, string& name);
-   string getNextName (EnumElt type);
+   cpchar getNextName (EnumElt type, std::string& name);
+   std::string getNextName (EnumElt type);
 
    virtual char* makeVarName (char* name);
    void    lockDump();