From: skv Date: Thu, 12 Dec 2013 11:24:04 +0000 (+0000) Subject: 21939: Issue a warning dialog if the result of MakeShell is a compound of faces X-Git-Tag: V7_3_0~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6fa43b8d27b5badf74f2914f4fa74a9c97e77446;p=modules%2Fgeom.git 21939: Issue a warning dialog if the result of MakeShell is a compound of faces --- diff --git a/src/BuildGUI/BuildGUI_ShellDlg.cxx b/src/BuildGUI/BuildGUI_ShellDlg.cxx index e4b12199c..37b892930 100644 --- a/src/BuildGUI/BuildGUI_ShellDlg.cxx +++ b/src/BuildGUI/BuildGUI_ShellDlg.cxx @@ -32,6 +32,7 @@ #include +#include #include #include #include @@ -260,8 +261,17 @@ bool BuildGUI_ShellDlg::execute( ObjectList& objects ) GEOM::GEOM_Object_var anObj = anOper->MakeShell( objlist.in() ); - if ( !anObj->_is_nil() ) + if ( !anObj->_is_nil() ) { + TopoDS_Shape aShell; + GEOMBase::GetShape(anObj, aShell, TopAbs_SHELL); + + if (aShell.IsNull()) { + SUIT_MessageBox::warning(this, + QObject::tr("GEOM_WRN_WARNING"), + QObject::tr("GEOM_WRN_FACES_NOT_SHELL")); + } objects.push_back( anObj._retn() ); + } return true; } diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index ec1445ed5..add4553bd 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -2316,6 +2316,10 @@ Please, select face, shell or solid and try again GEOM_WRN_WARNING Warning + + GEOM_WRN_FACES_NOT_SHELL + Unable to create a shell. Result is a compound of faces. + WRN_SHAPE_UNCLOSED Unable to create solid from unclosed shape %1