Salome HOME
Merge remote-tracking branch 'origin/cbr/fix_import_gmf_pyramids_orientation'
[modules/smesh.git] / src / SMESH_I / SMESH_2smeshpy.cxx
index e6a75758389dc35bd44de7de90fc6a5c63fa449c..d5dadd0e1a15447ff2fa4633c9b3b19adf8be59f 100644 (file)
@@ -292,6 +292,8 @@ namespace {
     //   - FT_ConnectedElements     = 39
     // v 7.6.0: FT_Undefined == 47, new items:
     //   - FT_BelongToMeshGroup     = 22
+    // v 8.1.0: FT_Undefined == 48, new items:
+    //   - FT_NodeConnectivityNumber= 22
     //
     // It's necessary to continue recording this history and to fill
     // undef2newItems (see below) accordingly.
@@ -313,6 +315,7 @@ namespace {
       undef2newItems[ 45 ].push_back( 36 );
       undef2newItems[ 46 ].push_back( 39 );
       undef2newItems[ 47 ].push_back( 22 );
+      undef2newItems[ 48 ].push_back( 22 );
 
       ASSERT( undef2newItems.rbegin()->first == SMESH::FT_Undefined );
     }
@@ -903,7 +906,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
           Threshold = SMESH + types[ iGeom ];
 #ifdef _DEBUG_
         // is types complete? (compilation failure mains that enum GeometryType changed)
-        int _assert[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 1 : -1 ]; _assert[0]=1;
+        int _asrt[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 2 : -1 ]; _asrt[0]=_asrt[1];
 #endif
       }
       if (Type == "SMESH.FT_EntityType")
@@ -922,8 +925,8 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
         if ( -1 < iGeom && iGeom < nbTypes )
           Threshold = SMESH + types[ iGeom ];
 #ifdef _DEBUG_
-        // is types complete? (compilation failure mains that enum EntityType changed)
-        int _assert[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 1 : -1 ]; _assert[0]=1;
+        // is 'types' complete? (compilation failure mains that enum EntityType changed)
+        int _asrt[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 2 : -1 ]; _asrt[0]=_asrt[1];
 #endif
       }
     }
@@ -1564,7 +1567,7 @@ void _pyGen::CheckObjectIsReCreated( Handle(_pyObject)& theObj )
   const bool isHyp = theObj->IsKind( STANDARD_TYPE( _pyHypothesis ));
   Handle(_pyObject) existing;
   if( isHyp )
-    existing = Handle(_pyObject)::DownCast( FindHyp( theObj->GetID() ) );
+    existing = FindHyp( theObj->GetID() );
   else
     existing = FindObject( theObj->GetID() );
   if ( !existing.IsNull() && existing != theObj )
@@ -1622,9 +1625,10 @@ Handle(_pyObject) _pyGen::FindObject( const _pyID& theObjID )  const
       return id_obj->second;
   }
   {
-    map< _pyID, Handle(_pyMesh) >::const_iterator id_obj = myMeshes.find( theObjID );
+    _pyGen* me = const_cast< _pyGen* >( this );
+    map< _pyID, Handle(_pyMesh) >::iterator id_obj = me->myMeshes.find( theObjID );
     if ( id_obj != myMeshes.end() )
-      return Handle(_pyObject)::DownCast( id_obj->second );
+      return id_obj->second;
   }
   // {
   //   map< _pyID, Handle(_pyMeshEditor) >::const_iterator id_obj = myMeshEditors.find( theObjID );