From: eap Date: Thu, 4 Oct 2012 10:41:10 +0000 (+0000) Subject: 0021382: EDF 1985 SMESH: Read/write of .mesh files (GMF format) X-Git-Tag: V6_6_0a1~61 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=abc9568eca56fba6e26a4152207690763db0c7a8;p=modules%2Fsmesh.git 0021382: EDF 1985 SMESH: Read/write of .mesh files (GMF format) Note 0014299. Fix writing groups --- diff --git a/src/DriverGMF/DriverGMF_Write.cxx b/src/DriverGMF/DriverGMF_Write.cxx index d65f950b5..50acafe7f 100644 --- a/src/DriverGMF/DriverGMF_Write.cxx +++ b/src/DriverGMF/DriverGMF_Write.cxx @@ -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