]> SALOME platform Git repositories - plugins/hybridplugin.git/commitdiff
Salome HOME
Merge remote-tracking branch 'origin/cbr/fix_hybrid_tests'
authorrnv <rnv@opencascade.com>
Tue, 10 Apr 2018 11:02:44 +0000 (14:02 +0300)
committerrnv <rnv@opencascade.com>
Tue, 10 Apr 2018 11:02:44 +0000 (14:02 +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: