diff --git a/ViaStitching/FillArea.py b/ViaStitching/FillArea.py
index 7b3916b..f81113b 100644
--- a/ViaStitching/FillArea.py
+++ b/ViaStitching/FillArea.py
@@ -132,6 +132,7 @@ class FillArea:
self.only_selected_area = False
self.delete_vias = False
self.via_through_areas = False
+ self.same_net_tracks = False
if self.pcb is not None:
for lnet in ["GND", "/GND"]:
if self.pcb.FindNet(lnet) is not None:
@@ -168,6 +169,10 @@ class FillArea:
self.via_through_areas = r
return self
+ def SetSameNetTracks(self, r):
+ self.same_net_tracks = r
+ return self
+
def SetType(self, type):
self.fill_type = type
return self
@@ -705,6 +710,9 @@ STEP = '-'
if self.debug:
print("%s: Line %u" % (time.time(), currentframe().f_lineno))
for track in all_tracks:
+ if self.same_net_tracks:
+ if not isinstance(track, PCB_VIA) and track.GetNetname() == self.netname:
+ continue
start_x = track.GetStart().x
start_y = track.GetStart().y
diff --git a/ViaStitching/FillAreaAction.py b/ViaStitching/FillAreaAction.py
index 0c2b90f..a4270fe 100644
--- a/ViaStitching/FillAreaAction.py
+++ b/ViaStitching/FillAreaAction.py
@@ -83,6 +83,7 @@ class FillAreaAction(pcbnew.ActionPlugin):
fill.SetRandom(a.m_Random.IsChecked())
fill.SetViaThroughAreas(a.m_viaThroughAreas.IsChecked())
fill.SetType(a.m_cbFillType.GetStringSelection())
+ fill.SetSameNetTracks(a.m_sameNetTracks.IsChecked())
if a.m_only_selected.IsChecked():
fill.OnlyOnSelectedArea()
fill.Run()
diff --git a/ViaStitching/FillAreaDialog.py b/ViaStitching/FillAreaDialog.py
index e0a4d1c..ec7b4ab 100644
--- a/ViaStitching/FillAreaDialog.py
+++ b/ViaStitching/FillAreaDialog.py
@@ -110,6 +110,14 @@ class FillAreaDialog ( wx.Dialog ):
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_staticText72 = wx.StaticText( self, wx.ID_ANY, u"Also on tracks with same net", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText72.Wrap( -1 )
+
+ fgSizer1.Add( self.m_staticText72, 0, wx.ALL, 5 )
+
+ self.m_sameNetTracks = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
+ fgSizer1.Add( self.m_sameNetTracks, 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 be8e59e..ef5c83c 100644
--- a/ViaStitching/FillAreaTpl.fbp
+++ b/ViaStitching/FillAreaTpl.fbp
@@ -1272,6 +1272,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_SameNetTracks
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+
5
wxALL|wxEXPAND