diff options
Diffstat (limited to 'gerber/excellon_statements.py')
-rw-r--r-- | gerber/excellon_statements.py | 6 |
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): |