diff options
author | jaseg <git@jaseg.de> | 2023-04-25 00:02:24 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2023-04-25 00:02:24 +0200 |
commit | 1dbe7f1f7365ddd97d1ebbfc9e7298667bcdca44 (patch) | |
tree | 2f45ec947f46551ada8805a48db6767decd27876 /gerbonara/aperture_macros | |
parent | 5a41d96fe3fe94e46b4b8d1864a4bc5d71d1616f (diff) | |
download | gerbonara-1dbe7f1f7365ddd97d1ebbfc9e7298667bcdca44.tar.gz gerbonara-1dbe7f1f7365ddd97d1ebbfc9e7298667bcdca44.tar.bz2 gerbonara-1dbe7f1f7365ddd97d1ebbfc9e7298667bcdca44.zip |
Fix more tests
Diffstat (limited to 'gerbonara/aperture_macros')
-rw-r--r-- | gerbonara/aperture_macros/parse.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gerbonara/aperture_macros/parse.py b/gerbonara/aperture_macros/parse.py index 57de857..16c6585 100644 --- a/gerbonara/aperture_macros/parse.py +++ b/gerbonara/aperture_macros/parse.py @@ -190,6 +190,37 @@ class GenericMacros: var(6) * -deg_per_rad]), *_generic_hole(4)]) + # params: width, height, length difference between narrow side (top) and wide side (bottom), margin, *hole, rotation + rounded_isosceles_trapezoid = ApertureMacro('GRTR', [ + 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]), + ap.VectorLine('mm', [1, var(4)*2, + var(1)/-2, var(2)/-2, + var(1)/-2+var(3)/2, var(2)/2,]), + ap.VectorLine('mm', [1, var(4)*2, + var(1)/-2+var(3)/2, var(2)/2, + var(1)/2-var(3)/2, var(2)/2,]), + ap.VectorLine('mm', [1, var(4)*2, + var(1)/2-var(3)/2, var(2)/2, + var(1)/2, var(2)/-2,]), + ap.VectorLine('mm', [1, var(4)*2, + var(1)/2, var(2)/-2, + var(1)/-2, var(2)/-2,]), + ap.Circle('mm', [1, var(4)*2, + var(1)/-2, var(2)/-2,]), + ap.Circle('mm', [1, var(4)*2, + var(1)/-2+var(3)/2, var(2)/2,]), + ap.Circle('mm', [1, var(4)*2, + var(1)/2-var(3)/2, var(2)/2,]), + ap.Circle('mm', [1, var(4)*2, + var(1)/2, var(2)/-2,]), + *_generic_hole(5)]) + # w must be larger than h # params: width, height, *hole, rotation obround = ApertureMacro('GNO', [ |