summaryrefslogtreecommitdiff
path: root/gerber/cam.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2015-02-13 09:37:27 -0500
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2015-02-13 09:37:27 -0500
commit5e23d07bcb5103b4607c6ad591a2a547c97ee1f6 (patch)
treefdc7989cc6d4fe200d61267b6b9c228dcce44c2c /gerber/cam.py
parent8f69c1dfa281b6486c8fce16c1d58acef70c7ae7 (diff)
downloadgerbonara-5e23d07bcb5103b4607c6ad591a2a547c97ee1f6.tar.gz
gerbonara-5e23d07bcb5103b4607c6ad591a2a547c97ee1f6.tar.bz2
gerbonara-5e23d07bcb5103b4607c6ad591a2a547c97ee1f6.zip
Fix rendering for line with rectangular aperture per #12. Still need to do the same for arcs.
Diffstat (limited to 'gerber/cam.py')
-rw-r--r--gerber/cam.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gerber/cam.py b/gerber/cam.py
index 9c731aa..f49f5dd 100644
--- a/gerber/cam.py
+++ b/gerber/cam.py
@@ -21,7 +21,7 @@ CAM File
This module provides common base classes for Excellon/Gerber CNC files
"""
-
+from operator import mul
class FileSettings(object):
""" CAM File Settings
@@ -241,7 +241,8 @@ class CamFile(object):
filename : string <optional>
If provided, save the rendered image to `filename`
"""
- ctx.set_bounds(self.bounds)
+ bounds = [tuple([x * 1.2, y*1.2]) for x, y in self.bounds]
+ ctx.set_bounds(bounds)
for p in self.primitives:
ctx.render(p)
if filename is not None: