summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/panelize/gerber_statements.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-01-29 21:08:55 +0100
committerjaseg <git@jaseg.de>2022-01-29 21:08:55 +0100
commit1d0336056f2b29a95148768bfc5e805afad27cba (patch)
tree5939e539db7418834c85d916b62ae6d03b14a1af /gerbonara/gerber/panelize/gerber_statements.py
parentd5bbfade80f1927f2512b9f5bbb723255ec8926d (diff)
downloadgerbonara-1d0336056f2b29a95148768bfc5e805afad27cba.tar.gz
gerbonara-1d0336056f2b29a95148768bfc5e805afad27cba.tar.bz2
gerbonara-1d0336056f2b29a95148768bfc5e805afad27cba.zip
Remove obsolete files
Diffstat (limited to 'gerbonara/gerber/panelize/gerber_statements.py')
-rw-r--r--gerbonara/gerber/panelize/gerber_statements.py49
1 files changed, 0 insertions, 49 deletions
diff --git a/gerbonara/gerber/panelize/gerber_statements.py b/gerbonara/gerber/panelize/gerber_statements.py
deleted file mode 100644
index 208660e..0000000
--- a/gerbonara/gerber/panelize/gerber_statements.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-# Copyright 2019 Hiroshi Murayama <opiopan@gmail.com>
-
-from ..gerber_statements import AMParamStmt, ADParamStmt
-from ..utils import inch, metric
-from .am_primitive import to_primitive_defs
-
-class ADParamStmtEx(ADParamStmt):
- GEOMETRIES = {
- 'C': [0,1],
- 'R': [0,1,2],
- 'O': [0,1,2],
- 'P': [0,3],
- }
-
- @classmethod
- def from_stmt(cls, stmt):
- modstr = ','.join([
- 'X'.join(['{0}'.format(x) for x in modifier])
- for modifier in stmt.modifiers])
- return cls(stmt.param, stmt.d, stmt.shape, modstr, stmt.units)
-
- def __init__(self, param, d, shape, modifiers, units):
- super(ADParamStmtEx, self).__init__(param, d, shape, modifiers)
- self.units = units
-
- def to_inch(self):
- if self.units == 'inch':
- return
- self.units = 'inch'
- if self.shape in self.GEOMETRIES:
- indices = self.GEOMETRIES[self.shape]
- self.modifiers = [tuple([
- inch(self.modifiers[0][i]) if i in indices else self.modifiers[0][i] \
- for i in range(len(self.modifiers[0]))
- ])]
-
- def to_metric(self):
- if self.units == 'metric':
- return
- self.units = 'metric'
- if self.shape in self.GEOMETRIES:
- indices = self.GEOMETRIES[self.shape]
- self.modifiers = [tuple([
- metric(self.modifiers[0][i]) if i in indices else self.modifiers[0][i] \
- for i in range(len(self.modifiers[0]))
- ])]