summaryrefslogtreecommitdiff
path: root/gerbonara/aperture_macros/parse.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-02-17 00:03:04 +0100
committerjaseg <git@jaseg.de>2023-02-17 00:03:04 +0100
commitf64b03efc752b682b1cbe8cfb114f19e3362ef76 (patch)
tree182bfb4e9b23766d00f255f4d50b183a4d525bcf /gerbonara/aperture_macros/parse.py
parentfb52e104081138a1f6abb8f6c9f7d0c6c2439c1e (diff)
downloadgerbonara-f64b03efc752b682b1cbe8cfb114f19e3362ef76.tar.gz
gerbonara-f64b03efc752b682b1cbe8cfb114f19e3362ef76.tar.bz2
gerbonara-f64b03efc752b682b1cbe8cfb114f19e3362ef76.zip
Add CLI
Diffstat (limited to 'gerbonara/aperture_macros/parse.py')
-rw-r--r--gerbonara/aperture_macros/parse.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gerbonara/aperture_macros/parse.py b/gerbonara/aperture_macros/parse.py
index 1eaa317..448330f 100644
--- a/gerbonara/aperture_macros/parse.py
+++ b/gerbonara/aperture_macros/parse.py
@@ -142,6 +142,12 @@ class ApertureMacro:
primitive.rotation -= rad_to_deg(angle)
return dup
+ def scaled(self, scale):
+ dup = copy.deepcopy(self)
+ for primitive in dup.primitives:
+ primitive.scale(scale)
+ return dup
+
var = VariableExpression
deg_per_rad = 180 / math.pi