[X] I use KiKit at least version 1.4.0 (older version are not supported)
KiKit version
kikit, version 1.4.0+35.g6dc6666
KiCAD version
7.0.6
Operating system
Windows
Description
When generating a stencil, I see that the arcs in the corners are all rotated in the wrong direction.
I fixed this error temporarily by adding a variable "reverse" that uses the "end" location as the start point of the arc and not the "start".
def addRoundedCorner(board, center, start, end, thickness, reverse = False):
corner = pcbnew.PCB_SHAPE()
corner.SetShape(STROKE_T.S_ARC)
corner.SetCenter(toKiCADPoint((center[0], center[1])))
if not reverse:
corner.SetStart(toKiCADPoint((start[0], start[1])))
else:
corner.SetStart(toKiCADPoint((end[0], end[1])))
# ... rest of function
def addFrame(board, rect, bridgeWidth, bridgeSpacing, clearance):
# [...]
corners = [
(tl(rect), toKiCADPoint((R, 0)), toKiCADPoint((0, R))), # TL
(tr(rect), toKiCADPoint((0, R)), toKiCADPoint((-R, 0))), # TR
(br(rect), toKiCADPoint((-R, 0)), toKiCADPoint((0, -R))), # BR
(bl(rect), toKiCADPoint((0, -R)), toKiCADPoint((R, 0))) # BL
]
for c, sOffset, eOffset in corners:
addRoundedCorner(board, c + sOffset + eOffset, c + sOffset, c + eOffset, clearance, True) # <= Flag added here
The result looks like this:
I don't know if this is the right way of doing it, or if there is an underlying issue.
That's why I haven't created a PR for it. I hope you can resolve the issue with my "fix".
Prerequisites
KiKit version
kikit, version 1.4.0+35.g6dc6666
KiCAD version
7.0.6
Operating system
Windows
Description
When generating a stencil, I see that the arcs in the corners are all rotated in the wrong direction.
I fixed this error temporarily by adding a variable "reverse" that uses the "end" location as the start point of the arc and not the "start".
The result looks like this:
I don't know if this is the right way of doing it, or if there is an underlying issue. That's why I haven't created a PR for it. I hope you can resolve the issue with my "fix".
Steps to Reproduce
Used PCB and Stencil files (correct / wrong versions) Stencil-Bug.zip