summaryrefslogtreecommitdiff
path: root/gerber
diff options
context:
space:
mode:
authorHamilton Kibbe <ham@hamiltonkib.be>2014-09-30 17:17:28 -0400
committerHamilton Kibbe <ham@hamiltonkib.be>2014-09-30 17:17:28 -0400
commit1e170ba1964d852ed1e7787c5bd39018d9b7ed6d (patch)
tree273d9f1b51613d843521a9c1ac786566d3222ef5 /gerber
parent1cb7856e88ce3d8ff7e725e9840b512b7d799e8d (diff)
downloadgerbonara-1e170ba1964d852ed1e7787c5bd39018d9b7ed6d.tar.gz
gerbonara-1e170ba1964d852ed1e7787c5bd39018d9b7ed6d.tar.bz2
gerbonara-1e170ba1964d852ed1e7787c5bd39018d9b7ed6d.zip
Add travis.yml
Diffstat (limited to 'gerber')
-rwxr-xr-xgerber/excellon.py21
-rw-r--r--gerber/gerber.py4
2 files changed, 18 insertions, 7 deletions
diff --git a/gerber/excellon.py b/gerber/excellon.py
index 5cb33ad..dbd9502 100755
--- a/gerber/excellon.py
+++ b/gerber/excellon.py
@@ -1,6 +1,21 @@
-#!/usr/bin/env python
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+
+# copyright 2014 Hamilton Kibbe <ham@hamiltonkib.be>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
import re
-from itertools import tee, izip
from .utils import parse_gerber_value
from .cnc import CncFile, FileSettings
@@ -165,7 +180,7 @@ class ExcellonParser(object):
self.zero_suppression = 'trailing'
self.format = (2, 5)
self.state = 'INIT'
- self.tools = []
+ self.tools = {}
self.hits = []
self.active_tool = None
self.pos = [0., 0.]
diff --git a/gerber/gerber.py b/gerber/gerber.py
index eb5821c..20409f1 100644
--- a/gerber/gerber.py
+++ b/gerber/gerber.py
@@ -80,10 +80,6 @@ class GerberFile(CncFile):
if isinstance(comment, CommentStmt)]
@property
- def units(self):
- return self.settings['units']
-
- @property
def size(self):
xbounds, ybounds = self.bounds
return (xbounds[1] - xbounds[0], ybounds[1] - ybounds[0])