From bb12ce3474ef853b29f825a7e793a3829e5cadb0 Mon Sep 17 00:00:00 2001 From: Jean-Marie Verdun Date: Mon, 1 May 2017 20:23:29 +0200 Subject: [PATCH] Compute the document before inserting STEP file. Consider that inserted Tree Element are computed and remove the Touched flag before recomputing lately the document This is accelerating the STEP file --- src/Mod/Import/Gui/AppImportGuiPy.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Mod/Import/Gui/AppImportGuiPy.cpp b/src/Mod/Import/Gui/AppImportGuiPy.cpp index 620c5b77d2..7fe080618e 100644 --- a/src/Mod/Import/Gui/AppImportGuiPy.cpp +++ b/src/Mod/Import/Gui/AppImportGuiPy.cpp @@ -411,7 +411,13 @@ private: } ImportOCAFExt ocaf(hDoc, pcDoc, file.fileNamePure()); + // We must recompute the doc before loading shapes as they are going to be + // inserted into the document and computed at the same time so we are going to + // purge the document before recomputing it to clear it and settle it in the proper + // way. This is drastically improving STEP rendering time on complex STEP files. + pcDoc->recompute(); ocaf.loadShapes(); + pcDoc->purgeTouched(); pcDoc->recompute(); hApp->Close(hDoc); }