summaryrefslogtreecommitdiff
path: root/gerber/gerber_statements.py
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-07-24 22:08:31 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-07-24 22:08:31 +0800
commit965d3ce23b92f8aff1063debd6d3364de15791fe (patch)
tree304ac755578479554ed812da87c782e9f6772582 /gerber/gerber_statements.py
parent7cd6acf12670f3773113f67ed2acb35cb21c32a0 (diff)
downloadgerbonara-965d3ce23b92f8aff1063debd6d3364de15791fe.tar.gz
gerbonara-965d3ce23b92f8aff1063debd6d3364de15791fe.tar.bz2
gerbonara-965d3ce23b92f8aff1063debd6d3364de15791fe.zip
Add more tests for rendering to PNG. Start adding tests for rendering to Gerber format. Changed definition of no hole to use None instead of 0 so we can differentiate when writing to Gerber format. Makde polygon use hole diameter instead of hole radius to match other primitives
Diffstat (limited to 'gerber/gerber_statements.py')
-rw-r--r--gerber/gerber_statements.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gerber/gerber_statements.py b/gerber/gerber_statements.py
index 3212c1c..fba2a3c 100644
--- a/gerber/gerber_statements.py
+++ b/gerber/gerber_statements.py
@@ -281,7 +281,10 @@ class ADParamStmt(ParamStmt):
@classmethod
def circle(cls, dcode, diameter, hole_diameter):
'''Create a circular aperture definition statement'''
- return cls('AD', dcode, 'C', ([diameter, hole_diameter],))
+
+ if hole_diameter != None:
+ return cls('AD', dcode, 'C', ([diameter, hole_diameter],))
+ return cls('AD', dcode, 'C', ([diameter],))
@classmethod
def obround(cls, dcode, width, height):