I failed to save a file about 0.5MB, while it was ok to save a file with the size about 0.38MB?
Does anyone know the problem? Thanks in advance!
Chris
sergey zaritchny Tue, 01/25/2011 - 17:57
Hi Chris,
There is no explicit limitation in SaveAs function.
Check differences between model1 (file with size 0.38MB) and model2 (~0.5MB).
Regards
Sergey
I found the problem might be related to the number of objects (blocks) generated. When I save a document with objects more than 50000, it fails. And it is ok to save a document with objects less than 49900 based on the testing.
So I wonder whether there is the limitation of the number of objects in the document.
Hi Chris,
May be you have a memory problems.
It would be better to check it.
Could you provide information to reproduce the problem,
for example, fragment of code which generates the document content to be saved.
Regards
Sergey
I attached some fragments of the codes for your reference.
They include:
Void Test();
TDF_Label TOcaf_Commands::CreateBox(…);
TOcafFunction_BoxDriver.cxx file.
Hi Chris,
To identify the exact reason (bug/limitation/ or something else) of the described behavior
I need a compilable version of your case (allowing to reproduce the problem) plus reference to used environment:
1.OCCT version
2. Platform, OS version
3. Compiler version
Tue, 01/25/2011 - 17:57
Hi Chris,
There is no explicit limitation in SaveAs function.
Check differences between model1 (file with size 0.38MB) and model2 (~0.5MB).
Regards
Sergey
Sun, 02/06/2011 - 08:40
Thanks for your answer, Sergey.
I found the problem might be related to the number of objects (blocks) generated. When I save a document with objects more than 50000, it fails. And it is ok to save a document with objects less than 49900 based on the testing.
So I wonder whether there is the limitation of the number of objects in the document.
Your answer is appreciated greatly.
TDF_Data::TDF_Data() :
myTransaction (0),
myNbTouchedAtt (0),
myNotUndoMode (Standard_True),
myTime (0),
myAllowModification (Standard_True)
{
const Handle(NCollection_IncAllocator) anIncAllocator=
new NCollection_IncAllocator (16000);
myLabelNodeAllocator = anIncAllocator;
myRoot = new (anIncAllocator) TDF_LabelNode (this);
}
Chris
Mon, 02/07/2011 - 10:23
Hi Chris,
May be you have a memory problems.
It would be better to check it.
Could you provide information to reproduce the problem,
for example, fragment of code which generates the document content to be saved.
Regards
Sergey
Wed, 02/16/2011 - 10:20
Thanks for your answer, Sergey.
I attached some fragments of the codes for your reference.
They include:
Void Test();
TDF_Label TOcaf_Commands::CreateBox(…);
TOcafFunction_BoxDriver.cxx file.
Thank you for the help.
Chris
Wed, 02/16/2011 - 16:54
Hi Chris,
To identify the exact reason (bug/limitation/ or something else) of the described behavior
I need a compilable version of your case (allowing to reproduce the problem) plus reference to used environment:
1.OCCT version
2. Platform, OS version
3. Compiler version
Regards