diff options
author | opiopan <opiopan@gmail.com> | 2019-03-24 11:07:13 +0900 |
---|---|---|
committer | opiopan <opiopan@gmail.com> | 2019-03-24 11:07:13 +0900 |
commit | 0d5e6744d10146dba3310cdf2f1921c086ee74b6 (patch) | |
tree | f2320a153095f0cf3707050c5c6c91d1bf735b5f /README.md | |
parent | 690df56bb71020901167605a87ec451081fa18d7 (diff) | |
download | gerbonara-0d5e6744d10146dba3310cdf2f1921c086ee74b6.tar.gz gerbonara-0d5e6744d10146dba3310cdf2f1921c086ee74b6.tar.bz2 gerbonara-0d5e6744d10146dba3310cdf2f1921c086ee74b6.zip |
change README
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 37 |
1 files changed, 31 insertions, 6 deletions
@@ -12,6 +12,13 @@ PCB tools extension adds following function to PCB tools. Only RS-274x format and Excellon drill format data can be handled by current version of this library. +## Install +PCB tools extension is not registerd to PyPI repository.<br> +Please install from GitHub repository as below. +```shell +$ pip install git+https://github.com/opiopan/pcb-tools-extension +``` + ## How to panelize Following code is a example to panelize two top metal layer files. @@ -65,15 +72,33 @@ ctx = gerberex.GerberComposition() dxf = gerberex.read('outline.dxf') ctx.merge(dxf) ``` +Circle object, Arc object, Line object and Polyline object are supported. Other kind of objects in DXF file are ignored when translating to gerber data. + +You can specify line width (default 0). PCB tools extension will translate DXF primitive shape to RX-274x line or arc sequense using circle aperture with diamater as same as specified line width.<br> + +```python +import gerberex + +dxf = gerberex.read('outline.dxf') +dxf.to_inch() +dxf.width = 0.004 +dxf.write('outline.gml') +``` + +You can also translate DXF closed shape such as circle to RX-274x polygon fill sequence.<br> +In order to fill closed shape, ```DM_FILL``` has to be set to ```drawing_mode``` property. In this mode, All object except circle and closed polyline will be ignored.<br> + +```python +import gerberex + +dxf = gerberex.read('outline.dxf') +dxf.draw_mode = gerberex.DxfFile.DM_FILL +dxf.write('outline.gml') +``` + ## Panelized board image Example This image is generated by original [PCB tools](https://github.com/curtacircuitos/pcb-tools) fucntion. <p align="center"> <img alt="description" src="https://raw.githubusercontent.com/wiki/opiopan/pcb-tools-extension/images/panelized.jpg" width=750> </p> - - -## Installation -```shell -$ git clone https://github.com/opiopan/pcb-tools-extension.git -$ pip install pcb-tools-extension
\ No newline at end of file |