From: eap Date: Thu, 10 Oct 2013 10:28:16 +0000 (+0000) Subject: Pb: nothing is generated on several-solids shape if there is a X-Git-Tag: V7_3_0a1~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8d75206ca6250c6df16487bafd19e1342f97fa9c;p=plugins%2Fnetgenplugin.git Pb: nothing is generated on several-solids shape if there is a sub-mesh on an empty geom group. --- diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index 86736d5..8c95376 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -518,8 +518,9 @@ void NETGENPlugin_Mesher::PrepareOCCgeometry(netgen::OCCGeometry& occgeo, // get root submeshes list< SMESH_subMesh* > rootSM; - if ( SMESH_subMesh* sm = mesh.GetSubMeshContaining( shape )) { - rootSM.push_back( sm ); + const int shapeID = mesh.GetMeshDS()->ShapeToIndex( shape ); + if ( shapeID > 0 ) { // SMESH_subMesh with ID 0 may exist, don't use it! + rootSM.push_back( mesh.GetSubMesh( shape )); } else { for ( TopoDS_Iterator it( shape ); it.More(); it.Next() ) @@ -2968,6 +2969,8 @@ double NETGENPlugin_Mesher::GetProgress(const SMESH_Algo* holder, { ((int&) _progressTic ) = *algoProgressTic + 1; + if ( !_occgeom ) return 0; + double progress = -1; if ( !_isVolume ) {