PAL9022. bind generated mesh elements to the outer shell

This commit is contained in:
eap 2005-06-09 06:18:26 +00:00
parent 736d1dd130
commit 9444bcd772

View File

@ -19,6 +19,7 @@ using namespace std;
#include "SMDS_MeshNode.hxx"
#include <TopExp.hxx>
#include <BRepTools.hxx>
#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");