diff options
author | jaseg <git@jaseg.de> | 2023-04-18 12:26:03 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2023-04-19 00:51:27 +0200 |
commit | 2c6c9a5cbc6d389a17c0cc15173c6e626fd5d5c6 (patch) | |
tree | dd588a4beff48425d5723f767a25e51d28e4500f /gerbonara/aperture_macros/parse.py | |
parent | 263033c9bdecf8c82027f6475c863d818f499914 (diff) | |
download | gerbonara-2c6c9a5cbc6d389a17c0cc15173c6e626fd5d5c6.tar.gz gerbonara-2c6c9a5cbc6d389a17c0cc15173c6e626fd5d5c6.tar.bz2 gerbonara-2c6c9a5cbc6d389a17c0cc15173c6e626fd5d5c6.zip |
Basic KiCad footprint rendering works
Diffstat (limited to 'gerbonara/aperture_macros/parse.py')
-rw-r--r-- | gerbonara/aperture_macros/parse.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gerbonara/aperture_macros/parse.py b/gerbonara/aperture_macros/parse.py index f0ff8d6..868f7ae 100644 --- a/gerbonara/aperture_macros/parse.py +++ b/gerbonara/aperture_macros/parse.py @@ -178,6 +178,17 @@ class GenericMacros: ap.Circle('mm', [1, var(3)*2, -(var(1)/2-var(3)), -(var(2)/2-var(3)), 0]), *_generic_hole(4)]) + # params: width, height, length difference between narrow side (top) and wide side (bottom), *hole, rotation + isosceles_trapezoid = ApertureMacro('GTR', [ + ap.Outline('mm', [1, 4, + var(1)/-2, var(2)/-2, + var(1)/-2+var(3)/2, var(2)/2, + var(1)/2-var(3)/2, var(2)/2, + var(1)/2, var(2)/-2, + var(1)/-2, var(2)/-2, + var(6) * -deg_per_rad]), + *_generic_hole(4)]) + # w must be larger than h obround = ApertureMacro('GNO', [ ap.CenterLine('mm', [1, var(1), var(2), 0, 0, var(5) * -deg_per_rad]), |