Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'wxPoint' and 'VECTOR2I' error #28

Open
nihatyilmazkonya opened this issue Feb 1, 2024 · 0 comments
Open

'wxPoint' and 'VECTOR2I' error #28

nihatyilmazkonya opened this issue Feb 1, 2024 · 0 comments

Comments

@nihatyilmazkonya
Copy link

Hi, i am using the script in KiCAD 7 but i received below error.
.....\viastitching-master\viastitching_dialog.py", line 259, in CheckClearance
the_distance = norm(p2 - p1) # sqrt((p2.x - p1.x) ** 2 + (p2.y - p1.y) ** 2)
TypeError: unsupported operand type(s) for -: 'wxPoint' and 'VECTOR2I'

if yo can change viastitching_dialog .py as below, it is working
p1 = pcbnew.VECTOR2I(via.GetPosition())
corners = area.GetNumCorners()
# Calculate minimum distance from corners
# TODO: remove?
for i in range(corners):
corner = area.GetCornerPosition(i)
p2 = pcbnew.VECTOR2I(corner.getWxPoint())
the_distance = norm(p2 - p1) # sqrt((p2.x - p1.x) ** 2 + (p2.y - p1.y) ** 2)

        if the_distance < clearance:
            return False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant