From f33734eda126fe9024956a5dcf2f7cc33ea93e38 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 19 May 2009 15:31:06 +0000 Subject: [PATCH] 0020279: [CEA 334] control the "random" use when using mesh algorithms fix GetHypothesisList() for mesh w/o shape --- src/SMESH_I/SMESH_Mesh_i.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 );