From: eap Date: Wed, 15 Jan 2020 13:13:38 +0000 (+0300) Subject: Fix SMESH_Mesh_i::ReplaceShape() X-Git-Tag: V9_5_0a1~5^2~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8df5094ecdbb94c1f048e09082f81a7c672d77cb;p=modules%2Fsmesh.git Fix SMESH_Mesh_i::ReplaceShape() --- diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index cb57e77f4..965696f48 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -262,14 +262,16 @@ GEOM::GEOM_Object_ptr SMESH_Mesh_i::GetShapeToMesh() void SMESH_Mesh_i::ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom) throw (SALOME::SALOME_Exception) { - TopoDS_Shape S = _impl->GetMeshDS()->ShapeToMesh(); + TopoDS_Shape S = _impl->GetShapeToMesh(); GEOM_Client* geomClient = _gen_i->GetShapeReader(); TCollection_AsciiString aIOR; if (geomClient->Find(S, aIOR)) { geomClient->RemoveShapeFromBuffer(aIOR); } - _impl->UndefShapeToMesh(); - SetShape(theNewGeom); + + // re-assign global hypotheses to the new shape + _mainShapeTick = theNewGeom->GetTick() + 1; + CheckGeomModif(); } //================================================================================