diff --git a/resources/icon.png b/resources/icon.png new file mode 100644 index 0000000..ca7df02 Binary files /dev/null and b/resources/icon.png differ diff --git a/rf_tools_wizards/uwArcPrimitive_wizard.py b/rf_tools_wizards/uwArcPrimitive_wizard.py index 112a6aa..94b2cec 100644 --- a/rf_tools_wizards/uwArcPrimitive_wizard.py +++ b/rf_tools_wizards/uwArcPrimitive_wizard.py @@ -107,6 +107,7 @@ def smdCustomArcPad(self, module, size, pos, rad, name, angle_D, layer, ln, sold if not ln: pad.AddPrimitive(pcbnew.VECTOR2I(int(0),int(rad)), pcbnew.VECTOR2I(int(0),int(0)), pcbnew.EDA_ANGLE(int(angle_D*10),pcbnew.DEGREES_T), (size[0])) #pad.AddPrimitive(int(0),int(rad), int(0),int(0), pcbnew.EDA_ANGLE(int(angle_D*10),pcbnew.DEGREES_T), (size[0])) + #pad.AddPrimitive((int(0),int(rad)), (int(0),int(0)), pcbnew.EDA_ANGLE(int(angle_D*10),pcbnew.DEGREES_T), (size[0])) else: pad.AddPrimitive(pcbnew.VECTOR2I(int(0),int(0)), pcbnew.VECTOR2I(int(rad),int(0)), (size[0])) return pad diff --git a/via_fence_generator/viafence_action.py b/via_fence_generator/viafence_action.py index 82e4bcc..2a4a910 100755 --- a/via_fence_generator/viafence_action.py +++ b/via_fence_generator/viafence_action.py @@ -36,7 +36,7 @@ def distance (p1,p2): class ViaFenceAction(pcbnew.ActionPlugin): # ActionPlugin descriptive information def defaults(self): - self.name = "Via Fence Generator\nversion 3.1" + self.name = "Via Fence Generator\nversion 3.2" self.category = "Modify PCB" self.description = "Add a via fence to nets or tracks on the board" self.icon_file_name = os.path.join(os.path.dirname(__file__), "resources/fencing-vias.png") @@ -181,9 +181,11 @@ def checkPads(self): if hasattr(pcbnew, 'EDA_RECT'): # kv5,kv6 hTest = pcbnew.EDA_RECT(start_rect, size_rect) elif hasattr(pcbnew, 'wxPoint()'): # kv7 - hTest = pcbnew.BOX2I(pcbnew.VECTOR2I(start_rect), pcbnew.VECTOR2I(size_rect)) + hTest = pcbnew.BOX2I(pcbnew.VECTOR2I(int(start_rect.x), int(start_rect.y)), + pcbnew.VECTOR2I(int(size_rect.x), int(size_rect.y))) else: #kv8 - hTest = pcbnew.BOX2I(int(viaPos[0] - local_offset*expansion),int(viaPos[1] - local_offset*expansion), pcbnew.VECTOR2I(int(2 * expansion * local_offset),int(2 * expansion * local_offset))) + hTest = pcbnew.BOX2I(pcbnew.VECTOR2I(int(viaPos[0] - local_offset*expansion),int(viaPos[1] - local_offset*expansion)), pcbnew.VECTOR2I(int(2 * expansion * local_offset),int(2 * expansion * local_offset))) + #hTest = pcbnew.BOX2I(start_rect, size_rect) if pad.HitTest(hTest, False): #rectangle[x][y] = self.REASON_PAD wxLogDebug('Hit on Pad: viaPos:'+str(viaPos),debug) @@ -268,6 +270,8 @@ def checkTracks(self): trk_type = pcbnew.TRACK else: trk_type = pcbnew.PCB_TRACK + aContained = True + aAccuracy = 0 if track.GetNetCode() != self.viaNetId or type(track) != trk_type: #PCB_VIA_T: #wxLogDebug('here',True) #if track.HitTest(pcbnew.EDA_RECT(start_rect, size_rect), False): @@ -277,7 +281,8 @@ def checkTracks(self): elif hasattr(pcbnew, 'wxPoint()'): # kv7 hTest = pcbnew.BOX2I(pcbnew.VECTOR2I(start_rect), pcbnew.VECTOR2I(size_rect)) else: #kv8 - hTest = pcbnew.BOX2I(pcbnew.VECTOR2I(start_rect), pcbnew.VECTOR2I(size_rect)) + hTest = pcbnew.BOX2I(pcbnew.VECTOR2I(int(start_rect.x), int(start_rect.y)), + pcbnew.VECTOR2I(int(size_rect.x), int(size_rect.y))) if track.HitTest(hTest, aContained, aAccuracy): #rectangle[x][y] = self.REASON_PAD wxLogDebug('Hit on Track: viaPos:'+str(viaPos),debug)