From: eap Date: Wed, 5 Sep 2018 10:59:48 +0000 (+0300) Subject: 23586: [EDF] HYDRO: Copy mesh to new geometry X-Git-Tag: V9_1_0~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ddca8a32b02af1b376ada07756b2c973b52cee45;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 83406999c..b586ff24b 100644 --- a/src/GEOM/GEOM_Engine.cxx +++ b/src/GEOM/GEOM_Engine.cxx @@ -434,6 +434,10 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject) if(!_document) 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)) { @@ -462,7 +466,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 @@ -1360,7 +1363,7 @@ void ReplaceVariables(TCollection_AsciiString& theCommand, if(MYDEBUG) { cout<<"Variables from SObject:"<