mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-05 22:30:34 +05:00
Bug 0020065: EDF 876 GEOM : Deleting an object leads to unusable dump.
This commit is contained in:
parent
2589b34626
commit
9fb1bbc452
@ -97,7 +97,6 @@ Handle(TColStd_HSequenceOfInteger) FindEntries(TCollection_AsciiString& theStrin
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOM_Engine* GEOM_Engine::GetEngine() { return TheEngine; }
|
GEOM_Engine* GEOM_Engine::GetEngine() { return TheEngine; }
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* SetEngine
|
* SetEngine
|
||||||
@ -437,7 +436,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
|
|||||||
aScript += "def RebuildData(theStudy):";
|
aScript += "def RebuildData(theStudy):";
|
||||||
aScript += "\n\tgeompy.init_geom(theStudy)";
|
aScript += "\n\tgeompy.init_geom(theStudy)";
|
||||||
|
|
||||||
Standard_Integer posToInertGlobalVars = aScript.Length() + 1;
|
Standard_Integer posToInsertGlobalVars = aScript.Length() + 1;
|
||||||
|
|
||||||
Handle(TDataStd_TreeNode) aNode, aRoot;
|
Handle(TDataStd_TreeNode) aNode, aRoot;
|
||||||
Handle(GEOM_Function) aFunction;
|
Handle(GEOM_Function) aFunction;
|
||||||
@ -635,7 +634,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
|
|||||||
}
|
}
|
||||||
if ( !globalVars.IsEmpty() ) {
|
if ( !globalVars.IsEmpty() ) {
|
||||||
globalVars.Insert( 1, "\n\tglobal " );
|
globalVars.Insert( 1, "\n\tglobal " );
|
||||||
anUpdatedScript.Insert( posToInertGlobalVars, globalVars );
|
anUpdatedScript.Insert( posToInsertGlobalVars, globalVars );
|
||||||
}
|
}
|
||||||
|
|
||||||
return anUpdatedScript;
|
return anUpdatedScript;
|
||||||
@ -692,19 +691,34 @@ void ProcessFunction(Handle(GEOM_Function)& theFunction,
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// pass functions, that depends on nonexisting ones
|
||||||
|
//jfa:test//bool doComment = false;
|
||||||
|
TDF_LabelSequence aSeq;
|
||||||
|
theFunction->GetDependency(aSeq);
|
||||||
|
Standard_Integer aLen = aSeq.Length();
|
||||||
|
//jfa:test//for (Standard_Integer i = 1; i <= aLen && !doComment; i++) {
|
||||||
|
for (Standard_Integer i = 1; i <= aLen; i++) {
|
||||||
|
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(aSeq.Value(i));
|
||||||
|
//jfa:test//if (aFunction.IsNull()) doComment = true;
|
||||||
|
//jfa:test//else if (!theProcessed.Contains(aFunction)) doComment = true;
|
||||||
|
if (aFunction.IsNull()) return;
|
||||||
|
if (!theProcessed.Contains(aFunction)) return;
|
||||||
|
}
|
||||||
|
|
||||||
TCollection_AsciiString aDescr = theFunction->GetDescription();
|
TCollection_AsciiString aDescr = theFunction->GetDescription();
|
||||||
if(aDescr.Length() == 0) {
|
if(aDescr.Length() == 0) {
|
||||||
//cout << "Warning: the function has no description" << endl;
|
//cout << "Warning: the function has no description" << endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Check if its internal function which doesn't requires dumping
|
//Check if its internal function which doesn't requires dumping
|
||||||
if(aDescr == "None") return;
|
if(aDescr == "None") return;
|
||||||
|
|
||||||
theScript += "\n\t";
|
theScript += "\n\t";
|
||||||
|
//jfa:test//if (doComment) theScript += "#";
|
||||||
theScript += aDescr;
|
theScript += aDescr;
|
||||||
|
|
||||||
theProcessed.Add(theFunction);
|
theProcessed.Add(theFunction);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user