summaryrefslogtreecommitdiff
path: root/gerber/primitives.py
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-05-28 12:36:31 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-05-28 12:36:31 +0800
commitc9c1313d598d5afa8cb387a2cfcd4a4281086e01 (patch)
treedd8898023c6cae3e282df5fb6f7ed50a85f3d5cf /gerber/primitives.py
parentd1d112f2f152784ead18bfa25c70caf210020666 (diff)
downloadgerbonara-c9c1313d598d5afa8cb387a2cfcd4a4281086e01.tar.gz
gerbonara-c9c1313d598d5afa8cb387a2cfcd4a4281086e01.tar.bz2
gerbonara-c9c1313d598d5afa8cb387a2cfcd4a4281086e01.zip
Fix units statement. Keep track of original macro statement in the AMGroup
Diffstat (limited to 'gerber/primitives.py')
-rw-r--r--gerber/primitives.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/gerber/primitives.py b/gerber/primitives.py
index 3ecf0db..d74226d 100644
--- a/gerber/primitives.py
+++ b/gerber/primitives.py
@@ -763,9 +763,9 @@ class Polygon(Primitive):
return points
def equivalent(self, other, offset):
- '''
+ """
Is this the outline the same as the other, ignoring the position offset?
- '''
+ """
# Quick check if it even makes sense to compare them
if type(self) != type(other) or self.sides != other.sides or self.radius != other.radius:
@@ -779,7 +779,11 @@ class Polygon(Primitive):
class AMGroup(Primitive):
"""
"""
- def __init__(self, amprimitives, **kwargs):
+ def __init__(self, amprimitives, stmt = None, **kwargs):
+ """
+
+ stmt : The original statment that generated this, since it is really hard to re-generate from primitives
+ """
super(AMGroup, self).__init__(**kwargs)
self.primitives = []
@@ -792,6 +796,7 @@ class AMGroup(Primitive):
self.primitives.append(prim)
self._position = None
self._to_convert = ['primitives']
+ self.stmt = stmt
@property
def flashed(self):