diff --git a/3d-viewer/3d_canvas/board_adapter.cpp b/3d-viewer/3d_canvas/board_adapter.cpp index 194f849a2c..316ca5559c 100644 --- a/3d-viewer/3d_canvas/board_adapter.cpp +++ b/3d-viewer/3d_canvas/board_adapter.cpp @@ -74,6 +74,7 @@ BOARD_ADAPTER::BOARD_ADAPTER() : m_through_holes_inner.Clear(); m_through_holes_outer.Clear(); + m_through_holes_outer_ring.Clear(); m_copperLayersCount = -1; m_epoxyThickness3DU = 0.0f; @@ -94,6 +95,7 @@ BOARD_ADAPTER::BOARD_ADAPTER() : SetFlag( FL_USE_REALISTIC_MODE, true ); SetFlag( FL_MODULE_ATTRIBUTES_NORMAL, true ); SetFlag( FL_SHOW_BOARD_BODY, true ); + SetFlag( FL_CLIP_SILK_ON_VIA_ANNULUS, false ); SetFlag( FL_MODULE_ATTRIBUTES_NORMAL, true ); SetFlag( FL_MODULE_ATTRIBUTES_NORMAL_INSERT, true ); SetFlag( FL_MODULE_ATTRIBUTES_VIRTUAL, true ); diff --git a/3d-viewer/3d_canvas/board_adapter.h b/3d-viewer/3d_canvas/board_adapter.h index f91ffa7cb6..33743e00de 100644 --- a/3d-viewer/3d_canvas/board_adapter.h +++ b/3d-viewer/3d_canvas/board_adapter.h @@ -380,6 +380,16 @@ class BOARD_ADAPTER return m_through_holes_outer; } + /** + * @brief GetThroughHole_Outer_Ring - Get the ThroughHole container that + * include the width of the annular ring. + * @return a container with holes. + */ + const CBVHCONTAINER2D& GetThroughHole_Outer_Ring() const noexcept + { + return m_through_holes_outer_ring; + } + /** * @brief GetThroughHole_Outer_poly - * @return @@ -407,6 +417,15 @@ class BOARD_ADAPTER return m_through_holes_vias_outer; } + /** + * @brief GetThroughHole_Vias_Outer_Ring - + * @return a container with via THT holes only, including annular ring size + */ + const CBVHCONTAINER2D& GetThroughHole_Vias_Outer_Ring() const noexcept + { + return m_through_holes_vias_outer_ring; + } + /** * @brief GetThroughHole_Vias_Inner - * @return a container with via THT holes only @@ -424,6 +443,14 @@ class BOARD_ADAPTER return m_through_outer_holes_vias_poly; } + /** + * @brief GetThroughHole_Vias_Outer_Ring_poly - + */ + const SHAPE_POLY_SET& GetThroughHole_Vias_Outer_Ring_poly() const noexcept + { + return m_through_outer_ring_holes_vias_poly; + } + /** * @brief GetThroughHole_Vias_Inner_poly - */ @@ -672,6 +699,9 @@ private: /// It contains polygon contours for through holes vias (outer cylinder) SHAPE_POLY_SET m_through_outer_holes_vias_poly; + /// It contains polygon contours for through holes vias (outer annular ring) + SHAPE_POLY_SET m_through_outer_ring_holes_vias_poly; + /// It contains polygon contours for through holes vias (inner cylinder) SHAPE_POLY_SET m_through_inner_holes_vias_poly; @@ -691,6 +721,10 @@ private: /// the radius of the hole is inflated with the copper tickness CBVHCONTAINER2D m_through_holes_outer; + /// It contains the list of throughHoles of the board, + /// the radius of the hole is inflated with the annular ring size + CBVHCONTAINER2D m_through_holes_outer_ring; + /// It contains the list of throughHoles of the board, /// the radius is the inner hole CBVHCONTAINER2D m_through_holes_inner; @@ -699,6 +733,10 @@ private: /// the radius of the hole is inflated with the copper tickness CBVHCONTAINER2D m_through_holes_vias_outer; + /// It contains the list of throughHoles vias of the board, + /// the radius of the hole is inflated with the annular ring size + CBVHCONTAINER2D m_through_holes_vias_outer_ring; + /// It contains the list of throughHoles vias of the board, /// the radius of the hole CBVHCONTAINER2D m_through_holes_vias_inner; diff --git a/3d-viewer/3d_canvas/create_layer_items.cpp b/3d-viewer/3d_canvas/create_layer_items.cpp index 63c3f6585c..c3e28a294b 100644 --- a/3d-viewer/3d_canvas/create_layer_items.cpp +++ b/3d-viewer/3d_canvas/create_layer_items.cpp @@ -97,13 +97,16 @@ void BOARD_ADAPTER::destroyLayers() m_through_holes_inner.Clear(); m_through_holes_outer.Clear(); + m_through_holes_outer_ring.Clear(); m_through_holes_vias_outer.Clear(); + m_through_holes_vias_outer_ring.Clear(); m_through_holes_vias_inner.Clear(); m_through_outer_holes_poly_NPTH.RemoveAllContours(); m_through_outer_holes_poly.RemoveAllContours(); //m_through_inner_holes_poly.RemoveAllContours(); m_through_outer_holes_vias_poly.RemoveAllContours(); + m_through_outer_ring_holes_vias_poly.RemoveAllContours(); m_through_inner_holes_vias_poly.RemoveAllContours(); } @@ -260,6 +263,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) const float holediameter = via->GetDrillValue() * BiuTo3Dunits(); const float thickness = GetCopperThickness3DU(); const float hole_inner_radius = ( holediameter / 2.0f ); + const float ring_radius = via->GetWidth() * BiuTo3Dunits() / 2.0f; const SFVEC2F via_center( via->GetStart().x * m_biuTo3Dunits, -via->GetStart().y * m_biuTo3Dunits ); @@ -297,12 +301,19 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) m_through_holes_outer.Add( new CFILLEDCIRCLE2D( via_center, hole_inner_radius + thickness, *track ) ); - m_through_holes_vias_outer.Add( new CFILLEDCIRCLE2D( via_center, hole_inner_radius + thickness, *track ) ); + if( GetFlag( FL_CLIP_SILK_ON_VIA_ANNULUS ) ) + { + m_through_holes_outer_ring.Add( + new CFILLEDCIRCLE2D( via_center, ring_radius, *track ) ); + m_through_holes_vias_outer_ring.Add( + new CFILLEDCIRCLE2D( via_center, ring_radius, *track ) ); + } + m_through_holes_inner.Add( new CFILLEDCIRCLE2D( via_center, hole_inner_radius, *track ) ); @@ -388,6 +399,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) { const int holediameter = via->GetDrillValue(); const int hole_outer_radius = (holediameter / 2)+ GetCopperThicknessBIU(); + const int hole_outer_ring_radius = via->GetWidth() / 2.0f; // Add through hole contourns // ///////////////////////////////////////////////////////// @@ -399,8 +411,13 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) // Add samething for vias only - TransformCircleToPolygon( m_through_outer_holes_vias_poly, via->GetStart(), - hole_outer_radius, ARC_HIGH_DEF ); + TransformCircleToPolygon( m_through_outer_holes_vias_poly, + via->GetStart(), hole_outer_radius, ARC_HIGH_DEF ); + if( GetFlag( FL_CLIP_SILK_ON_VIA_ANNULUS ) ) + { + TransformCircleToPolygon( m_through_outer_ring_holes_vias_poly, + via->GetStart(), hole_outer_ring_radius, ARC_HIGH_DEF ); + } //TransformCircleToPolygon( m_through_inner_holes_vias_poly, // via->GetStart(), @@ -469,6 +486,10 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) pad->GetDrillSize().y ) / 2.0f ) * m_biuTo3Dunits; m_through_holes_outer.Add( createNewPadDrill( pad, inflate ) ); + if( GetFlag( FL_CLIP_SILK_ON_VIA_ANNULUS ) ) + { + m_through_holes_outer_ring.Add( createNewPadDrill( pad, inflate ) ); + } m_through_holes_inner.Add( createNewPadDrill( pad, 0 ) ); } } @@ -835,6 +856,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) m_through_outer_holes_poly.Simplify( SHAPE_POLY_SET::PM_FAST ); m_through_outer_holes_poly_NPTH.Simplify( SHAPE_POLY_SET::PM_FAST ); m_through_outer_holes_vias_poly.Simplify( SHAPE_POLY_SET::PM_FAST ); + m_through_outer_ring_holes_vias_poly.Simplify( SHAPE_POLY_SET::PM_FAST ); //m_through_inner_holes_vias_poly.Simplify( SHAPE_POLY_SET::PM_FAST ); // Not in use #ifdef PRINT_STATISTICS_3D_VIEWER @@ -1049,6 +1071,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) m_through_holes_inner.BuildBVH(); m_through_holes_outer.BuildBVH(); + m_through_holes_outer_ring.BuildBVH(); if( !m_layers_holes2D.empty() ) { diff --git a/3d-viewer/3d_enums.h b/3d-viewer/3d_enums.h index bf7a556a9e..e706022fe6 100644 --- a/3d-viewer/3d_enums.h +++ b/3d-viewer/3d_enums.h @@ -31,7 +31,8 @@ #define _3D_ENUMS_H_ /// Flags used in rendering options -enum DISPLAY3D_FLG { +enum DISPLAY3D_FLG +{ FL_AXIS = 0, FL_ZONE, FL_ADHESIVE, @@ -49,6 +50,7 @@ enum DISPLAY3D_FLG { FL_MOUSEWHEEL_PANNING, FL_USE_REALISTIC_MODE, FL_SUBTRACT_MASK_FROM_SILK, + FL_CLIP_SILK_ON_VIA_ANNULUS, // OpenGL options FL_RENDER_OPENGL_SHOW_MODEL_BBOX, diff --git a/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_createscene_ogl_legacy.cpp b/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_createscene_ogl_legacy.cpp index f5f61a0bcd..4264812214 100644 --- a/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_createscene_ogl_legacy.cpp +++ b/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_createscene_ogl_legacy.cpp @@ -462,6 +462,16 @@ void C3D_RENDER_OGL_LEGACY::reload( REPORTER* aStatusReporter, REPORTER* aWarnin 0.0f, false ); + if( m_boardAdapter.GetFlag( FL_CLIP_SILK_ON_VIA_ANNULUS ) ) + { + m_ogl_disp_list_through_holes_vias_outer_ring = generate_holes_display_list( + m_boardAdapter.GetThroughHole_Vias_Outer_Ring().GetList(), + m_boardAdapter.GetThroughHole_Vias_Outer_Ring_poly(), + 1.0f, + 0.0f, + false ); + } + // Not in use //m_ogl_disp_list_through_holes_vias_inner = generate_holes_display_list( // m_boardAdapter.GetThroughHole_Vias_Inner().GetList(), diff --git a/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_ogl_legacy.cpp b/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_ogl_legacy.cpp index 87c27b7f8a..8fe8e3008a 100644 --- a/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_ogl_legacy.cpp +++ b/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_ogl_legacy.cpp @@ -63,6 +63,7 @@ C3D_RENDER_OGL_LEGACY::C3D_RENDER_OGL_LEGACY( BOARD_ADAPTER& aAdapter, CCAMERA& m_ogl_disp_list_through_holes_outer_with_npth = NULL; m_ogl_disp_list_through_holes_outer = NULL; m_ogl_disp_list_through_holes_vias_outer = NULL; + m_ogl_disp_list_through_holes_vias_outer_ring = NULL; //m_ogl_disp_list_through_holes_vias_inner = NULL; m_ogl_disp_list_via = NULL; m_ogl_disp_list_pads_holes = NULL; @@ -771,10 +772,15 @@ bool C3D_RENDER_OGL_LEGACY::Redraw( } else { - if( m_ogl_disp_list_through_holes_vias_outer ) - m_ogl_disp_list_through_holes_vias_outer->ApplyScalePosition( - pLayerDispList->GetZBot(), - pLayerDispList->GetZTop() - pLayerDispList->GetZBot() ); + CLAYERS_OGL_DISP_LISTS* dispListThoughHolesOuter = + ( m_boardAdapter.GetFlag( FL_CLIP_SILK_ON_VIA_ANNULUS ) + && ( ( layer_id == B_SilkS ) || ( layer_id == F_SilkS ) ) ) ? + m_ogl_disp_list_through_holes_vias_outer_ring : + m_ogl_disp_list_through_holes_vias_outer; + + if( dispListThoughHolesOuter ) + dispListThoughHolesOuter->ApplyScalePosition( pLayerDispList->GetZBot(), + pLayerDispList->GetZTop() - pLayerDispList->GetZBot() ); if( (!skipRenderHoles) && m_boardAdapter.GetFlag( FL_SUBTRACT_MASK_FROM_SILK ) && @@ -789,13 +795,13 @@ bool C3D_RENDER_OGL_LEGACY::Redraw( pLayerDispList->DrawAllCameraCulledSubtractLayer( pLayerDispListMask, - m_ogl_disp_list_through_holes_vias_outer, + dispListThoughHolesOuter, drawMiddleSegments ); } else { if( (!skipRenderHoles) && - m_ogl_disp_list_through_holes_vias_outer && + dispListThoughHolesOuter && ( ( layer_id == B_SilkS ) || ( layer_id == F_SilkS ) // Remove vias on SolderPaste can be added as an option in future // ( layer_id == B_Paste ) || ( layer_id == F_Paste ) ) @@ -803,7 +809,7 @@ bool C3D_RENDER_OGL_LEGACY::Redraw( { pLayerDispList->DrawAllCameraCulledSubtractLayer( NULL, - m_ogl_disp_list_through_holes_vias_outer, + dispListThoughHolesOuter, drawMiddleSegments ); } else @@ -1069,6 +1075,9 @@ void C3D_RENDER_OGL_LEGACY::ogl_free_all_display_lists() delete m_ogl_disp_list_through_holes_vias_outer; m_ogl_disp_list_through_holes_vias_outer = 0; + delete m_ogl_disp_list_through_holes_vias_outer_ring; + m_ogl_disp_list_through_holes_vias_outer_ring = 0; + delete m_ogl_disp_list_via; m_ogl_disp_list_via = 0; diff --git a/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_ogl_legacy.h b/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_ogl_legacy.h index 75e2203e6d..21be171019 100644 --- a/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_ogl_legacy.h +++ b/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_ogl_legacy.h @@ -86,6 +86,7 @@ private: CLAYERS_OGL_DISP_LISTS* m_ogl_disp_list_through_holes_outer_with_npth; CLAYERS_OGL_DISP_LISTS* m_ogl_disp_list_through_holes_vias_outer; + CLAYERS_OGL_DISP_LISTS* m_ogl_disp_list_through_holes_vias_outer_ring; //CLAYERS_OGL_DISP_LISTS* m_ogl_disp_list_through_holes_vias_inner; // Not in use // This is for pads holes of the modules diff --git a/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp b/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp index 1fd2f8021a..590c18bcc7 100644 --- a/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp +++ b/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp @@ -582,13 +582,22 @@ void C3D_RENDER_RAYTRACING::reload( REPORTER* aStatusReporter, REPORTER* aWarnin // Check if there are any THT that intersects this object // ///////////////////////////////////////////////////////////// - if( !m_boardAdapter.GetThroughHole_Outer().GetList().empty() ) + + // If we're processing a silk screen layer and the flag is set, then + // clip the silk screening at the outer edge of the annular ring, rather + // than the at the outer edge of the copper plating. + const CBVHCONTAINER2D& throughHoleOuter = + ( m_boardAdapter.GetFlag( FL_CLIP_SILK_ON_VIA_ANNULUS ) + && ( ( layer_id == B_SilkS ) || ( layer_id == F_SilkS ) ) ) ? + m_boardAdapter.GetThroughHole_Outer_Ring() : + m_boardAdapter.GetThroughHole_Outer(); + + if( !throughHoleOuter.GetList().empty() ) { CONST_LIST_OBJECT2D intersectionList; - m_boardAdapter.GetThroughHole_Outer().GetListObjectsIntersects( - object2d_A->GetBBox(), - intersectionList ); + throughHoleOuter.GetListObjectsIntersects( + object2d_A->GetBBox(), intersectionList ); if( !intersectionList.empty() ) { diff --git a/3d-viewer/3d_viewer/3d_viewer_settings.cpp b/3d-viewer/3d_viewer/3d_viewer_settings.cpp index e63522b88d..b5468996de 100644 --- a/3d-viewer/3d_viewer/3d_viewer_settings.cpp +++ b/3d-viewer/3d_viewer/3d_viewer_settings.cpp @@ -112,6 +112,8 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() m_params.emplace_back( new PARAM( "render.show_zones", &m_Render.show_zones, true ) ); m_params.emplace_back( new PARAM( "render.subtract_mask_from_silk", &m_Render.subtract_mask_from_silk, false ) ); + m_params.emplace_back( new PARAM( "render.clip_silk_on_via_annulus", + &m_Render.clip_silk_on_via_annulus, false ) ); m_params.emplace_back( new PARAM( "camera.animation_enabled", &m_Camera.animation_enabled, true ) ); diff --git a/3d-viewer/3d_viewer/3d_viewer_settings.h b/3d-viewer/3d_viewer/3d_viewer_settings.h index d279f3b8b4..059cf3c4fb 100644 --- a/3d-viewer/3d_viewer/3d_viewer_settings.h +++ b/3d-viewer/3d_viewer/3d_viewer_settings.h @@ -62,6 +62,7 @@ public: bool show_solderpaste; bool show_zones; bool subtract_mask_from_silk; + bool clip_silk_on_via_annulus; }; struct CAMERA_SETTINGS diff --git a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option.cpp b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option.cpp index 6785f3c292..97f2995141 100644 --- a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option.cpp +++ b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option.cpp @@ -97,6 +97,7 @@ void DIALOG_3D_VIEW_OPTIONS::initDialog() m_bitmapComments->SetBitmap( KiBitmap( editor_xpm ) ); m_bitmapECO->SetBitmap( KiBitmap( editor_xpm ) ); m_bitmapSubtractMaskFromSilk->SetBitmap( KiBitmap( use_3D_copper_thickness_xpm ) ); + m_bitmapClipSilkOnViaAnnulus->SetBitmap( KiBitmap( use_3D_copper_thickness_xpm ) ); } void DIALOG_3D_VIEW_OPTIONS::OnCheckEnableAnimation( wxCommandEvent& event ) @@ -123,6 +124,7 @@ bool DIALOG_3D_VIEW_OPTIONS::TransferDataToWindow() m_checkBoxComments->SetValue( m_settings.GetFlag( FL_COMMENTS ) ); m_checkBoxECO->SetValue( m_settings.GetFlag( FL_ECO ) ); m_checkBoxSubtractMaskFromSilk->SetValue( m_settings.GetFlag( FL_SUBTRACT_MASK_FROM_SILK ) ); + m_checkBoxClipSilkOnViaAnnulus->SetValue( m_settings.GetFlag( FL_CLIP_SILK_ON_VIA_ANNULUS ) ); // OpenGL options m_checkBoxCuThickness->SetValue( m_settings.GetFlag( FL_RENDER_OPENGL_COPPER_THICKNESS ) ); @@ -164,6 +166,7 @@ bool DIALOG_3D_VIEW_OPTIONS::TransferDataFromWindow() m_settings.SetFlag( FL_SHOW_BOARD_BODY, m_checkBoxBoardBody->GetValue() ); m_settings.SetFlag( FL_ZONE, m_checkBoxAreas->GetValue() ); m_settings.SetFlag( FL_SUBTRACT_MASK_FROM_SILK, m_checkBoxSubtractMaskFromSilk->GetValue() ); + m_settings.SetFlag( FL_CLIP_SILK_ON_VIA_ANNULUS, m_checkBoxClipSilkOnViaAnnulus->GetValue() ); // Set 3D shapes visibility m_settings.SetFlag( FL_MODULE_ATTRIBUTES_NORMAL, m_checkBox3DshapesTH->GetValue() ); diff --git a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.cpp b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.cpp index b716d297dc..27645f77ac 100644 --- a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.cpp +++ b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.9.0 Jul 15 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -60,13 +60,22 @@ DIALOG_3D_VIEW_OPTIONS_BASE::DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWi fgSizerRenderOptions->Add( m_checkBoxAreas, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - fgSizerRenderOptions->Add( 0, 0, 0, wxALIGN_LEFT|wxALIGN_RIGHT, 10 ); + fgSizerRenderOptions->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 ); m_bitmapSubtractMaskFromSilk = new wxStaticBitmap( sbSizer1->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerRenderOptions->Add( m_bitmapSubtractMaskFromSilk, 0, wxALL, 5 ); + fgSizerRenderOptions->Add( m_bitmapSubtractMaskFromSilk, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_checkBoxSubtractMaskFromSilk = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Subtract soldermask from silkscreen"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerRenderOptions->Add( m_checkBoxSubtractMaskFromSilk, 0, wxALL, 5 ); + fgSizerRenderOptions->Add( m_checkBoxSubtractMaskFromSilk, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + fgSizerRenderOptions->Add( 0, 0, 0, wxALIGN_LEFT|wxALIGN_RIGHT, 10 ); + + m_bitmapClipSilkOnViaAnnulus = new wxStaticBitmap( sbSizer1->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerRenderOptions->Add( m_bitmapClipSilkOnViaAnnulus, 0, wxALL, 5 ); + + m_checkBoxClipSilkOnViaAnnulus = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Clip silkscreen at via annulus"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerRenderOptions->Add( m_checkBoxClipSilkOnViaAnnulus, 0, wxALL, 5 ); wxFlexGridSizer* fgSizer3; fgSizer3 = new wxFlexGridSizer( 0, 2, 0, 0 ); diff --git a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.fbp b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.fbp index bdeed84875..19e0a9e64b 100644 --- a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.fbp +++ b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.fbp @@ -611,7 +611,7 @@ 10 - wxALIGN_LEFT|wxALIGN_RIGHT + wxRIGHT|wxLEFT 0 0 @@ -621,7 +621,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -679,7 +679,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -741,6 +741,138 @@ + + 10 + wxALIGN_LEFT|wxALIGN_RIGHT + 0 + + 0 + protected + 0 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_bitmapClipSilkOnViaAnnulus + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Clip silkscreen at via annulus + + 0 + + + 0 + + 1 + m_checkBoxClipSilkOnViaAnnulus + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + 5 wxEXPAND diff --git a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.h b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.h index 079af0a828..67d602d9b9 100644 --- a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.h +++ b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.9.0 Jul 15 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -54,6 +54,8 @@ class DIALOG_3D_VIEW_OPTIONS_BASE : public DIALOG_SHIM wxCheckBox* m_checkBoxAreas; wxStaticBitmap* m_bitmapSubtractMaskFromSilk; wxCheckBox* m_checkBoxSubtractMaskFromSilk; + wxStaticBitmap* m_bitmapClipSilkOnViaAnnulus; + wxCheckBox* m_checkBoxClipSilkOnViaAnnulus; wxStaticBitmap* m_bitmap3DshapesTH; wxCheckBox* m_checkBox3DshapesTH; wxStaticBitmap* m_bitmap3DshapesSMD; diff --git a/3d-viewer/3d_viewer/eda_3d_viewer.cpp b/3d-viewer/3d_viewer/eda_3d_viewer.cpp index b3a6e71111..f618ffa526 100644 --- a/3d-viewer/3d_viewer/eda_3d_viewer.cpp +++ b/3d-viewer/3d_viewer/eda_3d_viewer.cpp @@ -457,6 +457,7 @@ void EDA_3D_VIEWER::LoadSettings( APP_SETTINGS_BASE *aCfg ) TRANSFER_SETTING( FL_COMMENTS, show_comments ); TRANSFER_SETTING( FL_ECO, show_eco ); TRANSFER_SETTING( FL_SHOW_BOARD_BODY, show_board_body ); + TRANSFER_SETTING( FL_CLIP_SILK_ON_VIA_ANNULUS, clip_silk_on_via_annulus ); m_boardAdapter.GridSet( static_cast( cfg->m_Render.grid_type ) ); m_boardAdapter.AntiAliasingSet( static_cast( cfg->m_Render.opengl_AA_mode ) ); @@ -541,20 +542,21 @@ void EDA_3D_VIEWER::SaveSettings( APP_SETTINGS_BASE *aCfg ) TRANSFER_SETTING( raytrace_refractions, FL_RENDER_RAYTRACING_REFRACTIONS ); TRANSFER_SETTING( raytrace_shadows, FL_RENDER_RAYTRACING_SHADOWS ); - TRANSFER_SETTING( realistic, FL_USE_REALISTIC_MODE ); - TRANSFER_SETTING( show_adhesive, FL_ADHESIVE ); - TRANSFER_SETTING( show_axis, FL_AXIS ); - TRANSFER_SETTING( show_board_body, FL_SHOW_BOARD_BODY ); - TRANSFER_SETTING( show_comments, FL_COMMENTS ); - TRANSFER_SETTING( show_eco, FL_ECO ); - TRANSFER_SETTING( show_footprints_insert, FL_MODULE_ATTRIBUTES_NORMAL_INSERT ); - TRANSFER_SETTING( show_footprints_normal, FL_MODULE_ATTRIBUTES_NORMAL ); - TRANSFER_SETTING( show_footprints_virtual, FL_MODULE_ATTRIBUTES_VIRTUAL ); - TRANSFER_SETTING( show_silkscreen, FL_SILKSCREEN ); - TRANSFER_SETTING( show_soldermask, FL_SOLDERMASK ); - TRANSFER_SETTING( show_solderpaste, FL_SOLDERPASTE ); - TRANSFER_SETTING( show_zones, FL_ZONE ); - TRANSFER_SETTING( subtract_mask_from_silk, FL_SUBTRACT_MASK_FROM_SILK ); + TRANSFER_SETTING( realistic, FL_USE_REALISTIC_MODE ); + TRANSFER_SETTING( show_adhesive, FL_ADHESIVE ); + TRANSFER_SETTING( show_axis, FL_AXIS ); + TRANSFER_SETTING( show_board_body, FL_SHOW_BOARD_BODY ); + TRANSFER_SETTING( clip_silk_on_via_annulus, FL_CLIP_SILK_ON_VIA_ANNULUS ); + TRANSFER_SETTING( show_comments, FL_COMMENTS ); + TRANSFER_SETTING( show_eco, FL_ECO ); + TRANSFER_SETTING( show_footprints_insert, FL_MODULE_ATTRIBUTES_NORMAL_INSERT ); + TRANSFER_SETTING( show_footprints_normal, FL_MODULE_ATTRIBUTES_NORMAL ); + TRANSFER_SETTING( show_footprints_virtual, FL_MODULE_ATTRIBUTES_VIRTUAL ); + TRANSFER_SETTING( show_silkscreen, FL_SILKSCREEN ); + TRANSFER_SETTING( show_soldermask, FL_SOLDERMASK ); + TRANSFER_SETTING( show_solderpaste, FL_SOLDERPASTE ); + TRANSFER_SETTING( show_zones, FL_ZONE ); + TRANSFER_SETTING( subtract_mask_from_silk, FL_SUBTRACT_MASK_FROM_SILK ); #undef TRANSFER_SETTING }