diff --git a/ViaStitching/FillAreaAction.py b/ViaStitching/FillAreaAction.py index ca4e70d..71795e6 100644 --- a/ViaStitching/FillAreaAction.py +++ b/ViaStitching/FillAreaAction.py @@ -57,6 +57,7 @@ class FillAreaAction(pcbnew.ActionPlugin): #a.m_Netname.SetValue("GND") a.m_ClearanceMM.SetValue("0.2") a.m_Star.SetValue(True) + a.m_bitmapStitching.SetBitmap(wx.Bitmap( os.path.join(os.path.dirname(os.path.realpath(__file__)), "stitching-vias-help.png") ) ) self.board = pcbnew.GetBoard() PopulateNets("GND",a) modal_result = a.ShowModal() diff --git a/ViaStitching/FillAreaDialog.py b/ViaStitching/FillAreaDialog.py index e19dea1..e9bf029 100644 --- a/ViaStitching/FillAreaDialog.py +++ b/ViaStitching/FillAreaDialog.py @@ -1,10 +1,10 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- ########################################################################### -## Python code generated with wxFormBuilder (version Dec 21 2016) +## Python code generated with wxFormBuilder (version Oct 26 2018) ## http://www.wxformbuilder.org/ ## -## PLEASE DO "NOT" EDIT THIS FILE! +## PLEASE DO *NOT* EDIT THIS FILE! ########################################################################### import wx @@ -15,126 +15,142 @@ import wx.xrc ########################################################################### class FillAreaDialog ( wx.Dialog ): - + def __init__( self, parent ): - wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"Fill Area parameters", pos = wx.DefaultPosition, size = wx.Size( 402,487 ), style = wx.DEFAULT_DIALOG_STYLE ) - + wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"Fill Area parameters", pos = wx.DefaultPosition, size = wx.Size( 402,510 ), style = wx.DEFAULT_DIALOG_STYLE ) + import sys if sys.version_info[0] == 2: self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize ) else: self.SetSizeHints( wx.DefaultSize, wx.DefaultSize ) - #self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize ) - + bSizer3 = wx.BoxSizer( wx.VERTICAL ) - + fgSizer1 = wx.FlexGridSizer( 0, 2, 0, 0 ) fgSizer1.SetFlexibleDirection( wx.BOTH ) fgSizer1.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) - - self.m_staticText3 = wx.StaticText( self, wx.ID_ANY, u"Via copper size", wx.DefaultPosition, wx.DefaultSize, 0 ) + + self.m_staticText3 = wx.StaticText( self, wx.ID_ANY, u"Via copper size (mm)", wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText3.Wrap( -1 ) + fgSizer1.Add( self.m_staticText3, 1, wx.ALL|wx.EXPAND, 5 ) - + self.m_SizeMM = wx.TextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_SizeMM.SetMinSize( wx.Size( 1000,-1 ) ) - + fgSizer1.Add( self.m_SizeMM, 1, wx.ALL|wx.EXPAND, 5 ) - - self.m_staticText9 = wx.StaticText( self, wx.ID_ANY, u"Via drill size", wx.DefaultPosition, wx.DefaultSize, 0 ) + + self.m_staticText9 = wx.StaticText( self, wx.ID_ANY, u"Via drill size (mm)", wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText9.Wrap( -1 ) + fgSizer1.Add( self.m_staticText9, 1, wx.ALL|wx.EXPAND, 5 ) - + self.m_DrillMM = wx.TextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) fgSizer1.Add( self.m_DrillMM, 1, wx.ALL|wx.EXPAND, 5 ) - - self.m_staticText5 = wx.StaticText( self, wx.ID_ANY, u"Via clearance", wx.DefaultPosition, wx.DefaultSize, 0 ) + + self.m_staticText5 = wx.StaticText( self, wx.ID_ANY, u"Via clearance (mm)", wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText5.Wrap( -1 ) + fgSizer1.Add( self.m_staticText5, 1, wx.ALL|wx.EXPAND, 5 ) - + self.m_ClearanceMM = wx.TextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) fgSizer1.Add( self.m_ClearanceMM, 1, wx.ALL|wx.EXPAND, 5 ) - + + self.m_staticText2 = wx.StaticText( self, wx.ID_ANY, u"Via grid (mm)", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText2.Wrap( -1 ) + + fgSizer1.Add( self.m_staticText2, 0, wx.ALL, 5 ) + + self.m_StepMM = wx.TextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + fgSizer1.Add( self.m_StepMM, 1, wx.ALL|wx.EXPAND, 5 ) + + + fgSizer1.Add( ( 0, 0), 1, wx.EXPAND, 5 ) + + self.m_bitmapStitching = wx.StaticBitmap( self, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.DefaultSize, 0 ) + fgSizer1.Add( self.m_bitmapStitching, 0, wx.EXPAND, 5 ) + self.m_staticText6 = wx.StaticText( self, wx.ID_ANY, u"Net name", wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText6.Wrap( -1 ) + fgSizer1.Add( self.m_staticText6, 1, wx.ALL|wx.EXPAND, 5 ) - + m_cbNetChoices = [] self.m_cbNet = wx.ComboBox( self, wx.ID_ANY, u"GND", wx.DefaultPosition, wx.DefaultSize, m_cbNetChoices, 0 ) fgSizer1.Add( self.m_cbNet, 0, wx.ALL, 5 ) - - self.m_staticText2 = wx.StaticText( self, wx.ID_ANY, u"Step between via", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText2.Wrap( -1 ) - fgSizer1.Add( self.m_staticText2, 0, wx.ALL, 5 ) - - self.m_StepMM = wx.TextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) - fgSizer1.Add( self.m_StepMM, 1, wx.ALL|wx.EXPAND, 5 ) - + self.m_staticText7 = wx.StaticText( self, wx.ID_ANY, u"Debug mode", wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText7.Wrap( -1 ) + fgSizer1.Add( self.m_staticText7, 1, wx.ALL|wx.EXPAND, 5 ) - + self.m_Debug = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) fgSizer1.Add( self.m_Debug, 1, wx.ALL|wx.EXPAND, 5 ) - + self.m_staticText8 = wx.StaticText( self, wx.ID_ANY, u"Random it", wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText8.Wrap( -1 ) + fgSizer1.Add( self.m_staticText8, 0, wx.ALL, 5 ) - + self.m_Random = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) fgSizer1.Add( self.m_Random, 0, wx.ALL, 5 ) - + self.m_staticText42 = wx.StaticText( self, wx.ID_ANY, u"Star Pattern", wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText42.Wrap( -1 ) + fgSizer1.Add( self.m_staticText42, 0, wx.ALL, 5 ) - + self.m_Star = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) fgSizer1.Add( self.m_Star, 0, wx.ALL, 5 ) - + self.m_staticText81 = wx.StaticText( self, wx.ID_ANY, u"Only under selected Zone", wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText81.Wrap( -1 ) + fgSizer1.Add( self.m_staticText81, 0, wx.ALL, 5 ) - + self.m_only_selected = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) fgSizer1.Add( self.m_only_selected, 0, wx.ALL, 5 ) - - + + bSizer3.Add( fgSizer1, 1, wx.EXPAND, 5 ) - + bSizer1 = wx.BoxSizer( wx.HORIZONTAL ) - + self.m_staticText101 = wx.StaticText( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText101.Wrap( -1 ) + bSizer1.Add( self.m_staticText101, 1, wx.ALL, 5 ) - + self.m_button1 = wx.Button( self, wx.ID_OK, u"Run", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_button1.SetDefault() + + self.m_button1.SetDefault() bSizer1.Add( self.m_button1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - + self.m_button2 = wx.Button( self, wx.ID_CANCEL, u"Cancel", wx.DefaultPosition, wx.DefaultSize, 0 ) bSizer1.Add( self.m_button2, 0, wx.ALL, 5 ) - + self.m_button3_delete = wx.Button( self, wx.ID_DELETE, u"Delete Vias", wx.DefaultPosition, wx.DefaultSize, 0 ) bSizer1.Add( self.m_button3_delete, 0, wx.ALL, 5 ) - - + + bSizer3.Add( bSizer1, 0, wx.EXPAND|wx.ALIGN_RIGHT, 5 ) - - + + self.SetSizer( bSizer3 ) self.Layout() - + self.Centre( wx.BOTH ) - + # Connect Events self.m_button3_delete.Bind( wx.EVT_BUTTON, self.onDeleteClick ) - + def __del__( self ): pass - - + + # Virtual event handlers, overide them in your derived class def onDeleteClick( self, event ): event.Skip() - + diff --git a/ViaStitching/FillAreaTpl.fbp b/ViaStitching/FillAreaTpl.fbp index 0780cee..d1a129d 100644 --- a/ViaStitching/FillAreaTpl.fbp +++ b/ViaStitching/FillAreaTpl.fbp @@ -1,6 +1,6 @@ - + Python @@ -14,6 +14,7 @@ FillAreaDialog 1000 none + 0 FillAreaDialog @@ -44,7 +45,7 @@ FillAreaDialog - 402,487 + 402,510 wxDEFAULT_DIALOG_STYLE Fill Area parameters @@ -52,42 +53,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bSizer3 @@ -141,7 +106,8 @@ 0 0 wxID_ANY - Via copper size + Via copper size (mm) + 0 0 @@ -167,29 +133,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -254,33 +197,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -315,7 +231,8 @@ 0 0 wxID_ANY - Via drill size + Via drill size (mm) + 0 0 @@ -341,29 +258,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -428,33 +322,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -489,7 +356,8 @@ 0 0 wxID_ANY - Via clearance + Via clearance (mm) + 0 0 @@ -515,29 +383,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -602,33 +447,199 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Via grid (mm) + 0 + + 0 + + + 0 + + 1 + m_staticText2 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_StepMM + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_bitmapStitching + 1 + + + protected + 1 + + Resizable + 1 + + ; ; forward_declare + 0 + + + + @@ -664,6 +675,7 @@ 0 wxID_ANY Net name + 0 0 @@ -689,29 +701,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -777,208 +766,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Step between via - - 0 - - - 0 - - 1 - m_staticText2 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_StepMM - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1014,6 +801,7 @@ 0 wxID_ANY Debug mode + 0 0 @@ -1039,29 +827,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -1126,30 +891,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -1185,6 +926,7 @@ 0 wxID_ANY Random it + 0 0 @@ -1210,29 +952,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -1297,30 +1016,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -1356,6 +1051,7 @@ 0 wxID_ANY Star Pattern + 0 0 @@ -1381,29 +1077,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -1468,30 +1141,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -1527,6 +1176,7 @@ 0 wxID_ANY Only under selected Zone + 0 0 @@ -1552,29 +1202,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -1639,30 +1266,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -1709,6 +1312,7 @@ 0 wxID_ANY + 0 0 @@ -1734,29 +1338,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -1774,25 +1355,31 @@ + 1 0 0 1 + 1 0 + Dock 0 Left 1 1 + 0 0 wxID_OK Run + + 0 0 @@ -1807,6 +1394,8 @@ protected 1 + + Resizable 1 @@ -1821,30 +1410,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -1862,25 +1427,31 @@ + 1 0 1 1 + 0 0 + Dock 0 Left 1 1 + 0 0 wxID_CANCEL Cancel + + 0 0 @@ -1895,6 +1466,8 @@ protected 1 + + Resizable 1 @@ -1909,30 +1482,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -1950,25 +1499,31 @@ + 1 0 1 1 + 0 0 + Dock 0 Left 1 1 + 0 0 wxID_DELETE Delete Vias + + 0 0 @@ -1983,6 +1538,8 @@ protected 1 + + Resizable 1 @@ -1998,29 +1555,6 @@ onDeleteClick - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ViaStitching/stitching-vias-help.png b/ViaStitching/stitching-vias-help.png new file mode 100644 index 0000000..9ac059c Binary files /dev/null and b/ViaStitching/stitching-vias-help.png differ diff --git a/ViaStitching/stitching-vias-help.svg b/ViaStitching/stitching-vias-help.svg new file mode 100644 index 0000000..0eaafb6 --- /dev/null +++ b/ViaStitching/stitching-vias-help.svg @@ -0,0 +1,240 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + d +