diff options
author | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2015-02-18 23:13:23 -0500 |
---|---|---|
committer | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2015-02-18 23:13:23 -0500 |
commit | 5966d7830bda7f37ed5ddcc1bfccb93e7f780eaa (patch) | |
tree | b5d96312c9dab598ec342d2215d235f2b00e8a48 /gerber/rs274x.py | |
parent | 4b92e1b59dcaff48bda4e1c906506432651fcd4f (diff) | |
download | gerbonara-5966d7830bda7f37ed5ddcc1bfccb93e7f780eaa.tar.gz gerbonara-5966d7830bda7f37ed5ddcc1bfccb93e7f780eaa.tar.bz2 gerbonara-5966d7830bda7f37ed5ddcc1bfccb93e7f780eaa.zip |
Add offset operation
Diffstat (limited to 'gerber/rs274x.py')
-rw-r--r-- | gerber/rs274x.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gerber/rs274x.py b/gerber/rs274x.py index 21947e1..2dee7cf 100644 --- a/gerber/rs274x.py +++ b/gerber/rs274x.py @@ -129,6 +129,12 @@ class GerberFile(CamFile): for primitive in self.primitives: primitive.to_metric() + def offset(self, x_offset=0, y_offset=0): + for statement in self.statements: + statement.offset(x_offset, y_offset) + for primitive in self.primitives: + primitive.offset(x_offset, y_offset) + class GerberParser(object): """ GerberParser |