Part/Import: [skip ci] disable use of Message_ProgressIndicator for OCC >= 7.5 due to major API changes

This commit is contained in:
wmayer
2020-10-08 14:48:35 +02:00
parent f129f3f097
commit fd9cdb9de9
9 changed files with 81 additions and 5 deletions

View File

@@ -47,6 +47,7 @@
# include <Interface_EntityIterator.hxx>
# include <Quantity_Color.hxx>
# include <TCollection_ExtendedString.hxx>
# include <Standard_Version.hxx>
#endif
#include <Base/Console.h>
@@ -86,16 +87,20 @@ int Part::ImportIgesParts(App::Document *pcDoc, const char* FileName)
#if 1
std::string aName = fi.fileNamePure();
#if OCC_VERSION_HEX < 0x070500
Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
pi->NewScope(100, "Reading IGES file...");
pi->Show();
aReader.WS()->MapReader()->SetProgress(pi);
#endif
// make model
aReader.ClearShapes();
//Standard_Integer nbRootsForTransfer = aReader.NbRootsForTransfer();
aReader.TransferRoots();
#if OCC_VERSION_HEX < 0x070500
pi->EndScope();
#endif
// put all other free-flying shapes into a single compound
Standard_Boolean emptyComp = Standard_True;