diff --git a/ViaStitching/FillArea.py b/ViaStitching/FillArea.py
index 78d295e..d58d957 100644
--- a/ViaStitching/FillArea.py
+++ b/ViaStitching/FillArea.py
@@ -63,6 +63,7 @@ FillArea.FillArea().SetDebug().SetNetname("GND").SetStepMM(1.27).SetSizeMM(0.6).
# with
# SetDebug: Activate debug mode (print evolution of the board in ascii art)
+# SetViaThroughAreas: Ignores areas on other layers
# SetNetname: Change the netname to consider for the filling
# (default is /GND or fallback to GND)
# SetStepMM: Change step between Via (in mm)
@@ -129,6 +130,7 @@ class FillArea:
self.SetClearanceMM(0.2)
self.only_selected_area = False
self.delete_vias = False
+ self.via_through_areas = False
if self.pcb is not None:
for lnet in ["GND", "/GND"]:
if self.pcb.FindNet(lnet) is not None:
@@ -161,6 +163,10 @@ class FillArea:
self.random = r
return self
+ def SetViaThroughAreas(self, r):
+ self.via_through_areas = r
+ return self
+
def SetType(self, type):
self.fill_type = type
return self
@@ -305,11 +311,11 @@ STEP = '-'
if is_rule_exclude_via_area and (hit_test_area or hit_test_edge or hit_test_zone):
return self.REASON_KEEPOUT # Collides with keepout/rules
- elif (hit_test_area or hit_test_edge) and not is_rules_area:
+ elif (not self.via_through_areas) and (hit_test_area or hit_test_edge) and not is_rules_area:
# Collides with another signal (e.g. on another layer) but not a rule zone
return self.REASON_OTHER_SIGNAL
- elif hit_test_zone and not is_rules_area:
+ elif (not self.via_through_areas) and hit_test_zone and not is_rules_area:
# Check if the zone is higher priority than other zones of the target net in the same point
# target_areas_on_same_layer = filter(lambda x: ((x.GetPriority() > area_priority) and (x.GetLayer() == area_layer) and (x.GetNetname().upper() == self.netname)), all_areas)
target_areas_on_same_layer = filter(lambda x: ((x.GetPriority() > area_priority) and (
diff --git a/ViaStitching/FillAreaAction.py b/ViaStitching/FillAreaAction.py
index 802d7de..8de119f 100644
--- a/ViaStitching/FillAreaAction.py
+++ b/ViaStitching/FillAreaAction.py
@@ -81,6 +81,7 @@ class FillAreaAction(pcbnew.ActionPlugin):
if a.m_Debug.IsChecked():
fill.SetDebug()
fill.SetRandom(a.m_Random.IsChecked())
+ fill.SetViaThroughAreas(a.m_viaThroughAreas.IsChecked())
fill.SetType(a.m_cbFillType.GetStringSelection())
if a.m_only_selected.IsChecked():
fill.OnlyOnSelectedArea()
diff --git a/ViaStitching/FillAreaDialog.py b/ViaStitching/FillAreaDialog.py
index 1347fa1..e0a4d1c 100644
--- a/ViaStitching/FillAreaDialog.py
+++ b/ViaStitching/FillAreaDialog.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
###########################################################################
-## Python code generated with wxFormBuilder (version 3.10.1)
+## Python code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
@@ -102,6 +102,14 @@ class FillAreaDialog ( wx.Dialog ):
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 )
+ self.m_staticText71 = wx.StaticText( self, wx.ID_ANY, u"Ignore areas on other layers", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText71.Wrap( -1 )
+
+ fgSizer1.Add( self.m_staticText71, 0, wx.ALL, 5 )
+
+ self.m_viaThroughAreas = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
+ fgSizer1.Add( self.m_viaThroughAreas, 0, wx.ALL, 5 )
+
self.m_staticText7 = wx.StaticText( self, wx.ID_ANY, u"Debug mode", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_staticText7.Wrap( -1 )
diff --git a/ViaStitching/FillAreaTpl.fbp b/ViaStitching/FillAreaTpl.fbp
index d11834f..be8e59e 100644
--- a/ViaStitching/FillAreaTpl.fbp
+++ b/ViaStitching/FillAreaTpl.fbp
@@ -1147,6 +1147,131 @@
+
+
+ 5
+ wxALL
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+
+ 0
+
+
+ 0
+
+ 1
+ m_viaThroughAreas
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+
5
wxALL|wxEXPAND