← Back to team overview

kicad-developers team mailing list archive

[RFC]: New non copper pad paste and mask clearances behavior (was: What are the smallest values for pad paste and mask clearances)

 

Hi All,

Dick Hollenbeck ( who wrote a lot of code for Kicad) proposed to use global mask margin values only
for pad at least on a copper layer.

(I am thinking this is also what was expected by some of guys)

Attached, a patch to use global mask settings only for pads on copper layers to build the mask shape
(solder or paste layer) of the pad.

Therefore pads *only* on a solder or paste layer are no longer affected by global settings.
(The drawback is a change in the behavior of previous Pcbnew versions, but it should not impact a
lot of old boards or old footprints)

The change in code is very small.

I added a info message in dialogs, in the pad clearance setup sub-window to explain the purpose of
this setting.
This is perhaps the main problem, because a message in a dialog must be short, and yet understandable...
The info messages are not perfect.

Please, test it.

-- 
Jean-Pierre CHARRAS
From 3fde6b1978fda791c6f21017967bce5a0391a720 Mon Sep 17 00:00:00 2001
From: jean-pierre charras <jp.charras@xxxxxxxxxx>
Date: Wed, 2 May 2018 10:31:10 +0200
Subject: [PATCH] mask clearances: use global clearances only for pads on
 copper layers.

---
 pcbnew/class_pad.cpp                               | 68 +++++++++++------
 pcbnew/class_pad.h                                 | 26 ++++---
 .../dialog_edit_footprint_for_BoardEditor_base.cpp | 10 ++-
 .../dialog_edit_footprint_for_BoardEditor_base.fbp | 84 +++++++++++++++++++-
 .../dialog_edit_footprint_for_BoardEditor_base.h   |  6 +-
 .../dialog_edit_footprint_for_fp_editor_base.cpp   | 10 ++-
 .../dialog_edit_footprint_for_fp_editor_base.fbp   | 84 +++++++++++++++++++-
 .../dialog_edit_footprint_for_fp_editor_base.h     |  6 +-
 pcbnew/dialogs/dialog_mask_clearance_base.cpp      | 15 ++--
 pcbnew/dialogs/dialog_mask_clearance_base.fbp      | 89 +++++++++++++++++++++-
 pcbnew/dialogs/dialog_mask_clearance_base.h        |  9 ++-
 pcbnew/dialogs/dialog_pad_properties_base.cpp      | 10 +--
 pcbnew/dialogs/dialog_pad_properties_base.fbp      |  7 +-
 pcbnew/dialogs/dialog_pad_properties_base.h        |  6 +-
 14 files changed, 364 insertions(+), 66 deletions(-)

diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp
index 75540aa..58998ff 100644
--- a/pcbnew/class_pad.cpp
+++ b/pcbnew/class_pad.cpp
@@ -1,9 +1,9 @@
 /*
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
- * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
  * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@xxxxxxxxxxx>
-  * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
+  * Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -577,20 +577,30 @@ int D_PAD::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const
 int D_PAD::GetSolderMaskMargin() const
 {
     int     margin = m_LocalSolderMaskMargin;
-    MODULE* module = GetParent();
 
-    if( module )
+    // The pad inherits the margin only to calculate a default shape,
+    // therefore only if it is also a copper layer
+    // Pads defined only on mask layers (and perhaps on other tech layers) use the shape
+    // defined by the pad settings only
+    bool isOnCopperLayer = ( m_layerMask & LSET::AllCuMask() ).any();
+
+    if( isOnCopperLayer )
     {
-        if( margin == 0 )
-        {
-            if( module->GetLocalSolderMaskMargin() )
-                margin = module->GetLocalSolderMaskMargin();
-        }
+        MODULE* module = GetParent();
 
-        if( margin == 0 )
+        if( module )
         {
-            BOARD* brd = GetBoard();
-            margin = brd->GetDesignSettings().m_SolderMaskMargin;
+            if( margin == 0 )
+            {
+                if( module->GetLocalSolderMaskMargin() )
+                    margin = module->GetLocalSolderMaskMargin();
+            }
+
+            if( margin == 0 )
+            {
+                BOARD* brd = GetBoard();
+                margin = brd->GetDesignSettings().m_SolderMaskMargin;
+            }
         }
     }
 
@@ -611,24 +621,34 @@ wxSize D_PAD::GetSolderPasteMargin() const
 {
     int     margin = m_LocalSolderPasteMargin;
     double  mratio = m_LocalSolderPasteMarginRatio;
-    MODULE* module = GetParent();
 
-    if( module )
+    // The pad inherits the margin only to calculate a default shape,
+    // therefore only if it is also a copper layer.
+    // Pads defined only on mask layers (and perhaps on other tech layers) use the shape
+    // defined by the pad settings only
+    bool isOnCopperLayer = ( m_layerMask & LSET::AllCuMask() ).any();
+
+    if( isOnCopperLayer )
     {
-        if( margin == 0 )
-            margin = module->GetLocalSolderPasteMargin();
+    MODULE* module = GetParent();
 
-        BOARD * brd = GetBoard();
+        if( module )
+        {
+            if( margin == 0 )
+                margin = module->GetLocalSolderPasteMargin();
 
-        if( margin == 0 )
-            margin = brd->GetDesignSettings().m_SolderPasteMargin;
+            BOARD * brd = GetBoard();
 
-        if( mratio == 0.0 )
-            mratio = module->GetLocalSolderPasteMarginRatio();
+            if( margin == 0 )
+                margin = brd->GetDesignSettings().m_SolderPasteMargin;
 
-        if( mratio == 0.0 )
-        {
-            mratio = brd->GetDesignSettings().m_SolderPasteMarginRatio;
+            if( mratio == 0.0 )
+                mratio = module->GetLocalSolderPasteMarginRatio();
+
+            if( mratio == 0.0 )
+            {
+                mratio = brd->GetDesignSettings().m_SolderPasteMarginRatio;
+            }
         }
     }
 
diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h
index 7eeb289..e251304 100644
--- a/pcbnew/class_pad.h
+++ b/pcbnew/class_pad.h
@@ -1,8 +1,8 @@
 /*
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
- * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
- * Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -454,23 +454,29 @@ public:
      * Function GetSolderMaskMargin
      * @return the margin for the solder mask layer
      * usually > 0 (mask shape bigger than pad
-     * value is
+     * For pads also on copper layers, the value (used to build a default shape) is
      * 1 - the local value
-     * 2 - if null, the parent footprint value
-     * 1 - if null, the global value
+     * 2 - if 0, the parent footprint value
+     * 3 - if 0, the global value
+     * For pads NOT on copper layers, the value is the local value because there is
+     * not default shape to build
      */
     int GetSolderMaskMargin() const;
 
     /**
      * Function GetSolderPasteMargin
      * @return the margin for the solder mask layer
-     * usually < 0 (mask shape smaller than pad
+     * usually < 0 (mask shape smaller than pad)
      * because the margin can be dependent on the pad size, the margin has a x and a y value
-     * value is
+     *
+     * For pads also on copper layers, the value (used to build a default shape) is
      * 1 - the local value
-     * 2 - if null, the parent footprint value
-     * 1 - if null, the global value
-     */
+     * 2 - if 0, the parent footprint value
+     * 3 - if 0, the global value
+     *
+     * For pads NOT on copper layers, the value is the local value because there is
+     * not default shape to build
+    */
     wxSize GetSolderPasteMargin() const;
 
     void SetZoneConnection( ZoneConnection aType ) { m_ZoneConnection = aType; }
diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.cpp b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.cpp
index c46ae36..5c3a5fb 100644
--- a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.cpp
+++ b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.cpp
@@ -1,8 +1,8 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Apr 19 2018)
+// C++ code generated with wxFormBuilder (version Aug  4 2017)
 // http://www.wxformbuilder.org/
 //
-// PLEASE DO *NOT* EDIT THIS FILE!
+// PLEASE DO "NOT" EDIT THIS FILE!
 ///////////////////////////////////////////////////////////////////////////
 
 #include "widgets/text_ctrl_eval.h"
