summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authoropiopan <opiopan@gmail.com>2019-03-23 21:59:13 +0900
committeropiopan <opiopan@gmail.com>2019-03-23 21:59:13 +0900
commit690df56bb71020901167605a87ec451081fa18d7 (patch)
treec1faba9ba0cb75d64d8353a94d87edbcbb8174c3 /README.md
parent9febca7da6a730b3b3ca3a54129a9f88e5c44d14 (diff)
downloadgerbonara-690df56bb71020901167605a87ec451081fa18d7.tar.gz
gerbonara-690df56bb71020901167605a87ec451081fa18d7.tar.bz2
gerbonara-690df56bb71020901167605a87ec451081fa18d7.zip
add rotation fuction
Diffstat (limited to 'README.md')
-rw-r--r--README.md9
1 files changed, 7 insertions, 2 deletions
diff --git a/README.md b/README.md
index e3fb731..6baa2ee 100644
--- a/README.md
+++ b/README.md
@@ -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)