summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gerber/gerber_statements.py2
-rw-r--r--gerber/tests/test_gerber_statements.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/gerber/gerber_statements.py b/gerber/gerber_statements.py
index fd1e629..9931acf 100644
--- a/gerber/gerber_statements.py
+++ b/gerber/gerber_statements.py
@@ -402,7 +402,7 @@ class AMParamStmt(ParamStmt):
primitive.to_metric()
def to_gerber(self, settings=None):
- return '%AM{0}*{1}*%'.format(self.name, self.macro)
+ return '%AM{0}*{1}%'.format(self.name, "".join([primitive.to_gerber() for primitive in self.primitives]))
def __str__(self):
return '<Aperture Macro %s: %s>' % (self.name, self.macro)
diff --git a/gerber/tests/test_gerber_statements.py b/gerber/tests/test_gerber_statements.py
index b5c20b1..79ce76b 100644
--- a/gerber/tests/test_gerber_statements.py
+++ b/gerber/tests/test_gerber_statements.py
@@ -446,11 +446,11 @@ def testAMParamStmt_conversion():
def test_AMParamStmt_dump():
name = 'POLYGON'
- macro = '5,1,8,25.4,25.4,25.4,0'
+ macro = '5,1,8,25.4,25.4,25.4,0.0'
s = AMParamStmt.from_dict({'param': 'AM', 'name': name, 'macro': macro })
s.build()
- assert_equal(s.to_gerber(), '%AMPOLYGON*5,1,8,25.4,25.4,25.4,0*%')
+ assert_equal(s.to_gerber(), '%AMPOLYGON*5,1,8,25.4,25.4,25.4,0.0*%')
def test_AMParamStmt_string():
name = 'POLYGON'