@@ -230,6 +230,12 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow
 	
 	bSizer11->Add( m_staticTextInfoValNeg, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
 	
+	m_staticTextInfo2 = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("These values are used only to build the mask shape\nof pads on copper layers"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextInfo2->Wrap( -1 );
+	m_staticTextInfo2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+	
+	bSizer11->Add( m_staticTextInfo2, 0, wxALL, 5 );
+	
 	
 	sbSizerLocalProperties->Add( bSizer11, 0, wxEXPAND, 5 );
 	
diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.fbp b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.fbp
index 0adb42e..55d26de 100644
--- a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.fbp
+++ b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.fbp
@@ -14,7 +14,6 @@
         <property name="file">dialog_edit_footprint_for_BoardEditor_base</property>
         <property name="first_id">1000</property>
         <property name="help_provider">none</property>
-        <property name="indent_with_spaces"></property>
         <property name="internationalize">1</property>
         <property name="name">dialog_edit_footprint_for_BoardEditor_base</property>
         <property name="namespace"></property>
@@ -3306,6 +3305,89 @@
                                                                     <event name="OnUpdateUI"></event>
                                                                 </object>
                                                             </object>
+                                                            <object class="sizeritem" expanded="1">
+                                                                <property name="border">5</property>
+                                                                <property name="flag">wxALL</property>
+                                                                <property name="proportion">0</property>
+                                                                <object class="wxStaticText" expanded="1">
+                                                                    <property name="BottomDockable">1</property>
+                                                                    <property name="LeftDockable">1</property>
+                                                                    <property name="RightDockable">1</property>
+                                                                    <property name="TopDockable">1</property>
+                                                                    <property name="aui_layer"></property>
+                                                                    <property name="aui_name"></property>
+                                                                    <property name="aui_position"></property>
+                                                                    <property name="aui_row"></property>
+                                                                    <property name="best_size"></property>
+                                                                    <property name="bg"></property>
+                                                                    <property name="caption"></property>
+                                                                    <property name="caption_visible">1</property>
+                                                                    <property name="center_pane">0</property>
+                                                                    <property name="close_button">1</property>
+                                                                    <property name="context_help"></property>
+                                                                    <property name="context_menu">1</property>
+                                                                    <property name="default_pane">0</property>
+                                                                    <property name="dock">Dock</property>
+                                                                    <property name="dock_fixed">0</property>
+                                                                    <property name="docking">Left</property>
+                                                                    <property name="enabled">1</property>
+                                                                    <property name="fg"></property>
+                                                                    <property name="floatable">1</property>
+                                                                    <property name="font">,90,92,-1,70,0</property>
+                                                                    <property name="gripper">0</property>
+                                                                    <property name="hidden">0</property>
+                                                                    <property name="id">wxID_ANY</property>
+                                                                    <property name="label">These values are used only to build the mask shape&#x0A;of pads on copper layers</property>
+                                                                    <property name="max_size"></property>
+                                                                    <property name="maximize_button">0</property>
+                                                                    <property name="maximum_size"></property>
+                                                                    <property name="min_size"></property>
+                                                                    <property name="minimize_button">0</property>
+                                                                    <property name="minimum_size"></property>
+                                                                    <property name="moveable">1</property>
+                                                                    <property name="name">m_staticTextInfo2</property>
+                                                                    <property name="pane_border">1</property>
+                                                                    <property name="pane_position"></property>
+                                                                    <property name="pane_size"></property>
+                                                                    <property name="permission">protected</property>
+                                                                    <property name="pin_button">1</property>
+                                                                    <property name="pos"></property>
+                                                                    <property name="resize">Resizable</property>
+                                                                    <property name="show">1</property>
+                                                                    <property name="size"></property>
+                                                                    <property name="style"></property>
+                                                                    <property name="subclass"></property>
+                                                                    <property name="toolbar_pane">0</property>
+                                                                    <property name="tooltip"></property>
+                                                                    <property name="window_extra_style"></property>
+                                                                    <property name="window_name"></property>
+                                                                    <property name="window_style"></property>
+                                                                    <property name="wrap">-1</property>
+                                                                    <event name="OnChar"></event>
+                                                                    <event name="OnEnterWindow"></event>
+                                                                    <event name="OnEraseBackground"></event>
+                                                                    <event name="OnKeyDown"></event>
+                                                                    <event name="OnKeyUp"></event>
+                                                                    <event name="OnKillFocus"></event>
+                                                                    <event name="OnLeaveWindow"></event>
+                                                                    <event name="OnLeftDClick"></event>
+                                                                    <event name="OnLeftDown"></event>
+                                                                    <event name="OnLeftUp"></event>
+                                                                    <event name="OnMiddleDClick"></event>
+                                                                    <event name="OnMiddleDown"></event>
+                                                                    <event name="OnMiddleUp"></event>
+                                                                    <event name="OnMotion"></event>
+                                                                    <event name="OnMouseEvents"></event>
+                                                                    <event name="OnMouseWheel"></event>
+                                                                    <event name="OnPaint"></event>
+                                                                    <event name="OnRightDClick"></event>
+                                                                    <event name="OnRightDown"></event>
+                                                                    <event name="OnRightUp"></event>
+                                                                    <event name="OnSetFocus"></event>
+                                                                    <event name="OnSize"></event>
+                                                                    <event name="OnUpdateUI"></event>
+                                                                </object>
+                                                            </object>
                                                         </object>
                                                     </object>
                                                     <object class="sizeritem" expanded="1">
diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.h b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.h
index 2b97e6d..b97e533 100644
--- a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.h
+++ b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.h
@@ -1,8 +1,8 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Apr 19 2018)
+// C++ code generated with wxFormBuilder (version Aug  4 2017)
 // http://www.wxformbuilder.org/
 //
-// PLEASE DO *NOT* EDIT THIS FILE!
+// PLEASE DO "NOT" EDIT THIS FILE!
 ///////////////////////////////////////////////////////////////////////////
 
 #ifndef __DIALOG_EDIT_FOOTPRINT_FOR_BOARDEDITOR_BASE_H__
@@ -11,6 +11,7 @@
 #include <wx/artprov.h>
 #include <wx/xrc/xmlres.h>
 #include <wx/intl.h>
+class DIALOG_SHIM;
 class TEXT_CTRL_EVAL;
 
 #include "dialog_shim.h"
@@ -91,6 +92,7 @@ class DIALOG_FOOTPRINT_BOARD_EDITOR_BASE : public DIALOG_SHIM
 		wxStaticText* m_staticTextInfo;
 		wxStaticText* m_staticTextInfoValPos;
 		wxStaticText* m_staticTextInfoValNeg;
+		wxStaticText* m_staticTextInfo2;
 		wxStaticText* m_staticTextNetClearance;
 		TEXT_CTRL_EVAL* m_NetClearanceValueCtrl;
 		wxStaticText* m_NetClearanceUnits;
diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.cpp b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.cpp
index 7b5f74b..de7070d 100644
--- a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.cpp
+++ b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.cpp
@@ -1,8 +1,8 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Apr 19 2018)
+// C++ code generated with wxFormBuilder (version Aug  4 2017)
 // http://www.wxformbuilder.org/
 //
