From: mbs Date: Wed, 17 May 2023 13:45:16 +0000 (+0100) Subject: only apply color to 3d shapes (solid/shell/face) X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5dc5491546d91ea27e48baed481f9e81db22075b;p=modules%2Fshaper.git only apply color to 3d shapes (solid/shell/face) --- 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<