Open ghost opened 5 months ago
Fixed with the following code:
for pad in self.pin_pads:
diameter = pad["size"][0]
dc.push()
dc.goxy(*pad["xy"])
dc.board.add_drill(dc.xy, pad["drill"])
shape = pad["shape"]
if shape in ["long", "circle", "octagon", "rect", "oval"]:
n = {"long": 60, "circle": 60, "octagon": 8, "rect": 4, "oval": 60}[shape]
if shape in ["rect", "oval"]:
diameter /= 1.1
p = dc.copy()
p.n_agon(diameter / 2, n)
p.set_name(pad["name"])
p.part = self.id
self.pads.append(p)
p.pin_pad()
dc.pop()
I have forked a copy of pcbflow to include the fixes on my own account, since I will probably be fixing a lot of bugs, and maybe adding new features. cheers
@khanumballz Great job! Thanks for the fix! I'd be happy to fold them into the main repo with a PR whenever you're ready.
There's a strange issue when rendering pin holes for PinHeader and PinSocket footprints. (standard arduino headers)
It seems to add an additional, invisible hole every time a hole is drilled onto the board.
So rather than going 1, 2, 3, 4 -- it'll go 1, 3, 5, etc.
Must be some kind of maths problem. Here's where the bug manifests within the footprint, I just need to be able to locate the exact logic in the code:
It gets the spacing right for the first two pads, but as soon as it loops through repeated hole shapes - it becomes an exponential pattern.