- Set created modules as virtual
- PEP8 syntax fixes - Add __init__.py to use this extention in a directory
This commit is contained in:
@ -61,6 +61,7 @@ FillArea.FillArea().SetDebug().SetNetname("GND").SetStepMM(1.27).SetSizeMM(0.6).
|
|||||||
|
|
||||||
|
|
||||||
class FillArea:
|
class FillArea:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Automaticaly add via on area where there are no track/existing via,
|
Automaticaly add via on area where there are no track/existing via,
|
||||||
pads and keepout areas
|
pads and keepout areas
|
||||||
@ -197,6 +198,7 @@ class FillArea:
|
|||||||
m.SetReference("V%s_%s" % (x, y))
|
m.SetReference("V%s_%s" % (x, y))
|
||||||
m.SetValue("AUTO_VIA")
|
m.SetValue("AUTO_VIA")
|
||||||
m.SetLastEditTime()
|
m.SetLastEditTime()
|
||||||
|
m.SetAttributes(MOD_VIRTUAL)
|
||||||
m.thisown = 0
|
m.thisown = 0
|
||||||
self.pcb.AddNative(m, ADD_APPEND)
|
self.pcb.AddNative(m, ADD_APPEND)
|
||||||
m.SetFlag(IS_NEW)
|
m.SetFlag(IS_NEW)
|
||||||
@ -263,7 +265,6 @@ class FillArea:
|
|||||||
for x in range(rectangle.__len__()):
|
for x in range(rectangle.__len__()):
|
||||||
testResult = not keepOutMode # = False if is Keepout
|
testResult = not keepOutMode # = False if is Keepout
|
||||||
offset = self.clearance + self.size / 2
|
offset = self.clearance + self.size / 2
|
||||||
#offset = int(self.inter / 2)
|
|
||||||
# For keepout area: Deny Via
|
# For keepout area: Deny Via
|
||||||
# For same net area: Allow if not denied by keepout
|
# For same net area: Allow if not denied by keepout
|
||||||
current_x = origin.x + (x * self.step)
|
current_x = origin.x + (x * self.step)
|
||||||
@ -406,7 +407,8 @@ class FillArea:
|
|||||||
(self.step / 4.0)
|
(self.step / 4.0)
|
||||||
ran_y = (random.random() * self.step / 2.0) - \
|
ran_y = (random.random() * self.step / 2.0) - \
|
||||||
(self.step / 4.0)
|
(self.step / 4.0)
|
||||||
self.AddModule(module, wxPoint(origin.x + (self.step * x) + ran_x,
|
self.AddModule(
|
||||||
|
module, wxPoint(origin.x + (self.step * x) + ran_x,
|
||||||
origin.y + (self.step * y) + ran_y), x, y)
|
origin.y + (self.step * y) + ran_y), x, y)
|
||||||
|
|
||||||
self.RefillBoardAreas()
|
self.RefillBoardAreas()
|
||||||
|
4
ViaStitching/__init__.py
Normal file
4
ViaStitching/__init__.py
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Two way of installation of this plugin:
|
||||||
|
# - Copy or link this directory to KiCad plugin directory (~/.kicad_plugin/ViaStitching/)
|
||||||
|
# - Copy files to ~/.kicad_plugin except __init__.py...
|
||||||
|
from FillAreaAction import *
|
Reference in New Issue
Block a user