summaryrefslogtreecommitdiff
path: root/gerbonara/aperture_macros
diff options
context:
space:
mode:
Diffstat (limited to 'gerbonara/aperture_macros')
-rw-r--r--gerbonara/aperture_macros/parse.py31
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', [