0021408: EDf 2006 SMESH: USe of DoubleNodesOnGroupBoundaries on 2D leads to crash

In DoubleNodesOnGroupBoundaries(), throw in case of not volume group
This commit is contained in:
eap 2011-11-01 14:07:50 +00:00
parent 6e09f8b4ce
commit eea7a3b824
2 changed files with 6 additions and 2 deletions

View File

@ -5673,6 +5673,7 @@ CORBA::Boolean SMESH_MeshEditor_i::Make2DMeshFrom3D()
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& theDomains,
CORBA::Boolean createJointElems )
throw (SALOME::SALOME_Exception)
{
initData();
@ -5686,8 +5687,10 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodesOnGroupBoundaries( const SMESH::Li
for ( int i = 0, n = theDomains.length(); i < n; i++ )
{
SMESH::SMESH_GroupBase_var aGrp = theDomains[ i ];
if ( !CORBA::is_nil( aGrp ) && ( aGrp->GetType() != SMESH::NODE ) )
if ( !CORBA::is_nil( aGrp ) /*&& ( aGrp->GetType() != SMESH::NODE )*/ )
{
if ( aGrp->GetType() != SMESH::VOLUME )
THROW_SALOME_CORBA_EXCEPTION("Not a volume group", SALOME::BAD_PARAM);
TIDSortedElemSet domain;
domain.clear();
domains.push_back(domain);

View File

@ -713,7 +713,8 @@ public:
* @return TRUE if operation has been completed successfully, FALSE otherwise
*/
CORBA::Boolean DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& theDomains,
CORBA::Boolean createJointElems );
CORBA::Boolean createJointElems )
throw (SALOME::SALOME_Exception);
/*!
* \brief Double nodes on some external faces and create flat elements.
* Flat elements are mainly used by some types of mechanic calculations.