summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/panelize/gerber_statements.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-10-07 11:13:12 +0200
committerjaseg <git@jaseg.de>2021-10-07 11:13:12 +0200
commit4565712869ef4269d62de593a245ca8d001c4ea9 (patch)
tree32a8a2245e11c8dfad9bbd486ab7678a32b969c1 /gerbonara/gerber/panelize/gerber_statements.py
parentdd8944709c5a48ccb52ba41a2310218770eb1669 (diff)
downloadgerbonara-4565712869ef4269d62de593a245ca8d001c4ea9.tar.gz
gerbonara-4565712869ef4269d62de593a245ca8d001c4ea9.tar.bz2
gerbonara-4565712869ef4269d62de593a245ca8d001c4ea9.zip
WIP
Diffstat (limited to 'gerbonara/gerber/panelize/gerber_statements.py')
-rw-r--r--gerbonara/gerber/panelize/gerber_statements.py66
1 files changed, 0 insertions, 66 deletions
diff --git a/gerbonara/gerber/panelize/gerber_statements.py b/gerbonara/gerber/panelize/gerber_statements.py
index 875d656..208660e 100644
--- a/gerbonara/gerber/panelize/gerber_statements.py
+++ b/gerbonara/gerber/panelize/gerber_statements.py
@@ -7,72 +7,6 @@ from ..gerber_statements import AMParamStmt, ADParamStmt
from ..utils import inch, metric
from .am_primitive import to_primitive_defs
-class AMParamStmtEx(AMParamStmt):
- @classmethod
- def from_stmt(cls, stmt):
- return cls(stmt.param, stmt.name, stmt.macro, stmt.units)
-
- @classmethod
- def circle(cls, name, units):
- return cls('AM', name, '1,1,$1,0,0,0*1,0,$2,0,0,0', units)
-
- @classmethod
- def rectangle(cls, name, units):
- return cls('AM', name, '21,1,$1,$2,0,0,0*1,0,$3,0,0,0', units)
-
- @classmethod
- def landscape_obround(cls, name, units):
- return cls(
- 'AM', name,
- '$4=$1-$2*'
- '$5=$1-$4*'
- '21,1,$5,$2,0,0,0*'
- '1,1,$4,$4/2,0,0*'
- '1,1,$4,-$4/2,0,0*'
- '1,0,$3,0,0,0', units)
-
- @classmethod
- def portrate_obround(cls, name, units):
- return cls(
- 'AM', name,
- '$4=$2-$1*'
- '$5=$2-$4*'
- '21,1,$1,$5,0,0,0*'
- '1,1,$4,0,$4/2,0*'
- '1,1,$4,0,-$4/2,0*'
- '1,0,$3,0,0,0', units)
-
- @classmethod
- def polygon(cls, name, units):
- return cls('AM', name, '5,1,$2,0,0,$1,$3*1,0,$4,0,0,0', units)
-
- def __init__(self, param, name, macro, units):
- super(AMParamStmtEx, self).__init__(param, name, macro)
- self.units = units
- self.primitive_defs = list(to_primitive_defs(self.instructions))
-
- def to_inch(self):
- if self.units == 'metric':
- self.units = 'inch'
- for p in self.primitive_defs:
- p.to_inch()
-
- def to_metric(self):
- if self.units == 'inch':
- self.units = 'metric'
- for p in self.primitive_defs:
- p.to_metric()
-
- def to_gerber(self, settings = None):
- def plist():
- for p in self.primitive_defs:
- yield p.to_gerber(settings)
- return "%%AM%s*\n%s%%" % (self.name, '\n'.join(plist()))
-
- def rotate(self, angle, center=None):
- for primitive_def in self.primitive_defs:
- primitive_def.rotate(angle, center)
-
class ADParamStmtEx(ADParamStmt):
GEOMETRIES = {
'C': [0,1],