]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix for the break-link dump into python: also sub-mesh references must be updated.
authormpv <mpv@opencascade.com>
Thu, 13 Feb 2020 16:09:53 +0000 (19:09 +0300)
committermpv <mpv@opencascade.com>
Thu, 13 Feb 2020 16:09:53 +0000 (19:09 +0300)
src/SMESH_I/SMESH_Mesh_i.cxx

index dff142a6a4b7e48337de5644b698a4aac7cb0a99..04e0371bc953e94c1595f6badd1be3c982a3f1d3 100644 (file)
@@ -284,7 +284,11 @@ void SMESH_Mesh_i::ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom)
     }
   }
 
-  TPythonDump() <<  SMESH::SMESH_Mesh_var(_this()) << ".ReplaceShape( " << theNewGeom->GetStudyEntry() << " )";
+  TPythonDump() <<  SMESH::SMESH_Mesh_var(_this()) << ".ReplaceShape( "
+    << theNewGeom->GetStudyEntry() << " )";
+
+  TPythonDump() << "SHAPERSTUDY.breakLinkForSubElements(salome.ObjectToSObject("
+    << SMESH::SMESH_Mesh_var(_this()) <<".GetMesh()), " << theNewGeom->GetStudyEntry() << ")";
 }
 
 //================================================================================
@@ -2288,7 +2292,9 @@ void SMESH_Mesh_i::CheckGeomModif( bool isBreakLink )
   if ( _preMeshInfo )
     _preMeshInfo->ForgetAllData();
 
-  //_impl->Clear();
+  
+  if (isBreakLink)
+    _impl->Clear();
   TopoDS_Shape newShape = _gen_i->GeomObjectToShape( mainGO );
   if ( newShape.IsNull() )
     return;