From 5476da8aa3f4ee424f56f4f2491e7af1c4b7b758 Mon Sep 17 00:00:00 2001 From: Hamilton Kibbe Date: Thu, 21 Jan 2016 03:57:44 -0500 Subject: 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 --- gerber/excellon_statements.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gerber/excellon_statements.py') 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): -- cgit