summaryrefslogtreecommitdiff
path: root/gerbonara/aperture_macros/parse.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-04-24 00:56:32 +0200
committerjaseg <git@jaseg.de>2023-04-24 00:56:32 +0200
commit5a41d96fe3fe94e46b4b8d1864a4bc5d71d1616f (patch)
tree40f18dc77010cdc7d8892f198ce37ba30c4e9ca9 /gerbonara/aperture_macros/parse.py
parentbda404c18be7e6c8a82c2a4022bcde1215679b9e (diff)
downloadgerbonara-5a41d96fe3fe94e46b4b8d1864a4bc5d71d1616f.tar.gz
gerbonara-5a41d96fe3fe94e46b4b8d1864a4bc5d71d1616f.tar.bz2
gerbonara-5a41d96fe3fe94e46b4b8d1864a4bc5d71d1616f.zip
Fixing more tests
Diffstat (limited to 'gerbonara/aperture_macros/parse.py')
-rw-r--r--gerbonara/aperture_macros/parse.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gerbonara/aperture_macros/parse.py b/gerbonara/aperture_macros/parse.py
index c1a776f..57de857 100644
--- a/gerbonara/aperture_macros/parse.py
+++ b/gerbonara/aperture_macros/parse.py
@@ -13,6 +13,7 @@ from . import primitive as ap
from .expression import *
from ..utils import MM
+# we make our own here instead of using math.degrees to make sure this works with expressions, too.
def rad_to_deg(x):
return (x / math.pi) * 180
@@ -190,6 +191,7 @@ class GenericMacros:
*_generic_hole(4)])
# 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]),