]> SALOME platform Git repositories - plugins/hybridplugin.git/commitdiff
Salome HOME
Regression of tests/enforced_mesh.py
authoreap <eap@opencascade.com>
Mon, 9 Apr 2018 14:21:31 +0000 (17:21 +0300)
committereap <eap@opencascade.com>
Mon, 9 Apr 2018 14:21:31 +0000 (17:21 +0300)
src/HYBRIDPlugin/HYBRIDPlugin_HYBRID.cxx

index 2f1c1f42e9af25da929d613b68084b15fa012147..be443d14ee169936d706ddeff008e594504cd48b 100644 (file)
@@ -615,20 +615,26 @@ static bool readGMFFile(MG_HYBRID_API*                          MGOutput,
               addElemInMeshGroup(theHelper->GetMesh(), aCreatedElem, aFaceGroupByHybridId[iElem], groupsToRemove);
             }
             // add element in shape for groups on geom to work
-            theMeshDS->SetMeshElementOnShape( aCreatedElem, domainID[iElem] );
-            for ( int iN = 0; iN < 3; ++iN )
-              if ( node[iN]->getshapeId() < 1 )
-                theMeshDS->SetNodeOnFace( node[iN], domainID[iElem] );
+            if ( domainID[iElem] > 0 )
+            {
+              theMeshDS->SetMeshElementOnShape( aCreatedElem, domainID[iElem] );
+              for ( int iN = 0; iN < 3; ++iN )
+                if ( node[iN]->getshapeId() < 1 )
+                  theMeshDS->SetNodeOnFace( node[iN], domainID[iElem] );
+            }
           }
           break;
         case GmfQuadrilaterals:
           if (fullyCreatedElement) {
             aCreatedElem = theHelper->AddFace( node[0], node[1], node[2], node[3], noID, force3d );
             // add element in shape for groups on geom to work
-            theMeshDS->SetMeshElementOnShape( aCreatedElem, domainID[iElem] );
-            for ( int iN = 0; iN < 3; ++iN )
-              if ( node[iN]->getshapeId() < 1 )
-                theMeshDS->SetNodeOnFace( node[iN], domainID[iElem] );
+            if ( domainID[iElem] > 0 )
+            {
+              theMeshDS->SetMeshElementOnShape( aCreatedElem, domainID[iElem] );
+              for ( int iN = 0; iN < 3; ++iN )
+                if ( node[iN]->getshapeId() < 1 )
+                  theMeshDS->SetNodeOnFace( node[iN], domainID[iElem] );
+            }
           }
           break;
         case GmfTetrahedra: