diff options
author | Garret Fick <garret@ficksworkshop.com> | 2016-05-28 14:14:49 +0800 |
---|---|---|
committer | Garret Fick <garret@ficksworkshop.com> | 2016-05-28 14:14:49 +0800 |
commit | 5a20b2b92dc7ab82e1f196d1efbf4bb52a163720 (patch) | |
tree | 9ecf7e9886c24a5e804c4e74374925ec971c0575 /gerber/primitives.py | |
parent | 3fc296918e7d0d343840c5daa08eb6d564660a29 (diff) | |
download | gerbonara-5a20b2b92dc7ab82e1f196d1efbf4bb52a163720.tar.gz gerbonara-5a20b2b92dc7ab82e1f196d1efbf4bb52a163720.tar.bz2 gerbonara-5a20b2b92dc7ab82e1f196d1efbf4bb52a163720.zip |
Fix converting amgroup units
Diffstat (limited to 'gerber/primitives.py')
-rw-r--r-- | gerber/primitives.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gerber/primitives.py b/gerber/primitives.py index d74226d..a5c3055 100644 --- a/gerber/primitives.py +++ b/gerber/primitives.py @@ -795,9 +795,26 @@ class AMGroup(Primitive): elif prim:
self.primitives.append(prim)
self._position = None
- self._to_convert = ['primitives']
+ self._to_convert = ['_position', 'primitives']
self.stmt = stmt
+ def to_inch(self):
+ if self.units == 'metric':
+ super(AMGroup, self).to_inch()
+
+ # If we also have a stmt, convert that too
+ if self.stmt:
+ self.stmt.to_inch()
+
+
+ def to_metric(self):
+ if self.units == 'inch':
+ super(AMGroup, self).to_metric()
+
+ # If we also have a stmt, convert that too
+ if self.stmt:
+ self.stmt.to_metric()
+
@property
def flashed(self):
return True
|