From 690df56bb71020901167605a87ec451081fa18d7 Mon Sep 17 00:00:00 2001 From: opiopan Date: Sat, 23 Mar 2019 21:59:13 +0900 Subject: add rotation fuction --- test/test.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) mode change 100644 => 100755 test/test.py (limited to 'test/test.py') diff --git a/test/test.py b/test/test.py old mode 100644 new mode 100755 index d894268..ced478b --- 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 -- cgit