]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix for bugs N7PAL16232, N7PAL16233.
authormzn <mzn@opencascade.com>
Mon, 18 Jun 2007 12:27:04 +0000 (12:27 +0000)
committermzn <mzn@opencascade.com>
Mon, 18 Jun 2007 12:27:04 +0000 (12:27 +0000)
src/SMESH_I/SMESH_subMesh_i.cxx

index 4f310734b1324d48b52be7215a16bf663376a8c8..d4e52582190150718423e78e03f9c95b1d8179e6 100644 (file)
@@ -458,8 +458,14 @@ GEOM::GEOM_Object_ptr SMESH_subMesh_i::GetSubShape()
   try {
     if ( _mesh_i->_mapSubMesh.find( _localId ) != _mesh_i->_mapSubMesh.end()) {
       TopoDS_Shape S = _mesh_i->_mapSubMesh[ _localId ]->GetSubShape();
-      if ( !S.IsNull() )
+      if ( !S.IsNull() ) {
         aShapeObj = _gen_i->ShapeToGeomObject( S );
+       //mzn: N7PAL16232, N7PAL16233
+       //In some cases it's possible that GEOM_Client contains the shape same to S, but
+       //with another orientation.
+       if (aShapeObj->_is_nil())
+         aShapeObj = _gen_i->ShapeToGeomObject( S.Reversed() );
+      }
     }
   }
   catch(SALOME_Exception & S_ex) {