#include "SMDS_MeshNode.hxx"
#include <TopExp.hxx>
+#include <BRepTools.hxx>
#include "utilities.h"
// 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");