summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-04-25 22:21:07 +0200
committerjaseg <git@jaseg.de>2023-04-25 22:21:07 +0200
commit59fe7b3b8314d62834a2dbfa1e9735862f16215f (patch)
treed4175294b6b0f35236e4e2c4bd794fed9e0faa00
parent1dbe7f1f7365ddd97d1ebbfc9e7298667bcdca44 (diff)
downloadgerbonara-59fe7b3b8314d62834a2dbfa1e9735862f16215f.tar.gz
gerbonara-59fe7b3b8314d62834a2dbfa1e9735862f16215f.tar.bz2
gerbonara-59fe7b3b8314d62834a2dbfa1e9735862f16215f.zip
WIP
-rw-r--r--gerbonara/aperture_macros/parse.py6
-rw-r--r--gerbonara/cad/kicad/footprints.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/gerbonara/aperture_macros/parse.py b/gerbonara/aperture_macros/parse.py
index 16c6585..84c35e0 100644
--- a/gerbonara/aperture_macros/parse.py
+++ b/gerbonara/aperture_macros/parse.py
@@ -224,9 +224,9 @@ class GenericMacros:
# w must be larger than h
# params: width, height, *hole, rotation
obround = ApertureMacro('GNO', [
- ap.CenterLine('mm', [1, var(1), var(2), 0, 0, var(5) * -deg_per_rad]),
- ap.Circle('mm', [1, var(2), +var(1)/2, 0, var(5) * -deg_per_rad]),
- ap.Circle('mm', [1, var(2), -var(1)/2, 0, var(5) * -deg_per_rad]),
+ ap.CenterLine('mm', [1, var(1)-var(2), var(2), 0, 0, var(5) * -deg_per_rad]),
+ ap.Circle('mm', [1, var(2), +(var(1)-var(2))/2, 0, var(5) * -deg_per_rad]),
+ ap.Circle('mm', [1, var(2), -(var(1)-var(2))/2, 0, var(5) * -deg_per_rad]),
*_generic_hole(3) ])
polygon = ApertureMacro('GNP', [
diff --git a/gerbonara/cad/kicad/footprints.py b/gerbonara/cad/kicad/footprints.py
index 00fa5f5..13cad7d 100644
--- a/gerbonara/cad/kicad/footprints.py
+++ b/gerbonara/cad/kicad/footprints.py
@@ -402,7 +402,7 @@ class Pad:
elif self.shape == Atom.rect:
if margin:
return ap.ApertureMacroInstance(GenericMacros.rounded_rect,
- [x+2*margin, y+2*margin,
+ [self.size.x+2*margin, self.size.y+2*margin,
margin,
0, 0, # no hole
rotation], unit=MM)