diff options
author | opiopan <opiopan@gmail.com> | 2019-03-23 21:59:13 +0900 |
---|---|---|
committer | opiopan <opiopan@gmail.com> | 2019-03-23 21:59:13 +0900 |
commit | 690df56bb71020901167605a87ec451081fa18d7 (patch) | |
tree | c1faba9ba0cb75d64d8353a94d87edbcbb8174c3 /test/test.py | |
parent | 9febca7da6a730b3b3ca3a54129a9f88e5c44d14 (diff) | |
download | gerbonara-690df56bb71020901167605a87ec451081fa18d7.tar.gz gerbonara-690df56bb71020901167605a87ec451081fa18d7.tar.bz2 gerbonara-690df56bb71020901167605a87ec451081fa18d7.zip |
add rotation fuction
Diffstat (limited to 'test/test.py')
-rwxr-xr-x[-rw-r--r--] | test/test.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/test.py b/test/test.py index d894268..ced478b 100644..100755 --- a/test/test.py +++ b/test/test.py @@ -1,3 +1,4 @@ +import os import gerberex from gerberex.dxf import DxfFile import gerber @@ -44,9 +45,18 @@ def merge2(): ctx.dump('test-merged.TXT') +os.chdir(os.path.dirname(__file__)) + #merge2() -file = gerberex.read('outline.dxf') +file = gerberex.read('data/test.GTL') +file.rotate(45) +file.write('outputs/test_changed.GTL') +file = gerberex.read('data/test.TXT') +file.rotate(45) +file.write('outputs/test_changed.TXT') + +file = gerberex.read('data/outline.dxf') file.to_metric() w = file.width file.draw_mode = DxfFile.DM_FILL |