Skip to content

Commit

Permalink
Introduce compatibility with KiCAD 7
Browse files Browse the repository at this point in the history
  • Loading branch information
yaqwsx committed Jan 11, 2023
1 parent fcd0f5a commit dfb53dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions pinion/generate.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from pathlib import Path
from pcbnewTransition import pcbnew, isV6
from pcbnewTransition import pcbnew, isV6, isV7
import json
from pcbnewTransition.transition import isV6

from typing import Tuple, Callable, Dict, Optional

Expand All @@ -28,7 +27,7 @@ def padOutline(pad):
Given a pad return list of points forming a polygon for the pad shape
"""
p = pcbnew.SHAPE_POLY_SET()
if isV6():
if isV6() or isV7():
p = pad.GetEffectivePolygon()
else:
pad.TransformShapeWithClearanceToPolygon(p, 0, 16, 1.0)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"click>=7.1",
"ruamel.yaml",
"pcbdraw>=1.0",
"pcbnewTransition==0.2"
"pcbnewTransition >= 0.2, <=0.4"
],
setup_requires=[
"versioneer"
Expand Down

0 comments on commit dfb53dd

Please sign in to comment.