From: mpv Date: Thu, 13 Feb 2020 16:09:53 +0000 (+0300) Subject: Fix for the break-link dump into python: also sub-mesh references must be updated. X-Git-Tag: V9_5_0a1~5^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=09e4b589830931f8a2cc4a93b5cd0696fa665dcb;p=modules%2Fsmesh.git Fix for the break-link dump into python: also sub-mesh references must be updated. --- 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;