-// PLEASE DO *NOT* EDIT THIS FILE!
+// PLEASE DO "NOT" EDIT THIS FILE!
 ///////////////////////////////////////////////////////////////////////////
 
 #include "widgets/text_ctrl_eval.h"
@@ -167,6 +167,12 @@ DIALOG_FOOTPRINT_FP_EDITOR_BASE::DIALOG_FOOTPRINT_FP_EDITOR_BASE( wxWindow* pare
 	
 	sbSizer8->Add( m_staticTextInfoValNeg, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
 	
+	m_staticTextInfo2 = new wxStaticText( sbSizer8->GetStaticBox(), wxID_ANY, _("These values are used only to build the mask shape\nof pads on copper layers"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextInfo2->Wrap( -1 );
+	m_staticTextInfo2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+	
+	sbSizer8->Add( m_staticTextInfo2, 0, wxALL, 5 );
+	
 	wxFlexGridSizer* fgSizer1;
 	fgSizer1 = new wxFlexGridSizer( 5, 3, 0, 0 );
 	fgSizer1->AddGrowableCol( 1 );
diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.fbp b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.fbp
index 8099393..9277ae5 100644
--- a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.fbp
+++ b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.fbp
@@ -14,7 +14,6 @@
         <property name="file">dialog_edit_footprint_for_fp_editor_base</property>
         <property name="first_id">1000</property>
         <property name="help_provider">none</property>
-        <property name="indent_with_spaces"></property>
         <property name="internationalize">1</property>
         <property name="name">dialog_edit_footprint_for_fp_editor_base</property>
         <property name="namespace"></property>
@@ -2417,6 +2416,89 @@
                                                             <event name="OnUpdateUI"></event>
                                                         </object>
                                                     </object>
+                                                    <object class="sizeritem" expanded="1">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxALL</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxStaticText" expanded="1">
+                                                            <property name="BottomDockable">1</property>
+                                                            <property name="LeftDockable">1</property>
+                                                            <property name="RightDockable">1</property>
+                                                            <property name="TopDockable">1</property>
+                                                            <property name="aui_layer"></property>
+                                                            <property name="aui_name"></property>
+                                                            <property name="aui_position"></property>
+                                                            <property name="aui_row"></property>
+                                                            <property name="best_size"></property>
+                                                            <property name="bg"></property>
+                                                            <property name="caption"></property>
+                                                            <property name="caption_visible">1</property>
+                                                            <property name="center_pane">0</property>
+                                                            <property name="close_button">1</property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="default_pane">0</property>
+                                                            <property name="dock">Dock</property>
+                                                            <property name="dock_fixed">0</property>
+                                                            <property name="docking">Left</property>
+                                                            <property name="enabled">1</property>
+                                                            <property name="fg"></property>
+                                                            <property name="floatable">1</property>
+                                                            <property name="font">,90,92,-1,70,0</property>
+                                                            <property name="gripper">0</property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="label">These values are used only to build the mask shape&#x0A;of pads on copper layers</property>
+                                                            <property name="max_size"></property>
+                                                            <property name="maximize_button">0</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="min_size"></property>
+                                                            <property name="minimize_button">0</property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="moveable">1</property>
+                                                            <property name="name">m_staticTextInfo2</property>
+                                                            <property name="pane_border">1</property>
+                                                            <property name="pane_position"></property>
+                                                            <property name="pane_size"></property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pin_button">1</property>
+                                                            <property name="pos"></property>
+                                                            <property name="resize">Resizable</property>
+                                                            <property name="show">1</property>
+                                                            <property name="size"></property>
+                                                            <property name="style"></property>
+                                                            <property name="subclass"></property>
+                                                            <property name="toolbar_pane">0</property>
+                                                            <property name="tooltip"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style"></property>
+                                                            <property name="wrap">-1</property>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnUpdateUI"></event>
+                                                        </object>
+                                                    </object>
                                                     <object class="sizeritem" expanded="0">
                                                         <property name="border">5</property>
                                                         <property name="flag">wxEXPAND</property>
diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.h b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.h
index d0263b7..764baad 100644
--- a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.h
+++ b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.h
@@ -1,8 +1,8 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Apr 19 2018)
+// C++ code generated with wxFormBuilder (version Aug  4 2017)
 // http://www.wxformbuilder.org/
 //
-// PLEASE DO *NOT* EDIT THIS FILE!
+// PLEASE DO "NOT" EDIT THIS FILE!
 ///////////////////////////////////////////////////////////////////////////
 
 #ifndef __DIALOG_EDIT_FOOTPRINT_FOR_FP_EDITOR_BASE_H__
@@ -11,6 +11,7 @@
 #include <wx/artprov.h>
 #include <wx/xrc/xmlres.h>
 #include <wx/intl.h>
+class DIALOG_SHIM;
 class TEXT_CTRL_EVAL;
 
 #include "dialog_shim.h"
@@ -76,6 +77,7 @@ class DIALOG_FOOTPRINT_FP_EDITOR_BASE : public DIALOG_SHIM
 		wxStaticText* m_staticTextInfo;
 		wxStaticText* m_staticTextInfoValPos;
 		wxStaticText* m_staticTextInfoValNeg;
+		wxStaticText* m_staticTextInfo2;
 		wxStaticText* m_staticTextNetClearance;
 		TEXT_CTRL_EVAL* m_NetClearanceValueCtrl;
 		wxStaticText* m_NetClearanceUnits;
diff --git a/pcbnew/dialogs/dialog_mask_clearance_base.cpp b/pcbnew/dialogs/dialog_mask_clearance_base.cpp
index ee133a5..b731fde 100644
--- a/pcbnew/dialogs/dialog_mask_clearance_base.cpp
+++ b/pcbnew/dialogs/dialog_mask_clearance_base.cpp
@@ -1,8 +1,8 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Nov 22 2017)
+// C++ code generated with wxFormBuilder (version Aug  4 2017)
 // http://www.wxformbuilder.org/
 //
-// PLEASE DO *NOT* EDIT THIS FILE!
+// PLEASE DO "NOT" EDIT THIS FILE!
 ///////////////////////////////////////////////////////////////////////////
 
 #include "dialog_mask_clearance_base.h"
@@ -24,9 +24,15 @@ DIALOG_PADS_MASK_CLEARANCE_BASE::DIALOG_PADS_MASK_CLEARANCE_BASE( wxWindow* pare
 	wxBoxSizer* bMainUpperSizer;
 	bMainUpperSizer = new wxBoxSizer( wxVERTICAL );
 	
-	m_staticTextInfo = new wxStaticText( this, wxID_ANY, _("Note: for clearance values:\n- a positive value means a mask bigger than a pad\n- a negative value means a mask smaller than a pad\n"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextInfo = new wxStaticText( this, wxID_ANY, _("Note: for clearance values:\n- a positive value means a mask bigger than a pad\n- a negative value means a mask smaller than a pad"), wxDefaultPosition, wxDefaultSize, 0 );
 	m_staticTextInfo->Wrap( -1 );
-	bMainUpperSizer->Add( m_staticTextInfo, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
+	bMainUpperSizer->Add( m_staticTextInfo, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+	
+	m_staticTextInfo2 = new wxStaticText( this, wxID_ANY, _("These global values are used only to build the mask shape\nof pads on copper layers"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextInfo2->Wrap( -1 );
+	m_staticTextInfo2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+	
+	bMainUpperSizer->Add( m_staticTextInfo2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
 	
 	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
 	bMainUpperSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
@@ -119,7 +125,6 @@ DIALOG_PADS_MASK_CLEARANCE_BASE::DIALOG_PADS_MASK_CLEARANCE_BASE( wxWindow* pare
 	
 	this->SetSizer( bMainSizer );
 	this->Layout();
-	bMainSizer->Fit( this );
 }
 
 DIALOG_PADS_MASK_CLEARANCE_BASE::~DIALOG_PADS_MASK_CLEARANCE_BASE()
diff --git a/pcbnew/dialogs/dialog_mask_clearance_base.fbp b/pcbnew/dialogs/dialog_mask_clearance_base.fbp
index 13ef67e..053fa67 100644
--- a/pcbnew/dialogs/dialog_mask_clearance_base.fbp
+++ b/pcbnew/dialogs/dialog_mask_clearance_base.fbp
@@ -44,7 +44,7 @@
             <property name="minimum_size"></property>
             <property name="name">DIALOG_PADS_MASK_CLEARANCE_BASE</property>
             <property name="pos"></property>
-            <property name="size">-1,-1</property>
+            <property name="size">393,332</property>
             <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
             <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
             <property name="title">Pads Mask Clearance</property>
@@ -104,7 +104,7 @@
                         <property name="permission">none</property>
                         <object class="sizeritem" expanded="1">
                             <property name="border">5</property>
-                            <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT</property>
+                            <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxALL</property>
                             <property name="proportion">0</property>
                             <object class="wxStaticText" expanded="1">
                                 <property name="BottomDockable">1</property>
@@ -134,7 +134,7 @@
                                 <property name="gripper">0</property>
                                 <property name="hidden">0</property>
                                 <property name="id">wxID_ANY</property>
-                                <property name="label">Note: for clearance values:&#x0A;- a positive value means a mask bigger than a pad&#x0A;- a negative value means a mask smaller than a pad&#x0A;</property>
+                                <property name="label">Note: for clearance values:&#x0A;- a positive value means a mask bigger than a pad&#x0A;- a negative value means a mask smaller than a pad</property>
                                 <property name="max_size"></property>
                                 <property name="maximize_button">0</property>
                                 <property name="maximum_size"></property>
@@ -187,6 +187,89 @@
                         </object>
                         <object class="sizeritem" expanded="1">
                             <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="1">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font">,90,92,-1,70,0</property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">These global values are used only to build the mask shape&#x0A;of pads on copper layers</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticTextInfo2</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
                             <property name="flag">wxEXPAND | wxALL</property>
                             <property name="proportion">0</property>
                             <object class="wxStaticLine" expanded="1">
diff --git a/pcbnew/dialogs/dialog_mask_clearance_base.h b/pcbnew/dialogs/dialog_mask_clearance_base.h
index cbbfa50..70448bb 100644
--- a/pcbnew/dialogs/dialog_mask_clearance_base.h
+++ b/pcbnew/dialogs/dialog_mask_clearance_base.h
@@ -1,8 +1,8 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Nov 22 2017)
+// C++ code generated with wxFormBuilder (version Aug  4 2017)
 // http://www.wxformbuilder.org/
 //
-// PLEASE DO *NOT* EDIT THIS FILE!
+// PLEASE DO "NOT" EDIT THIS FILE!
 ///////////////////////////////////////////////////////////////////////////
 
 #ifndef __DIALOG_MASK_CLEARANCE_BASE_H__
@@ -11,6 +11,8 @@
 #include <wx/artprov.h>
 #include <wx/xrc/xmlres.h>
 #include <wx/intl.h>
+class DIALOG_SHIM;
+
 #include "dialog_shim.h"
 #include <wx/string.h>
 #include <wx/stattext.h>
@@ -41,6 +43,7 @@ class DIALOG_PADS_MASK_CLEARANCE_BASE : public DIALOG_SHIM
 	
 	protected:
 		wxStaticText* m_staticTextInfo;
+		wxStaticText* m_staticTextInfo2;
 		wxStaticLine* m_staticline1;
 		wxStaticText* m_MaskClearanceTitle;
 		wxTextCtrl* m_SolderMaskMarginCtrl;
@@ -69,7 +72,7 @@ class DIALOG_PADS_MASK_CLEARANCE_BASE : public DIALOG_SHIM
 	
 	public:
 		
-		DIALOG_PADS_MASK_CLEARANCE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pads Mask Clearance"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); 
+		DIALOG_PADS_MASK_CLEARANCE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pads Mask Clearance"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 393,332 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); 
 		~DIALOG_PADS_MASK_CLEARANCE_BASE();
 	
 };
diff --git a/pcbnew/dialogs/dialog_pad_properties_base.cpp b/pcbnew/dialogs/dialog_pad_properties_base.cpp
index fd1eb59..dbe3667 100644
--- a/pcbnew/dialogs/dialog_pad_properties_base.cpp
+++ b/pcbnew/dialogs/dialog_pad_properties_base.cpp
@@ -1,8 +1,8 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Apr 19 2018)
+// C++ code generated with wxFormBuilder (version Aug  4 2017)
 // http://www.wxformbuilder.org/
 //
-// PLEASE DO *NOT* EDIT THIS FILE!
+// PLEASE DO "NOT" EDIT THIS FILE!
 ///////////////////////////////////////////////////////////////////////////
 
 #include "widgets/text_ctrl_eval.h"
@@ -392,7 +392,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
 	m_panelGeneral->SetSizer( bGeneralSizer );
 	m_panelGeneral->Layout();
 	bGeneralSizer->Fit( m_panelGeneral );
-	m_notebook->AddPage( m_panelGeneral, _("General"), true );
+	m_notebook->AddPage( m_panelGeneral, _("General"), false );
 	m_localSettingsPanel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 	wxBoxSizer* bSizerPanelClearance;
 	bSizerPanelClearance = new wxBoxSizer( wxVERTICAL );
@@ -400,7 +400,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
 	wxBoxSizer* bSizerClearance;
 	bSizerClearance = new wxBoxSizer( wxVERTICAL );
 	
-	m_staticTextWarning = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Set fields to 0 to use parent or global values"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextWarning = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Set fields to 0 to use parent or global values\nParent or global values are used only to build the mask shape\nof pads on copper layers"), wxDefaultPosition, wxDefaultSize, 0 );
 	m_staticTextWarning->Wrap( -1 );
 	m_staticTextWarning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
 	
@@ -575,7 +575,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
 	m_localSettingsPanel->SetSizer( bSizerPanelClearance );
 	m_localSettingsPanel->Layout();
 	bSizerPanelClearance->Fit( m_localSettingsPanel );
-	m_notebook->AddPage( m_localSettingsPanel, _("Local Clearance and Settings"), false );
+	m_notebook->AddPage( m_localSettingsPanel, _("Local Clearance and Settings"), true );
 	m_panelCustomShapePrimitives = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 	m_bSizerPanelPrimitives = new wxBoxSizer( wxVERTICAL );
 	
diff --git a/pcbnew/dialogs/dialog_pad_properties_base.fbp b/pcbnew/dialogs/dialog_pad_properties_base.fbp
index 5c38d6b..9fb4976 100644
--- a/pcbnew/dialogs/dialog_pad_properties_base.fbp
+++ b/pcbnew/dialogs/dialog_pad_properties_base.fbp
@@ -14,7 +14,6 @@
         <property name="file">dialog_pad_properties_base</property>
         <property name="first_id">1000</property>
         <property name="help_provider">none</property>
-        <property name="indent_with_spaces"></property>
         <property name="internationalize">1</property>
         <property name="name">dialog_pad_properties_base</property>
         <property name="namespace"></property>
@@ -188,7 +187,7 @@
                                 <object class="notebookpage" expanded="1">
                                     <property name="bitmap"></property>
                                     <property name="label">General</property>
-                                    <property name="select">1</property>
+                                    <property name="select">0</property>
                                     <object class="wxPanel" expanded="1">
                                         <property name="BottomDockable">1</property>
                                         <property name="LeftDockable">1</property>
@@ -6920,7 +6919,7 @@
                                 <object class="notebookpage" expanded="1">
                                     <property name="bitmap"></property>
                                     <property name="label">Local Clearance and Settings</property>
-                                    <property name="select">0</property>
+                                    <property name="select">1</property>
                                     <object class="wxPanel" expanded="1">
                                         <property name="BottomDockable">1</property>
                                         <property name="LeftDockable">1</property>
@@ -7041,7 +7040,7 @@
                                                             <property name="gripper">0</property>
                                                             <property name="hidden">0</property>
                                                             <property name="id">wxID_ANY</property>
-                                                            <property name="label">Set fields to 0 to use parent or global values</property>
+                                                            <property name="label">Set fields to 0 to use parent or global values&#x0A;Parent or global values are used only to build the mask shape&#x0A;of pads on copper layers</property>
                                                             <property name="max_size"></property>
                                                             <property name="maximize_button">0</property>
                                                             <property name="maximum_size"></property>
diff --git a/pcbnew/dialogs/dialog_pad_properties_base.h b/pcbnew/dialogs/dialog_pad_properties_base.h
index a80bc65..91bb882 100644
--- a/pcbnew/dialogs/dialog_pad_properties_base.h
+++ b/pcbnew/dialogs/dialog_pad_properties_base.h
@@ -1,8 +1,8 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Apr 19 2018)
+// C++ code generated with wxFormBuilder (version Aug  4 2017)
 // http://www.wxformbuilder.org/
 //
-// PLEASE DO *NOT* EDIT THIS FILE!
+// PLEASE DO "NOT" EDIT THIS FILE!
 ///////////////////////////////////////////////////////////////////////////
 
 #ifndef __DIALOG_PAD_PROPERTIES_BASE_H__
@@ -11,7 +11,9 @@
 #include <wx/artprov.h>
 #include <wx/xrc/xmlres.h>
 #include <wx/intl.h>
+class DIALOG_SHIM;
 class TEXT_CTRL_EVAL;
+class wxListView;
 
 #include "dialog_shim.h"
 #include <wx/string.h>
-- 
1.9.5.msysgit.1


Follow ups

References