Merge pull request #18 from easyw/master
allowing resizing of the dialog, getting Via default values from board
This commit is contained in:
@ -51,14 +51,20 @@ class FillAreaAction(pcbnew.ActionPlugin):
|
|||||||
|
|
||||||
def Run(self):
|
def Run(self):
|
||||||
a = FillAreaDialogEx(None)
|
a = FillAreaDialogEx(None)
|
||||||
a.m_SizeMM.SetValue("0.8")
|
#a.m_SizeMM.SetValue("0.8")
|
||||||
a.m_StepMM.SetValue("2.54")
|
a.m_StepMM.SetValue("2.54")
|
||||||
a.m_DrillMM.SetValue("0.3")
|
#a.m_DrillMM.SetValue("0.3")
|
||||||
#a.m_Netname.SetValue("GND")
|
#a.m_Netname.SetValue("GND")
|
||||||
a.m_ClearanceMM.SetValue("0.2")
|
#a.m_ClearanceMM.SetValue("0.2")
|
||||||
a.m_Star.SetValue(True)
|
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") ) )
|
a.m_bitmapStitching.SetBitmap(wx.Bitmap( os.path.join(os.path.dirname(os.path.realpath(__file__)), "stitching-vias-help.png") ) )
|
||||||
self.board = pcbnew.GetBoard()
|
self.board = pcbnew.GetBoard()
|
||||||
|
self.boardDesignSettings = self.board.GetDesignSettings()
|
||||||
|
a.m_SizeMM.SetValue(str(pcbnew.ToMM(self.boardDesignSettings.GetCurrentViaSize())))
|
||||||
|
a.m_DrillMM.SetValue(str(pcbnew.ToMM(self.boardDesignSettings.GetCurrentViaDrill())))
|
||||||
|
a.m_ClearanceMM.SetValue(str(pcbnew.ToMM(self.boardDesignSettings.GetDefault().GetClearance())))
|
||||||
|
a.SetMinSize(a.GetSize())
|
||||||
|
|
||||||
PopulateNets("GND",a)
|
PopulateNets("GND",a)
|
||||||
modal_result = a.ShowModal()
|
modal_result = a.ShowModal()
|
||||||
if modal_result == wx.ID_OK:
|
if modal_result == wx.ID_OK:
|
||||||
|
@ -17,7 +17,7 @@ import wx.xrc
|
|||||||
class FillAreaDialog ( wx.Dialog ):
|
class FillAreaDialog ( wx.Dialog ):
|
||||||
|
|
||||||
def __init__( self, parent ):
|
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,580 ), 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,580 ), style = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER )
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
if sys.version_info[0] == 2:
|
if sys.version_info[0] == 2:
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<property name="name">FillAreaDialog</property>
|
<property name="name">FillAreaDialog</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="size">402,580</property>
|
<property name="size">402,580</property>
|
||||||
<property name="style">wxDEFAULT_DIALOG_STYLE</property>
|
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass"></property>
|
||||||
<property name="title">Fill Area parameters</property>
|
<property name="title">Fill Area parameters</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.5 KiB |
@ -7,14 +7,14 @@
|
|||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
height="45.245544"
|
height="40.400002"
|
||||||
width="73.978897"
|
width="73.133354"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="svg2"
|
id="svg2"
|
||||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||||
sodipodi:docname="stitching-vias-help.svg"
|
sodipodi:docname="stitching-vias-help.svg"
|
||||||
viewBox="0 0 69.355216 42.417698"
|
viewBox="0 0 68.56252 37.875002"
|
||||||
inkscape:export-filename="C:\Users\userC\AppData\Roaming\kicad\scripting\plugins\ViaStitching\stitching-vias-help.png"
|
inkscape:export-filename="/home/mau/.kicad_plugins/ViaStitching/stitching-vias-help.png"
|
||||||
inkscape:export-xdpi="270.51999"
|
inkscape:export-xdpi="270.51999"
|
||||||
inkscape:export-ydpi="270.51999">
|
inkscape:export-ydpi="270.51999">
|
||||||
<metadata
|
<metadata
|
||||||
@ -38,24 +38,24 @@
|
|||||||
guidetolerance="10"
|
guidetolerance="10"
|
||||||
inkscape:pageopacity="0"
|
inkscape:pageopacity="0"
|
||||||
inkscape:pageshadow="2"
|
inkscape:pageshadow="2"
|
||||||
inkscape:window-width="2560"
|
inkscape:window-width="1600"
|
||||||
inkscape:window-height="1361"
|
inkscape:window-height="824"
|
||||||
id="namedview38"
|
id="namedview38"
|
||||||
showgrid="true"
|
showgrid="true"
|
||||||
inkscape:snap-to-guides="false"
|
inkscape:snap-to-guides="false"
|
||||||
inkscape:snap-grids="true"
|
inkscape:snap-grids="true"
|
||||||
inkscape:zoom="14.553175"
|
inkscape:zoom="13.427526"
|
||||||
inkscape:cx="17.310764"
|
inkscape:cx="36.566677"
|
||||||
inkscape:cy="9.229069"
|
inkscape:cy="22.199999"
|
||||||
inkscape:window-x="-9"
|
inkscape:window-x="0"
|
||||||
inkscape:window-y="-9"
|
inkscape:window-y="0"
|
||||||
inkscape:window-maximized="1"
|
inkscape:window-maximized="1"
|
||||||
inkscape:current-layer="svg2"
|
inkscape:current-layer="svg2"
|
||||||
showguides="true"
|
showguides="true"
|
||||||
inkscape:guide-bbox="true"
|
inkscape:guide-bbox="true"
|
||||||
fit-margin-top="1"
|
fit-margin-top="1"
|
||||||
fit-margin-left="2"
|
fit-margin-left="2"
|
||||||
fit-margin-right="1"
|
fit-margin-right="5"
|
||||||
fit-margin-bottom="1">
|
fit-margin-bottom="1">
|
||||||
<inkscape:grid
|
<inkscape:grid
|
||||||
type="xygrid"
|
type="xygrid"
|
||||||
@ -66,8 +66,8 @@
|
|||||||
snapvisiblegridlinesonly="true"
|
snapvisiblegridlinesonly="true"
|
||||||
spacingx="0.5"
|
spacingx="0.5"
|
||||||
spacingy="0.5"
|
spacingy="0.5"
|
||||||
originx="29.615099"
|
originx="27.34375"
|
||||||
originy="14.20885" />
|
originy="11.937501" />
|
||||||
</sodipodi:namedview>
|
</sodipodi:namedview>
|
||||||
<defs
|
<defs
|
||||||
id="defs4">
|
id="defs4">
|
||||||
@ -98,13 +98,13 @@
|
|||||||
sodipodi:nodetypes="ccccc"
|
sodipodi:nodetypes="ccccc"
|
||||||
inkscape:connector-curvature="0"
|
inkscape:connector-curvature="0"
|
||||||
id="path3872"
|
id="path3872"
|
||||||
d="m 4.146349,3.208849 v 36 h 62.000018 l -1.8e-5,-36 z"
|
d="m 1.875,0.9375 v 36 h 62.000018 l -1.8e-5,-36 z"
|
||||||
style="opacity:0.69599998;fill:#dfbd8a;fill-opacity:1;stroke:none;stroke-width:4.54269791;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
style="opacity:0.69599998;fill:#dfbd8a;fill-opacity:1;stroke:none;stroke-width:4.54269791;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
inkscape:export-xdpi="82.105263"
|
inkscape:export-xdpi="82.105263"
|
||||||
inkscape:export-ydpi="82.105263" />
|
inkscape:export-ydpi="82.105263" />
|
||||||
<g
|
<g
|
||||||
id="g1472"
|
id="g1472"
|
||||||
transform="translate(5.358933,5.8591988)">
|
transform="translate(3.087584,3.5878498)">
|
||||||
<g
|
<g
|
||||||
transform="rotate(90,28.381175,29.318675)"
|
transform="rotate(90,28.381175,29.318675)"
|
||||||
id="g928">
|
id="g928">
|
||||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Reference in New Issue
Block a user