]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0020279: [CEA 334] control the "random" use when using mesh algorithms
authoreap <eap@opencascade.com>
Wed, 20 May 2009 15:40:00 +0000 (15:40 +0000)
committereap <eap@opencascade.com>
Wed, 20 May 2009 15:40:00 +0000 (15:40 +0000)
   fix GetHypothesisList() for mesh w/o shape

src/SMESH_I/SMESH_Mesh_i.cxx

index e56289ca707a0e9bf200fc28b17a670722aeb3c9..7c9b8b2806367f4054155f18dd96be043ed673c2 100644 (file)
@@ -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<const SMESHDS_Hypothesis*>& aLocalList = _impl->GetHypothesisList( myLocSubShape );
     int i = 0, n = aLocalList.size();
     aList->length( n );