From c93bccee011ccf776a3dee012be2b66843390ade Mon Sep 17 00:00:00 2001 From: "U-CAD\\userC" Date: Mon, 11 Nov 2024 14:08:40 +0100 Subject: [PATCH] kicad 8 compat (v1.3.2) --- resources/icon.png | Bin 0 -> 1199 bytes rf_tools_wizards/uwArcPrimitive_wizard.py | 1 + via_fence_generator/viafence_action.py | 13 +++++++++---- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 resources/icon.png diff --git a/resources/icon.png b/resources/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ca7df028d638dd0dd0c845ee2d81d212da46a7fa GIT binary patch literal 1199 zcmV;g1W@~lP)@FZ>p-}$;EeLHW4Up6}K_dqf5=}2$j0Z0o<4sQ@1Bo@Qj^BGG7GE03oMFhAc7 zsPeV8R!b(+s8!GwmXiKJMIm`rmillRnWg&OFQl(kplJg zmUbRbQ=qHsI+oSK+}tT*v31U!`w`RJ&@Kw##EDxhFF(iJ+$l_RgR^I^kVvd)=MhSI zTLzU96pIE@7Ln4?F6h4~6rxD!AZ5{){*CJs`w3vSb|ICaKfrE>cz5`G^(I18c`6K{ z0igk*0YM808dYzAr%dpfHpyEbByfr#Bc-~!a=>w5W!d4YPuKm@>58{MOwiaYkrIRi zr6_Cs`tx<}EmTg}JQyeE+V)XCFN(6>xmUmH``U2Pe~J zK*3g6%MOjrl4Nr!R!Hf8%n$ zojs9?1~~qg2VGG43yyx9WA@IEx%l3fc-H z|5tdP0*)iG?I`JV65Dp)7aSChBPkRN(&;4myy**v=iOj7dxX)^3#_izV;D9=LqE{b zG2@3eGMNT0U3!g7rUAn!FgSRHlP7O!wX9w5u$^qxub90PiLZxWB&EG@Ni^ymY6dTwYHv>n~ue_$9ki;Ha}lNP5> z|E`^*>X$*|-rvFfrgs=1s`-C|5bgy+1409W77#Q-1A-P1G^*Z!e*hr+VYc12CcXdw N002ovPDHLkV1h*LBtifH literal 0 HcmV?d00001 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)