summaryrefslogtreecommitdiff
path: root/gerbonara/aperture_macros
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-04-04 01:35:38 +0200
committerjaseg <git@jaseg.de>2023-04-04 01:35:38 +0200
commitdb2bacebc74fedc7a60cf2621f8448f1f4b7f10a (patch)
tree556cfbc8914cf0f37ca65ee5a4796c007c957ae9 /gerbonara/aperture_macros
parent8d4430ea612f51156cd9288321f99781ebbdc475 (diff)
downloadgerbonara-db2bacebc74fedc7a60cf2621f8448f1f4b7f10a.tar.gz
gerbonara-db2bacebc74fedc7a60cf2621f8448f1f4b7f10a.tar.bz2
gerbonara-db2bacebc74fedc7a60cf2621f8448f1f4b7f10a.zip
Add missing WIP changes
Diffstat (limited to 'gerbonara/aperture_macros')
-rw-r--r--gerbonara/aperture_macros/parse.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/gerbonara/aperture_macros/parse.py b/gerbonara/aperture_macros/parse.py
index 727b950..f0ff8d6 100644
--- a/gerbonara/aperture_macros/parse.py
+++ b/gerbonara/aperture_macros/parse.py
@@ -166,7 +166,17 @@ class GenericMacros:
rect = ApertureMacro('GNR', [
ap.CenterLine('mm', [1, var(1), var(2), 0, 0, var(5) * -deg_per_rad]),
- *_generic_hole(3) ])
+ *_generic_hole(3)])
+
+ # params: width, height, corner radius, *hole, rotation
+ rounded_rect = ApertureMacro('GRR', [
+ ap.CenterLine('mm', [1, var(1)-2*var(3), var(2), 0, 0, var(6) * -deg_per_rad]),
+ ap.CenterLine('mm', [1, var(1), var(2)-2*var(3), 0, 0, var(6) * -deg_per_rad]),
+ ap.Circle('mm', [1, var(3)*2, +(var(1)/2-var(3)), +(var(2)/2-var(3)), 0]),
+ ap.Circle('mm', [1, var(3)*2, +(var(1)/2-var(3)), -(var(2)/2-var(3)), 0]),
+ ap.Circle('mm', [1, var(3)*2, -(var(1)/2-var(3)), +(var(2)/2-var(3)), 0]),
+ ap.Circle('mm', [1, var(3)*2, -(var(1)/2-var(3)), -(var(2)/2-var(3)), 0]),
+ *_generic_hole(4)])
# w must be larger than h
obround = ApertureMacro('GNO', [