summaryrefslogtreecommitdiff
path: root/gerber/excellon_statements.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/excellon_statements.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/excellon_statements.py')
-rw-r--r--gerber/excellon_statements.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/gerber/excellon_statements.py b/gerber/excellon_statements.py
index 2be7a05..971a81d 100644
--- a/gerber/excellon_statements.py
+++ b/gerber/excellon_statements.py
@@ -55,6 +55,7 @@ class ExcellonStatement(object):
def to_excellon(self, settings=None):
raise NotImplementedError('to_excellon must be implemented in a '
'subclass')
+
def to_inch(self):
self.units = 'inch'
@@ -67,6 +68,7 @@ class ExcellonStatement(object):
def __eq__(self, other):
return self.__dict__ == other.__dict__
+
class ExcellonTool(ExcellonStatement):
""" Excellon Tool class
@@ -210,7 +212,6 @@ class ExcellonTool(ExcellonStatement):
if self.diameter is not None:
self.diameter = inch(self.diameter)
-
def to_metric(self):
if self.settings.units != 'metric':
self.settings.units = 'metric'
@@ -573,6 +574,7 @@ class EndOfProgramStmt(ExcellonStatement):
if self.y is not None:
self.y += y_offset
+
class UnitStmt(ExcellonStatement):
@classmethod
@@ -598,6 +600,7 @@ class UnitStmt(ExcellonStatement):
def to_metric(self):
self.units = 'metric'
+
class IncrementalModeStmt(ExcellonStatement):
@classmethod
@@ -689,6 +692,7 @@ class MeasuringModeStmt(ExcellonStatement):
def to_metric(self):
self.units = 'metric'
+
class RouteModeStmt(ExcellonStatement):
def __init__(self, **kwargs):