Salome HOME
Switch development flag to 1
[modules/hexablock.git] / src / HEXABLOCK / HexDocument_quads.cxx
index 746d4a484e7fb5cb8d1fa207f6131d2584d2dbf8..86f595407e9e7719f6c08c3713a2f12ba3e79a0b 100755 (executable)
@@ -1,12 +1,12 @@
 
 // C++ : Classe Document : Methodes internes 2011
 
-// 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
@@ -598,27 +598,24 @@ Elements* Document::replaceHexa (Quads pattern, Vertex* p1, Vertex* c1,
    DumpStart ("replaceHexa", pattern << p1 << c1 << p2 << c2 << p3 << c3);
 
    Elements* t_hexas = new Elements (this);
-   int ier = t_hexas->replaceHexas (pattern, p1, c1, p2, c2, p3, c3);
-   if (ier!=HOK)
-      {
-      Mess << " **** Error in Document::replace" ;
-      t_hexas->setError (ier);
-      }
+   Mess << " **** This syntax is deprecated" ;
+   t_hexas->setError (HERR);
 
    DumpReturn (t_hexas);
    return      t_hexas;
 }
-// ========================================================= repla
-Elements* Document::replace (Quads motif, Quads cible, Vertex* p1, Vertex* c1,                               Vertex* p2, Vertex* c2)
+// ========================================================= replace
+Elements* Document::replace (Quads motif, Quads cible, Vertex* p1, Vertex* c1,                             Vertex* p2, Vertex* c2)
 {
    DumpStart ("replace", motif << cible << p1 << c1 << p2 << c2);
 
    Elements* t_hexas = new Elements (this);
+   int ier = t_hexas->replaceHexas (motif, cible, p1, c1, p2, c2);
 
-   //if (BadElement (edge))
+   if (ier!=HOK)
       {
+      Mess << " **** Error in Document::replace" ;
       t_hexas->setError (HERR);
-      Mess << "This function is not yet implemented";
       }
 
    DumpReturn (t_hexas);