]> 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>
Tue, 19 May 2009 15:31:06 +0000 (15:31 +0000)
committereap <eap@opencascade.com>
Tue, 19 May 2009 15:31:06 +0000 (15:31 +0000)
   fix GetHypothesisList() for mesh w/o shape

src/SMESH_I/SMESH_Mesh_i.cxx

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