summaryrefslogtreecommitdiff
path: root/gerber/am_read.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2016-01-21 03:57:44 -0500
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2016-01-21 03:57:44 -0500
commit5476da8aa3f4ee424f56f4f2491e7af1c4b7b758 (patch)
tree427dafda78ee21a1846a2b9c9747dd96afe7e8a3 /gerber/am_read.py
parent7a532514631384dbfc9d7fc2002cbbfe52433c9f (diff)
downloadgerbonara-5476da8aa3f4ee424f56f4f2491e7af1c4b7b758.tar.gz
gerbonara-5476da8aa3f4ee424f56f4f2491e7af1c4b7b758.tar.bz2
gerbonara-5476da8aa3f4ee424f56f4f2491e7af1c4b7b758.zip
Fix a bunch of rendering bugs.
- 'clear' polarity primitives no longer erase background - Added aperture macro support for polygons - Added aperture macro rendring support - Renderer now creates a new surface for each layer and merges them instead of working directly on a single surface - Updated examples accordingly
Diffstat (limited to 'gerber/am_read.py')
-rw-r--r--gerber/am_read.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gerber/am_read.py b/gerber/am_read.py
index 65d08a6..4aff00b 100644
--- a/gerber/am_read.py
+++ b/gerber/am_read.py
@@ -26,7 +26,8 @@ import string
class Token:
ADD = "+"
SUB = "-"
- MULT = ("x", "X") # compatibility as many gerber writes do use non compliant X
+ # compatibility as many gerber writes do use non compliant X
+ MULT = ("x", "X")
DIV = "/"
OPERATORS = (ADD, SUB, MULT[0], MULT[1], DIV)
LEFT_PARENS = "("
@@ -62,6 +63,7 @@ def is_op(token):
class Scanner:
+
def __init__(self, s):
self.buff = s
self.n = 0
@@ -111,7 +113,8 @@ class Scanner:
def print_instructions(instructions):
for opcode, argument in instructions:
- print("%s %s" % (OpCode.str(opcode), str(argument) if argument is not None else ""))
+ print("%s %s" % (OpCode.str(opcode),
+ str(argument) if argument is not None else ""))
def read_macro(macro):