adding info on via placed, allowing ',' for decimal separator on inputs

This commit is contained in:
easyw
2019-09-28 09:52:46 +02:00
parent d71c87922d
commit f7a22eb8b4
2 changed files with 9 additions and 7 deletions

View File

@ -540,6 +540,7 @@ STEP = '-'
# How much "via steps" should be removed around a via (round up)
clear_distance = int((self.step+l_clearance) / l_clearance)
via_placed = 0
for x in xrange(len(rectangle)):
for y in xrange(len(rectangle[0])):
if isinstance(rectangle[x][y], ViaObject):
@ -555,6 +556,7 @@ STEP = '-'
ran_y = (random.random() * l_clearance / 2.0) - (l_clearance / 4.0)
self.AddVia(wxPoint(via.PosX + ran_x, via.PosY + ran_y), via.X, via.Y)
via_placed += 1
if self.debug:
wxPrint("\nFinal result:")
@ -564,8 +566,8 @@ STEP = '-'
if self.filename:
self.pcb.Save(self.filename)
wxPrint("Done!")
msg = "{:d} vias placed\n".format(via_placed)
wxPrint (msg+"Done!")
if __name__ == '__main__':
if len(sys.argv) < 2:

View File

@ -61,13 +61,13 @@ class FillAreaAction(pcbnew.ActionPlugin):
PopulateNets("GND",a)
modal_result = a.ShowModal()
if modal_result == wx.ID_OK:
wx.LogMessage('Via Stitching: Version 1.3')
wx.LogMessage('Via Stitching: Version 1.4')
if 1: #try:
fill = FillArea.FillArea()
fill.SetStepMM(float(a.m_StepMM.GetValue()))
fill.SetSizeMM(float(a.m_SizeMM.GetValue()))
fill.SetDrillMM(float(a.m_DrillMM.GetValue()))
fill.SetClearanceMM(float(a.m_ClearanceMM.GetValue()))
fill.SetStepMM(float(a.m_StepMM.GetValue().replace(',','.')))
fill.SetSizeMM(float(a.m_SizeMM.GetValue().replace(',','.')))
fill.SetDrillMM(float(a.m_DrillMM.GetValue().replace(',','.')))
fill.SetClearanceMM(float(a.m_ClearanceMM.GetValue().replace(',','.')))
#fill.SetNetname(a.m_Netname.GetValue())
netname = a.m_cbNet.GetStringSelection()
fill.SetNetname(netname)