Salome HOME
Updated copyright comment
[modules/hexablock.git] / src / HEXABLOCKGUI / HEXABLOCKGUI_DocumentModel.cxx
index 60b97c1334446406a722a75dadbea2e9b93dc755..5bb58234aa1c47f2e0349d32b90a9f46e00ef35e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2009-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2009-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -613,7 +613,7 @@ void DocumentModel::fillGeometry()
             shapeById[shapeName+","+QString::number(node->getIdent())] = node;
 
             // * update the compound of vertices
-            if (shape->getOrigin() == HEXA_NS::SH_CLOUD && !vertexCompound.IsNull())
+            if (shape->getOrigin() == HEXA_NS::SH_CLOUD && !vertexCompound.IsNull() && !node->getShape().IsNull())
                 compoundBuilder.Add(topo_shapes[shapeName], node->getShape());
         }
 
@@ -2944,7 +2944,9 @@ QModelIndex DocumentModel::joinQuadUni(QModelIndex&  istart, QModelIndex& idest,
     HEXA_NS::Vertex* hv3 = getHexaPtr<HEXA_NS::Vertex*>(iv3);
     HEXA_NS::Vertex* hv4 = getHexaPtr<HEXA_NS::Vertex*>(iv4);
 
-    HEXA_NS::Elements* helts = _hexaDocument->joinQuadUni(hstart, hdest, hv1, hv2, hv3, hv4, nb);
+    // Be careful, the order of vertices is not the same in joinQuadUni of HexDocument_v6.cxx
+    // and corresponding python dump
+    HEXA_NS::Elements* helts = _hexaDocument->joinQuadUni(hstart, hdest, hv1, hv3, hv2, hv4, nb);
     if (BadElement(helts))
         return result;
 
@@ -2965,7 +2967,9 @@ QModelIndex DocumentModel::joinQuad(QModelIndex&  istart, QModelIndex& idest, QM
     HEXA_NS::Vertex* hva2 = getHexaPtr<HEXA_NS::Vertex*>(iva2);
     HEXA_NS::Vertex* hvb2 = getHexaPtr<HEXA_NS::Vertex*>(ivb2);
 
-    HEXA_NS::Elements* helts = _hexaDocument->joinQuad(hstart, hdest, hva1, hvb1, hva2, hvb2, tlen);
+    // Be careful, the order of vertices is not the same in joinQuadUni of HexDocument_v6.cxx
+    // and corresponding python dump
+    HEXA_NS::Elements* helts = _hexaDocument->joinQuad(hstart, hdest, hva1, hva2, hvb1, hvb2, tlen);
     if (BadElement(helts))
         return result;
 
@@ -2990,7 +2994,9 @@ QModelIndex DocumentModel::joinQuadsUni(QModelIndexList& istarts, QModelIndex& i
     HEXA_NS::Vertex* hv3 = getHexaPtr<HEXA_NS::Vertex*>(iv3);
     HEXA_NS::Vertex* hv4 = getHexaPtr<HEXA_NS::Vertex*>(iv4);
 
-    HEXA_NS::Elements* helts = _hexaDocument->joinQuadsUni(hstarts, hdest, hv1, hv2, hv3, hv4, nb);
+    // Be careful, the order of vertices is not the same in joinQuadUni of HexDocument_v6.cxx
+    // and corresponding python dump
+    HEXA_NS::Elements* helts = _hexaDocument->joinQuadsUni(hstarts, hdest, hv1, hv3, hv2, hv4, nb);
     if (BadElement(helts))
         return result;
 
@@ -3015,7 +3021,9 @@ QModelIndex DocumentModel::joinQuads(QModelIndexList& istarts, QModelIndex& ides
     HEXA_NS::Vertex* hva2 = getHexaPtr<HEXA_NS::Vertex*>(iva2);
     HEXA_NS::Vertex* hvb2 = getHexaPtr<HEXA_NS::Vertex*>(ivb2);
 
-    HEXA_NS::Elements* helts = _hexaDocument->joinQuads(hstarts, hdest, hva1, hvb1, hva2, hvb2, tlen);
+    // Be careful, the order of vertices is not the same in joinQuadUni of HexDocument_v6.cxx
+    // and corresponding python dump
+    HEXA_NS::Elements* helts = _hexaDocument->joinQuads(hstarts, hdest, hva1, hva2, hvb1, hvb2, tlen);
     if (BadElement(helts))
         return result;