From 0ecc36c4a54d700286d0a2ff45611cd8b98ff632 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Mon, 13 Feb 2023 22:21:20 -0500 Subject: [PATCH] Fix step model colors again Fixes https://gitlab.com/kicad/code/kicad/-/issues/13882 (cherry picked from commit df022acc11703ab030cdb30dba773faab625fcba) --- plugins/3d/oce/loadmodel.cpp | 4 +++- plugins/3d/oce/oce.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/3d/oce/loadmodel.cpp b/plugins/3d/oce/loadmodel.cpp index 73649103c3..b121f07815 100644 --- a/plugins/3d/oce/loadmodel.cpp +++ b/plugins/3d/oce/loadmodel.cpp @@ -1000,13 +1000,15 @@ bool processLabel( const TDF_Label& aLabel, DATA& aData, SGNODE* aParent, ret = true; } + // Get all shells, avoid those that may be attached to solids for( xp.Init( shape, TopAbs_SHELL, TopAbs_SOLID ); xp.More(); xp.Next() ) { processShell( xp.Current(), aData, pptr, aItems, nullptr ); ret = true; } - for( xp.Init( shape, TopAbs_FACE ); xp.More(); xp.Next() ) + // Get all faces, avoid those that may be attached to shells + for( xp.Init( shape, TopAbs_FACE, TopAbs_SHELL ); xp.More(); xp.Next() ) { const TopoDS_Face& face = TopoDS::Face( xp.Current() ); processFace( face, aData, pptr, aItems, nullptr ); diff --git a/plugins/3d/oce/oce.cpp b/plugins/3d/oce/oce.cpp index adec20c9f2..fcbcd9f628 100644 --- a/plugins/3d/oce/oce.cpp +++ b/plugins/3d/oce/oce.cpp @@ -37,7 +37,7 @@ SCENEGRAPH* LoadModel( char const* filename ); #define PLUGIN_OCE_MAJOR 1 #define PLUGIN_OCE_MINOR 4 -#define PLUGIN_OCE_PATCH 0 +#define PLUGIN_OCE_PATCH 1 #define PLUGIN_OCE_REVNO 0