Activate only UI tree leaf as to display properly colors when browsing a STEP (there is currently a limitation within the reader which creates compound which are totally grey) and accelerate browsing by de-activating Compound rendering

This commit is contained in:
Jean-Marie Verdun
2017-01-29 17:20:51 +01:00
committed by wmayer
parent bcea759287
commit fc4a1c6081
3 changed files with 30 additions and 0 deletions

View File

@@ -75,6 +75,9 @@
#include <Mod/Part/App/ImportIges.h>
#include <Mod/Part/App/ImportStep.h>
#include <App/DocumentObject.h>
#include <App/DocumentObjectGroup.h>
#ifdef HAVE_TBB
#include <tbb/parallel_for.h>
#include <tbb/blocked_range.h>
@@ -214,6 +217,7 @@ void ImportOCAF::loadShapes(const TDF_Label& label, const TopLoc_Location& loc,
if (pcCompound) {
pcCompound->Links.setValues(localValue);
lValue.push_back(pcCompound);
Node_Shapes.push_back(pcCompound->getNameInDocument());
}
}
}
@@ -244,6 +248,7 @@ void ImportOCAF::createShape(const TDF_Label& label, const TopLoc_Location& loc,
pcCompound->Links.setValues(localValue);
lValue.push_back(pcCompound);
Node_Shapes.push_back(pcCompound->getNameInDocument());
if (ctSolids > 0 || ctShells > 0)
return;
}
@@ -260,6 +265,7 @@ void ImportOCAF::createShape(const TopoDS_Shape& aShape, const TopLoc_Location&
else
part->Shape.setValue(aShape);
part->Label.setValue(name);
Leaf_Shapes.push_back(part->getNameInDocument());
lvalue.push_back(part);
Quantity_Color aColor;