From 5d596454037e662a3f2706be9c716118ec96bc3a Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 5 Sep 2018 14:21:30 +0300 Subject: [PATCH] 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. --- src/GEOM/GEOM_Engine.cxx | 11 +++++++---- src/GEOM_I/GEOM_Gen_i.cc | 37 +++++++++++++++++++++++++++++-------- 2 files changed, 36 insertions(+), 12 deletions(-) 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:"<