From 9444bcd7723bff552accb9febf4ac838c5f08a51 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 9 Jun 2005 06:18:26 +0000 Subject: [PATCH] PAL9022. bind generated mesh elements to the outer shell --- src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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"); -- 2.39.2