From: eap Date: Wed, 5 Sep 2018 11:21:30 +0000 (+0300) Subject: 23586: [EDF] HYDRO: Copy mesh to new geometry X-Git-Tag: HYDRO_V2_0_0^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5d596454037e662a3f2706be9c716118ec96bc3a;p=modules%2Fgeom.git 23586: [EDF] HYDRO: Copy mesh to new geometry --- GEOM_Gen_i.cc --- In order to assure safe and fast search of initial groups by groups of the new geometry, behavior of GEOM_Gen operations that implement searching and publishing of new groups corresponding to initial groups, is slightly modified. A reference to an initial sub-object is published under a corresponding new sub-object. The modified functions are RestoreSubShapesO(), RestoreGivenSubShapesO() and RestoreSubShapesSO(). --- GEOM_Engine.cxx --- Avoid double removal of GEOM_BaseObject that leads to removal of all attributes from the root TDF label. That caused some regression, don't remember which. --- diff --git a/src/GEOM/GEOM_Engine.cxx b/src/GEOM/GEOM_Engine.cxx index dd4bc1012..e0fb46fe2 100644 --- a/src/GEOM/GEOM_Engine.cxx +++ b/src/GEOM/GEOM_Engine.cxx @@ -482,6 +482,10 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject) if(!_mapIDDocument.IsBound(aDocID)) return false; // document is closed... + TDF_Label aLabel = theObject->GetEntry(); + if ( aLabel == aLabel.Root() ) + return false; // already removed object + //Remove an object from the map of available objects TCollection_AsciiString anID = BuildIDFromObject(theObject); if (_objects.IsBound(anID)) { @@ -510,7 +514,6 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject) aNode->Remove(); } - TDF_Label aLabel = theObject->GetEntry(); aLabel.ForgetAllAttributes(Standard_True); // Remember the label to reuse it then @@ -1432,7 +1435,7 @@ void ReplaceVariables(TCollection_AsciiString& theCommand, if(MYDEBUG) { cout<<"Variables from SObject:"<