From: eap Date: Thu, 3 Feb 2011 14:50:27 +0000 (+0000) Subject: Regression of SMESH_TEST/Grids/smesh/2D_mesh_NETGEN/B6 where some X-Git-Tag: Start_BR_19998_21191~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FBR_NETGEN_4_9_13;p=plugins%2Fnetgenplugin.git Regression of SMESH_TEST/Grids/smesh/2D_mesh_NETGEN/B6 where some EDGEs and VERTEXes ramain not meshed since equal EDGEs and VERTEXes exist and netgen makes a sewn mesh on a not sewn geometry --- diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index a431ad1..f47a979 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -1965,12 +1965,17 @@ bool NETGENPlugin_Mesher::Compute() if ( !comment.empty() ) error->myComment = comment; - // SetIsAlwaysComputed( true ) to sub-meshes of degenerated EDGEs - TopLoc_Location loc; double f,l; - for (int i = 1; i <= occgeo.emap.Extent(); i++) - if ( BRep_Tool::Curve(TopoDS::Edge( occgeo.emap( i )), loc, f,l).IsNull() ) - if ( SMESH_subMesh* sm = _mesh->GetSubMeshContaining( occgeo.emap( i ))) - sm->SetIsAlwaysComputed( true ); + // SetIsAlwaysComputed( true ) to empty sub-meshes, which + // appear if the geometry contains coincident sub-shape due + // to bool merge_solids = 1; in netgen/libsrc/occ/occgenmesh.cpp + const int nbMaps = 2; + const TopTools_IndexedMapOfShape* geoMaps[nbMaps] = + { & occgeo.vmap, & occgeo.emap/*, & occgeo.fmap*/ }; + for ( int iMap = 0; iMap < nbMaps; ++iMap ) + for (int i = 1; i <= geoMaps[iMap]->Extent(); i++) + if ( SMESH_subMesh* sm = _mesh->GetSubMeshContaining( geoMaps[iMap]->FindKey(i))) + if ( !sm->IsMeshComputed() ) + sm->SetIsAlwaysComputed( true ); // set bad compute error to subshapes of all failed subshapes shapes if ( !error->IsOK() && err )