1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0031504: Data Exchange - Wrong output of progress indicator when writing to stl

Added new condition for first indicated element at Draw_ProgressIndicator::Show(),
because it’s more logical that at start progress starts at 0
Changed usage of Next() to Next(step) for increment progress to IND_THRESHOLD in RWStl::writeASCII() and RWStl::writeBinary()
Changed condition for continuation of writing and add interrupt to this function
Added possibility to use Progress indicator in writestl
Changed paremeter in constructor Message_ProgressSentry aPS() IND_THRESHOLD to 1
Changed test
This commit is contained in:
akaftasev
2020-05-22 13:04:49 +03:00
committed by bugmaster
parent 59ec2ccec9
commit 1fc1a207b0
8 changed files with 59 additions and 16 deletions

View File

@@ -333,7 +333,8 @@ static Standard_Integer writestl
}
StlAPI_Writer aWriter;
aWriter.ASCIIMode() = isASCIIMode;
Standard_Boolean isOK = aWriter.Write (aShape, argv[2]);
Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1);
Standard_Boolean isOK = aWriter.Write (aShape, argv[2], aProgress);
if (!isOK)
di << "** Error **: Mesh writing has been failed.\n";
}