From 1dbe7f1f7365ddd97d1ebbfc9e7298667bcdca44 Mon Sep 17 00:00:00 2001 From: jaseg Date: Tue, 25 Apr 2023 00:02:24 +0200 Subject: Fix more tests --- gerbonara/aperture_macros/parse.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'gerbonara/aperture_macros') 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', [ -- cgit