From: eap Date: Tue, 19 May 2009 15:31:06 +0000 (+0000) Subject: 0020279: [CEA 334] control the "random" use when using mesh algorithms X-Git-Tag: V5_1_2rc1~30 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=f33734eda126fe9024956a5dcf2f7cc33ea93e38 0020279: [CEA 334] control the "random" use when using mesh algorithms fix GetHypothesisList() for mesh w/o shape --- diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index f4a7000d3..dffb7c5a0 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -568,7 +568,7 @@ throw(SALOME::SALOME_Exception) { Unexpect aCatch(SALOME_SalomeException); if (MYDEBUG) MESSAGE("GetHypothesisList"); - if (CORBA::is_nil(aSubShapeObject)) + if (_impl->HasShapeToMesh() && CORBA::is_nil(aSubShapeObject)) THROW_SALOME_CORBA_EXCEPTION("bad subShape reference", SALOME::BAD_PARAM); @@ -576,6 +576,8 @@ throw(SALOME::SALOME_Exception) try { TopoDS_Shape myLocSubShape = _gen_i->GeomObjectToShape(aSubShapeObject); + if ( myLocSubShape.IsNull() && !_impl->HasShapeToMesh() ) + myLocSubShape = _impl->GetShapeToMesh(); const list& aLocalList = _impl->GetHypothesisList( myLocSubShape ); int i = 0, n = aLocalList.size(); aList->length( n );