From: eap Date: Thu, 9 Jun 2005 06:18:26 +0000 (+0000) Subject: PAL9022. bind generated mesh elements to the outer shell X-Git-Tag: T2_2_4a3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9444bcd7723bff552accb9febf4ac838c5f08a51;p=plugins%2Fnetgenplugin.git PAL9022. bind generated mesh elements to the outer shell --- diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx index db0c493..5c53064 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx @@ -19,6 +19,7 @@ using namespace std; #include "SMDS_MeshNode.hxx" #include +#include #include "utilities.h" @@ -127,9 +128,14 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, // get a shell from aShape TopoDS_Shell aShell; - TopExp_Explorer exp(aShape,TopAbs_SHELL); - if ( exp.More() ) - aShell = TopoDS::Shell(exp.Current()); + if ( aShape.ShapeType() == TopAbs_SOLID ) { + aShell = BRepTools::OuterShell( TopoDS::Solid( aShape )); + } + else { + TopExp_Explorer exp(aShape,TopAbs_SHELL); + if ( exp.More() ) + aShell = TopoDS::Shell(exp.Current()); + } if ( aShell.IsNull() || !aMesh.GetSubMesh( aShell )) { INFOS( "NETGENPlugin_NETGEN_3D::Compute(), bad shape");