summaryrefslogtreecommitdiff
path: root/gerber/rs274x.py
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2015-01-14 03:15:52 -0200
committerPaulo Henrique Silva <ph.silva@gmail.com>2015-01-14 03:15:52 -0200
commitcbb662491c273e97cfceed94b29a77ce865244dd (patch)
tree7ec54a045d07a2e89d9f0bc705f1b9ca81ec8bc1 /gerber/rs274x.py
parent53ee7566097b5a26cd3a1dab1d730f9606d767e6 (diff)
downloadgerbonara-cbb662491c273e97cfceed94b29a77ce865244dd.tar.gz
gerbonara-cbb662491c273e97cfceed94b29a77ce865244dd.tar.bz2
gerbonara-cbb662491c273e97cfceed94b29a77ce865244dd.zip
Refactor AM aperture handling and add unit conversion support
* Add support to convert between metric/impertial * AM primitives are now properly created and can be converted between metric/imperial. (only Outline primitive is supported, no rendering yet)
Diffstat (limited to 'gerber/rs274x.py')
-rw-r--r--gerber/rs274x.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/gerber/rs274x.py b/gerber/rs274x.py
index 3ec7429..2e5a3ec 100644
--- a/gerber/rs274x.py
+++ b/gerber/rs274x.py
@@ -361,15 +361,15 @@ class GerberParser(object):
def _define_aperture(self, d, shape, modifiers):
aperture = None
if shape == 'C':
- diameter = float(modifiers[0][0])
+ diameter = modifiers[0][0]
aperture = Circle(position=None, diameter=diameter)
elif shape == 'R':
- width = float(modifiers[0][0])
- height = float(modifiers[0][1])
+ width = modifiers[0][0]
+ height = modifiers[0][1]
aperture = Rectangle(position=None, width=width, height=height)
elif shape == 'O':
- width = float(modifiers[0][0])
- height = float(modifiers[0][1])
+ width = modifiers[0][0]
+ height = modifiers[0][1]
aperture = Obround(position=None, width=width, height=height)
self.apertures[d] = aperture