From 7e70ceaa03d7c5721050998bd87be16e65776d3c Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 20 Sep 2023 13:43:23 +0100 Subject: [PATCH] Don't trim non-physical layers to board-outline. If the user wants a realistic render, then they'll turn off non-physical layers entirely. --- 3d-viewer/3d_rendering/opengl/create_scene.cpp | 7 +++++-- 3d-viewer/3d_rendering/opengl/render_3d_opengl.cpp | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/3d-viewer/3d_rendering/opengl/create_scene.cpp b/3d-viewer/3d_rendering/opengl/create_scene.cpp index b4a36c4c40..074cc21395 100644 --- a/3d-viewer/3d_rendering/opengl/create_scene.cpp +++ b/3d-viewer/3d_rendering/opengl/create_scene.cpp @@ -584,8 +584,11 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo { polyListSubtracted = *map_poly.at( layer_id );; - polyListSubtracted.BooleanIntersection( m_boardAdapter.GetBoardPoly(), - SHAPE_POLY_SET::PM_FAST ); + if( LSET::PhysicalLayersMask().test( layer_id ) ) + { + polyListSubtracted.BooleanIntersection( m_boardAdapter.GetBoardPoly(), + SHAPE_POLY_SET::PM_FAST ); + } if( layer_id != B_Mask && layer_id != F_Mask ) { diff --git a/3d-viewer/3d_rendering/opengl/render_3d_opengl.cpp b/3d-viewer/3d_rendering/opengl/render_3d_opengl.cpp index 349abf242b..0f1381d5e4 100644 --- a/3d-viewer/3d_rendering/opengl/render_3d_opengl.cpp +++ b/3d-viewer/3d_rendering/opengl/render_3d_opengl.cpp @@ -700,7 +700,10 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter, - pLayerDispList->GetZBot() ); } - OPENGL_RENDER_LIST* anti_board = m_antiBoard; + OPENGL_RENDER_LIST* anti_board = nullptr; + + if( LSET::PhysicalLayersMask().test( layer_id ) ) + anti_board = m_antiBoard; if( anti_board ) {