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 /README.md | |
parent | 9febca7da6a730b3b3ca3a54129a9f88e5c44d14 (diff) | |
download | gerbonara-690df56bb71020901167605a87ec451081fa18d7.tar.gz gerbonara-690df56bb71020901167605a87ec451081fa18d7.tar.bz2 gerbonara-690df56bb71020901167605a87ec451081fa18d7.zip |
add rotation fuction
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -5,8 +5,8 @@ This library is designed based on [PCB tools](https://github.com/curtacircuitos/ PCB tools extension adds following function to PCB tools. -- Rotate PCB data (imprementation is not completed) -- Save loding PCB data +- Rotate PCB data +- Write back loded PCB data (original PCB tools does not work completely) - Merge multiple PCB data - Translate DXF file to gerber data @@ -25,12 +25,16 @@ ctx.merge(metal1) metal2 = gerberex.read('board2.gtl') metal2.to_metric() +metal2.rotate(-20) metal2.offset(30, 0) ctx.merge(metal2) ctx.dump('panelized-board.gtl') ``` +```rotate()``` method can be used to rotate PCB data counterclockwise. you have to specify angle in degree<br> +```offset()``` method can be used to move PCB data. Specified offset values are interpreted according to unit setting of PCB data. In case of the above code, ```board2.gtl``` move to 30mm left since ```to_metric()``` is called. + In case of Excellon drill data, you have to use ```DrillCompositon``` instead of ```GerberComposition```. ```python @@ -43,6 +47,7 @@ ctx.merge(drill1) drill2 = gerberex.read('board2.txt') drill2.to_metric() +drill2.rotate(-20) drill2.offset(30, 0) ctx.merge(drill2) |