From 5dc5491546d91ea27e48baed481f9e81db22075b Mon Sep 17 00:00:00 2001 From: mbs Date: Wed, 17 May 2023 14:45:16 +0100 Subject: [PATCH] only apply color to 3d shapes (solid/shell/face) --- .../ExchangePlugin_ImportFeature.cpp | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp b/src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp index e73ccfbe3..1b7a8f62b 100644 --- a/src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp +++ b/src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp @@ -243,15 +243,18 @@ void ExchangePlugin_ImportFeature::setColorGroups( std::list allRes; ModelAPI_Tools::allSubs(theResultBody, allRes); for(std::list::iterator aRes = allRes.begin(); aRes != allRes.end(); ++aRes) { - ModelAPI_Tools::getColor(*aRes, aColor); - if (!aColor.empty() ){ - auto it = std::find(aColorsRead.begin(), aColorsRead.end(), aColor); - if ( it == aColorsRead.end() ){ - std::wstringstream aColorName; - aColorName<shape()->isSolid() || (*aRes)->shape()->isShell() || (*aRes)->shape()->isFace()) { + // only apply color to 3d objects (no wires, edges, or vertices) + ModelAPI_Tools::getColor(*aRes, aColor); + if (!aColor.empty() ){ + auto it = std::find(aColorsRead.begin(), aColorsRead.end(), aColor); + if ( it == aColorsRead.end() ){ + std::wstringstream aColorName; + aColorName<