From 741783c6d100a5aaf302c65a0fec6cdad5ba629e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 12 Mar 2020 20:05:08 +0100 Subject: [PATCH] Pcbnew: Set default solder mask min size to 0. When the solder mask min size is > 0, pads are no longer flashed or regions items. Good Gerber files need pads flashed or regions items. Non 0 solder mask min size is reserved to special cases (home made PCBs for instance) --- include/board_design_settings.h | 11 +- pcbnew/dialogs/panel_setup_mask_and_paste.cpp | 9 -- .../panel_setup_mask_and_paste_base.cpp | 27 +++- .../panel_setup_mask_and_paste_base.fbp | 142 +++++++++++++++++- .../dialogs/panel_setup_mask_and_paste_base.h | 8 +- 5 files changed, 174 insertions(+), 23 deletions(-) diff --git a/include/board_design_settings.h b/include/board_design_settings.h index 24c7147a40..d1de99d067 100644 --- a/include/board_design_settings.h +++ b/include/board_design_settings.h @@ -49,8 +49,15 @@ #define DEFAULT_PCB_EDGE_THICKNESS 0.15 -#define DEFAULT_SOLDERMASK_CLEARANCE 0.051 // soldermask to pad clearance -#define DEFAULT_SOLDERMASK_MIN_WIDTH 0.25 // soldermask minimum dam size +#define DEFAULT_SOLDERMASK_CLEARANCE 0.05 // soldermask to pad clearance + +// DEFAULT_SOLDERMASK_MIN_WIDTH is only used in Gerber files: soldermask minimum size. +// Set to 0, because using non 0 value creates an annoying issue in Gerber files: +// pads are no longer identified as pads (Flashed items or regions) +// Therefore solder mask min width must be used only in specific cases +// for instance for home made boards +#define DEFAULT_SOLDERMASK_MIN_WIDTH 0.0 + #define DEFAULT_SOLDERPASTE_CLEARANCE 0.0 #define DEFAULT_SOLDERPASTE_RATIO 0.0 diff --git a/pcbnew/dialogs/panel_setup_mask_and_paste.cpp b/pcbnew/dialogs/panel_setup_mask_and_paste.cpp index 98be88866c..bee09f3698 100644 --- a/pcbnew/dialogs/panel_setup_mask_and_paste.cpp +++ b/pcbnew/dialogs/panel_setup_mask_and_paste.cpp @@ -39,15 +39,6 @@ PANEL_SETUP_MASK_AND_PASTE::PANEL_SETUP_MASK_AND_PASTE( PAGED_DIALOG* aParent, { m_Frame = aFrame; m_BrdSettings = &m_Frame->GetBoard()->GetDesignSettings(); - - wxFont infoFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ); - infoFont.SetSymbolicSize( wxFONTSIZE_SMALL ); - m_staticTextInfoCopper->SetFont( infoFont ); - m_staticTextInfoPaste->SetFont( infoFont ); - - infoFont.SetStyle( wxFONTSTYLE_ITALIC ); - m_staticTextInfoValPos->SetFont( infoFont ); - m_staticTextInfoValNeg->SetFont( infoFont ); } diff --git a/pcbnew/dialogs/panel_setup_mask_and_paste_base.cpp b/pcbnew/dialogs/panel_setup_mask_and_paste_base.cpp index 516a280d10..5d6d558ead 100644 --- a/pcbnew/dialogs/panel_setup_mask_and_paste_base.cpp +++ b/pcbnew/dialogs/panel_setup_mask_and_paste_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version Jul 10 2019) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -22,16 +22,31 @@ PANEL_SETUP_MASK_AND_PASTE_BASE::PANEL_SETUP_MASK_AND_PASTE_BASE( wxWindow* pare m_staticTextInfoValPos = new wxStaticText( this, wxID_ANY, _("Positive clearance means area bigger than the pad (usual for mask clearance)."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextInfoValPos->Wrap( 500 ); - m_staticTextInfoValPos->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + m_staticTextInfoValPos->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); bMessages->Add( m_staticTextInfoValPos, 0, wxBOTTOM, 5 ); m_staticTextInfoValNeg = new wxStaticText( this, wxID_ANY, _("Negative clearance means area smaller than the pad (usual for paste clearance)."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextInfoValNeg->Wrap( 500 ); - m_staticTextInfoValNeg->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + m_staticTextInfoValNeg->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); bMessages->Add( m_staticTextInfoValNeg, 0, wxBOTTOM, 12 ); + wxBoxSizer* bSizer4; + bSizer4 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapWarning = new wxStaticBitmap( this, wxID_ANY, wxArtProvider::GetBitmap( wxART_WARNING, wxART_OTHER ), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer4->Add( m_bitmapWarning, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextInfoMaskMinWidth = new wxStaticText( this, wxID_ANY, _("Note: Set Solder mask minimum width to 0,\nunless your board house ask for a specific value"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextInfoMaskMinWidth->Wrap( -1 ); + m_staticTextInfoMaskMinWidth->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + + bSizer4->Add( m_staticTextInfoMaskMinWidth, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bMessages->Add( bSizer4, 1, wxEXPAND, 5 ); + bSizer3->Add( bMessages, 0, wxEXPAND|wxALL, 5 ); @@ -56,7 +71,7 @@ PANEL_SETUP_MASK_AND_PASTE_BASE::PANEL_SETUP_MASK_AND_PASTE_BASE( wxWindow* pare m_MaskMinWidthLabel = new wxStaticText( this, wxID_ANY, _("Solder mask minimum width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_MaskMinWidthLabel->Wrap( -1 ); - m_MaskMinWidthLabel->SetToolTip( _("Min dist between 2 pad areas.\nTwo pad areas nearer than this value will be merged during plotting.\nThis parameter is used only to plot solder mask layers.") ); + m_MaskMinWidthLabel->SetToolTip( _("Min dist between 2 pad areas.\nTwo pad areas nearer than this value will be merged during plotting.\nThis parameter is used only to plot solder mask layers.\nLeave it to 0, unless you know what you are doing.") ); fgGridSolderMaskSizer->Add( m_MaskMinWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); @@ -110,13 +125,13 @@ PANEL_SETUP_MASK_AND_PASTE_BASE::PANEL_SETUP_MASK_AND_PASTE_BASE( wxWindow* pare m_staticTextInfoCopper = new wxStaticText( this, wxID_ANY, _("Note: solder mask and paste values are used only for pads on copper layers."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextInfoCopper->Wrap( -1 ); - m_staticTextInfoCopper->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + m_staticTextInfoCopper->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); bSizer3->Add( m_staticTextInfoCopper, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_staticTextInfoPaste = new wxStaticText( this, wxID_ANY, _("Note: solder paste clearances (absolute and relative) are added to determine the final clearance."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextInfoPaste->Wrap( -1 ); - m_staticTextInfoPaste->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + m_staticTextInfoPaste->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); bSizer3->Add( m_staticTextInfoPaste, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); diff --git a/pcbnew/dialogs/panel_setup_mask_and_paste_base.fbp b/pcbnew/dialogs/panel_setup_mask_and_paste_base.fbp index e8ffb03aa6..ee10a68bc2 100644 --- a/pcbnew/dialogs/panel_setup_mask_and_paste_base.fbp +++ b/pcbnew/dialogs/panel_setup_mask_and_paste_base.fbp @@ -14,6 +14,7 @@ panel_setup_mask_and_paste_base 1000 none + 1 panel_setup_mask_and_paste_base @@ -25,6 +26,7 @@ 1 1 UI + 0 1 0 @@ -100,7 +102,7 @@ 1 1 - ,93,90,11,70,0 + ,93,90,-1,70,0 0 0 wxID_ANY @@ -161,7 +163,7 @@ 1 1 - ,93,90,11,70,0 + ,93,90,-1,70,0 0 0 wxID_ANY @@ -194,6 +196,136 @@ 500 + + 5 + wxEXPAND + 1 + + + bSizer4 + wxHORIZONTAL + none + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From Art Provider; wxART_WARNING; wxART_OTHER + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_bitmapWarning + 1 + + + protected + 1 + + Resizable + 1 + + ; ; forward_declare + 0 + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,93,90,-1,70,0 + 0 + 0 + wxID_ANY + Note: Set Solder mask minimum width to 0, unless your board house ask for a specific value + 0 + + 0 + + + 0 + + 1 + m_staticTextInfoMaskMinWidth + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + @@ -452,7 +584,7 @@ 0 - Min dist between 2 pad areas. Two pad areas nearer than this value will be merged during plotting. This parameter is used only to plot solder mask layers. + Min dist between 2 pad areas. Two pad areas nearer than this value will be merged during plotting. This parameter is used only to plot solder mask layers. Leave it to 0, unless you know what you are doing. @@ -1026,7 +1158,7 @@ 1 1 - ,90,90,12,70,0 + ,90,90,-1,70,0 0 0 wxID_ANY @@ -1087,7 +1219,7 @@ 1 1 - ,90,90,12,70,0 + ,90,90,-1,70,0 0 0 wxID_ANY diff --git a/pcbnew/dialogs/panel_setup_mask_and_paste_base.h b/pcbnew/dialogs/panel_setup_mask_and_paste_base.h index ad5ddf2a32..00978b3369 100644 --- a/pcbnew/dialogs/panel_setup_mask_and_paste_base.h +++ b/pcbnew/dialogs/panel_setup_mask_and_paste_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version Jul 10 2019) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -16,6 +16,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -32,6 +36,8 @@ class PANEL_SETUP_MASK_AND_PASTE_BASE : public wxPanel protected: wxStaticText* m_staticTextInfoValPos; wxStaticText* m_staticTextInfoValNeg; + wxStaticBitmap* m_bitmapWarning; + wxStaticText* m_staticTextInfoMaskMinWidth; wxStaticText* m_MaskMarginLabel; wxTextCtrl* m_MaskMarginCtrl; wxStaticText* m_MaskMarginUnits;