ADDED: 3D appearance setting for off-board silk.

This commit is contained in:
Jeff Young 2023-09-20 18:29:38 +01:00
parent 88cbbbcdae
commit 0126841c44
6 changed files with 16 additions and 1 deletions

View File

@ -727,6 +727,7 @@ void BOARD_ADAPTER::SetVisibleLayers( const std::bitset<LAYER_3D_END>& aLayers )
m_Cfg->m_Render.show_fp_text = aLayers.test( LAYER_FP_TEXT ); m_Cfg->m_Render.show_fp_text = aLayers.test( LAYER_FP_TEXT );
m_Cfg->m_Render.opengl_show_model_bbox = aLayers.test( LAYER_3D_BOUNDING_BOXES ); m_Cfg->m_Render.opengl_show_model_bbox = aLayers.test( LAYER_3D_BOUNDING_BOXES );
m_Cfg->m_Render.opengl_show_off_board_silk = aLayers.test( LAYER_3D_OFF_BOARD_SILK );
m_Cfg->m_Render.show_axis = aLayers.test( LAYER_3D_AXES ); m_Cfg->m_Render.show_axis = aLayers.test( LAYER_3D_AXES );
} }
@ -760,6 +761,7 @@ std::bitset<LAYER_3D_END> BOARD_ADAPTER::GetVisibleLayers() const
ret.set( LAYER_3D_MODELS_MARKED_DNP, m_Cfg->m_Render.show_footprints_dnp ); ret.set( LAYER_3D_MODELS_MARKED_DNP, m_Cfg->m_Render.show_footprints_dnp );
ret.set( LAYER_3D_BOUNDING_BOXES, m_Cfg->m_Render.opengl_show_model_bbox ); ret.set( LAYER_3D_BOUNDING_BOXES, m_Cfg->m_Render.opengl_show_model_bbox );
ret.set( LAYER_3D_OFF_BOARD_SILK, m_Cfg->m_Render.opengl_show_off_board_silk );
ret.set( LAYER_3D_AXES, m_Cfg->m_Render.show_axis ); ret.set( LAYER_3D_AXES, m_Cfg->m_Render.show_axis );
if( m_Cfg->m_CurrentPreset == FOLLOW_PCB ) if( m_Cfg->m_CurrentPreset == FOLLOW_PCB )

View File

@ -702,8 +702,15 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter,
OPENGL_RENDER_LIST* anti_board = nullptr; OPENGL_RENDER_LIST* anti_board = nullptr;
if( LSET::PhysicalLayersMask().test( layer_id ) ) if( ( layer_id == F_SilkS || layer_id == B_SilkS )
&& m_boardAdapter.m_Cfg->m_Render.opengl_show_off_board_silk )
{
anti_board = nullptr;
}
else if( LSET::PhysicalLayersMask().test( layer_id ) )
{
anti_board = m_antiBoard; anti_board = m_antiBoard;
}
if( anti_board ) if( anti_board )
{ {
@ -723,6 +730,7 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter,
} }
} }
else if( m_boardAdapter.m_Cfg->m_Render.subtract_mask_from_silk else if( m_boardAdapter.m_Cfg->m_Render.subtract_mask_from_silk
&& !m_boardAdapter.m_Cfg->m_Render.opengl_show_off_board_silk
&& ( ( layer_id == B_SilkS && m_layers.find( B_Mask ) != m_layers.end() ) && ( ( layer_id == B_SilkS && m_layers.find( B_Mask ) != m_layers.end() )
|| ( layer_id == F_SilkS && m_layers.find( F_Mask ) != m_layers.end() ) ) ) || ( layer_id == F_SilkS && m_layers.find( F_Mask ) != m_layers.end() ) ) )
{ {

View File

@ -220,6 +220,8 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() :
&m_Render.opengl_copper_thickness, false ) ); &m_Render.opengl_copper_thickness, false ) );
m_params.emplace_back( new PARAM<bool>( "render.opengl_show_model_bbox", m_params.emplace_back( new PARAM<bool>( "render.opengl_show_model_bbox",
&m_Render.opengl_show_model_bbox, false ) ); &m_Render.opengl_show_model_bbox, false ) );
m_params.emplace_back( new PARAM<bool>( "render.opengl_show_off_board_silk",
&m_Render.opengl_show_off_board_silk, false ) );
m_params.emplace_back( new PARAM<bool>( "render.opengl_highlight_on_rollover", m_params.emplace_back( new PARAM<bool>( "render.opengl_highlight_on_rollover",
&m_Render.opengl_highlight_on_rollover, true ) ); &m_Render.opengl_highlight_on_rollover, true ) );
m_params.emplace_back( new PARAM<bool>( "render.opengl_AA_disableOnMove", m_params.emplace_back( new PARAM<bool>( "render.opengl_AA_disableOnMove",

View File

@ -90,6 +90,7 @@ public:
bool opengl_render_bbox_only_OnMove; bool opengl_render_bbox_only_OnMove;
bool opengl_copper_thickness; bool opengl_copper_thickness;
bool opengl_show_model_bbox; bool opengl_show_model_bbox;
bool opengl_show_off_board_silk;
bool opengl_highlight_on_rollover; bool opengl_highlight_on_rollover;
KIGFX::COLOR4D opengl_selection_color; KIGFX::COLOR4D opengl_selection_color;

View File

@ -71,6 +71,7 @@ const APPEARANCE_CONTROLS_3D::APPEARANCE_SETTING_3D APPEARANCE_CONTROLS_3D::s_la
RR( _HKI( "Values" ), LAYER_FP_VALUES, _HKI( "Show footprint values" ) ), RR( _HKI( "Values" ), LAYER_FP_VALUES, _HKI( "Show footprint values" ) ),
RR( _HKI( "References" ), LAYER_FP_REFERENCES, _HKI( "Show footprint references" ) ), RR( _HKI( "References" ), LAYER_FP_REFERENCES, _HKI( "Show footprint references" ) ),
RR( _HKI( "Footprint Text" ), LAYER_FP_TEXT, _HKI( "Show all footprint text" ) ), RR( _HKI( "Footprint Text" ), LAYER_FP_TEXT, _HKI( "Show all footprint text" ) ),
RR( _HKI( "Off-board Silkscreen" ), LAYER_3D_OFF_BOARD_SILK, _HKI( "Do not clip silk layers to board outline" ) ),
RR(), RR(),
RR( _HKI( "3D Axis" ), LAYER_3D_AXES, EDA_3D_ACTIONS::showAxis ), RR( _HKI( "3D Axis" ), LAYER_3D_AXES, EDA_3D_ACTIONS::showAxis ),
RR( _HKI( "Background Start" ), LAYER_3D_BACKGROUND_TOP, _HKI( "Background gradient start color" ) ), RR( _HKI( "Background Start" ), LAYER_3D_BACKGROUND_TOP, _HKI( "Background gradient start color" ) ),

View File

@ -462,6 +462,7 @@ enum LAYER_3D_ID : int
LAYER_3D_MODELS_MARKED_DNP, LAYER_3D_MODELS_MARKED_DNP,
LAYER_3D_AXES, LAYER_3D_AXES,
LAYER_3D_BOUNDING_BOXES, LAYER_3D_BOUNDING_BOXES,
LAYER_3D_OFF_BOARD_SILK,
LAYER_3D_END LAYER_3D_END
}; };