summaryrefslogtreecommitdiff
path: root/gerber
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-03-05 16:26:30 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-03-05 16:26:30 +0800
commit97924d188bf8fcc7d7537007464e65cbdc8c7bbb (patch)
tree2def9b3f0ab63b182523e8cd85874e2666ecb3b6 /gerber
parent0f1d1c3a29017ea82e1f0f7795798405ef346706 (diff)
downloadgerbonara-97924d188bf8fcc7d7537007464e65cbdc8c7bbb.tar.gz
gerbonara-97924d188bf8fcc7d7537007464e65cbdc8c7bbb.tar.bz2
gerbonara-97924d188bf8fcc7d7537007464e65cbdc8c7bbb.zip
More robust writing, even for bad files. Remove accidentally added imports
Diffstat (limited to 'gerber')
-rw-r--r--gerber/primitives.py2
-rw-r--r--gerber/render/rs274x_backend.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/gerber/primitives.py b/gerber/primitives.py
index a5ed491..e5ff35f 100644
--- a/gerber/primitives.py
+++ b/gerber/primitives.py
@@ -18,8 +18,6 @@ import math
from operator import add, sub
from .utils import validate_coordinates, inch, metric, rotate_point, nearly_equal
-from jsonpickle.util import PRIMITIVES
-from __builtin__ import False
class Primitive(object):
diff --git a/gerber/render/rs274x_backend.py b/gerber/render/rs274x_backend.py
index 81e86f2..48a55e7 100644
--- a/gerber/render/rs274x_backend.py
+++ b/gerber/render/rs274x_backend.py
@@ -384,6 +384,9 @@ class Rs274xContext(GerberContext):
self.header.append(aperdef)
# Store the dcode and the original so we can check if it really is the same
+ # If it didn't have a postition, set it to 0, 0
+ if amgroup.position == None:
+ amgroup.position = (0, 0)
macro = (aperdef, amgroup)
if macroinfo: