From 09e4b589830931f8a2cc4a93b5cd0696fa665dcb Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 13 Feb 2020 19:09:53 +0300 Subject: [PATCH] Fix for the break-link dump into python: also sub-mesh references must be updated. --- src/SMESH_I/SMESH_Mesh_i.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index dff142a6a..04e0371bc 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -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; -- 2.39.2