]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0021382: EDF 1985 SMESH: Read/write of .mesh files (GMF format)
authoreap <eap@opencascade.com>
Thu, 4 Oct 2012 10:41:10 +0000 (10:41 +0000)
committereap <eap@opencascade.com>
Thu, 4 Oct 2012 10:41:10 +0000 (10:41 +0000)
  Note 0014299. Fix writing groups

src/DriverGMF/DriverGMF_Write.cxx

index d65f950b525b57006dd058ad8d5691129c0d8e0f..50acafe7fab01064778db446ae8baefc641714d6 100644 (file)
@@ -294,19 +294,20 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
 
     // write the group
     GmfSetKwd( meshID, gmfKwd, nbOkElems );
+    elemIt = group->GetElements();
     if ( elem2IDMap )
-      for ( elemIt = group->GetElements(); elemIt->more(); )
+      for ( ; elemIt->more(); )
       {
         const SMDS_MeshElement* elem = elemIt->next();
         if ( elem->GetEntityType() == smdsEntity )
           GmfSetLin( meshID, gmfKwd, (*elem2IDMap)[ elem ] );
       }
     else
-      for ( elemIt = group->GetElements(); elemIt->more(); )
+      for ( int gmfID = 1; elemIt->more(); ++gmfID)
       {
         const SMDS_MeshElement* elem = elemIt->next();
         if ( elem->GetEntityType() == smdsEntity )
-          GmfSetLin( meshID, gmfKwd, elem->GetID() );
+          GmfSetLin( meshID, gmfKwd, gmfID );
       }
 
   } // loop on groups