From: eap Date: Wed, 20 May 2009 15:40:00 +0000 (+0000) Subject: 0020279: [CEA 334] control the "random" use when using mesh algorithms X-Git-Tag: V4_1_0_maintainance_FINAL~82 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1a11a9fbccdb2943fa6f9b897043efab04b88081;p=modules%2Fsmesh.git 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 e56289ca7..7c9b8b280 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -549,7 +549,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); @@ -557,6 +557,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 );