summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorHiroshi Murayama <opiopan@gmail.com>2019-09-12 23:44:50 +0900
committerHiroshi Murayama <opiopan@gmail.com>2019-09-12 23:44:50 +0900
commit00351ebe277aeb90e7463d1b0bd55402249c4687 (patch)
treea4c7f3e0e015a88af6770cfe9daa12cd21952b4d /README.md
parent4c4ba0762b30fdd4633a6d2868c508184d681b7d (diff)
downloadgerbonara-00351ebe277aeb90e7463d1b0bd55402249c4687.tar.gz
gerbonara-00351ebe277aeb90e7463d1b0bd55402249c4687.tar.bz2
gerbonara-00351ebe277aeb90e7463d1b0bd55402249c4687.zip
add IP command handling function
Diffstat (limited to 'README.md')
-rw-r--r--README.md59
1 files changed, 59 insertions, 0 deletions
diff --git a/README.md b/README.md
index 271573d..6c879f2 100644
--- a/README.md
+++ b/README.md
@@ -151,3 +151,62 @@ This example board image is generated by following scripts from [these source da
<p align="center">
<img alt="description" src="https://raw.githubusercontent.com/wiki/opiopan/pcb-tools-extension/images/panelized.jpg" width=750>
</p>
+
+## Notes
+
+### Equivalence of output
+pcb-tools-extension generate data block stream to focus equivalence of final image, but not focus equivalence of data block sequence.
+There are some difference between input data and output data as below.
+
+- **File Scope Modifier [RS-274x]**<br>
+ Sometimes, commands that affect entire image and should be specified only once in a file, such as ```MI``` (Mirror Image) command, cause contradiction when multiple gerber file are merged.<br>
+ For example, when mergeing a file containing ```%MIA1B0*%``` command and a file containing ```%MIA0B1*``` command, which command should remain as output?
+ Of cause, it is impossible that generate correct merged image by specifiing any ```MI``` command.<br>
+ pcb-tools-extension translate coordinate data reflecting these file socpe modifier to address this probrem, then ommit these modifier command.<br>
+ ```MI```, ```OF```, ```SF```, ```AS```, ```IP```, and ```IR``` are in a this category.
+
+- **Coodinate Normalizing [RS-274x, Excellon]**<br>
+ RS-274x specification and Excellon specification allow various notation to express a coordinate. However pcb-tools-extension normalize coordinate notation in order to correct deprecated notation and ease internal process as below.
+
+ - Relative coordinates are translated to absolute coordinates.
+ - Ommited coordinate values are compensated.
+ - Leading zeros are ommited.
+
+- **Unimportant Command [RS-274x, Excellon]**<br>
+ Commands not affecting final image such as comment are ommited.
+
+### Negative image polarity
+Sometimes, ```%IPNEG*%``` is specified at header of RS-274x file to create negative image. <br>
+As mentioned [above](#Equivalence%20of%20output), ```IP``` command is ommited when pcb-tools-extension generate output file. In this case, image polarity is nagated by using ```LP``` command. However this generated file doesn't equal to original file since it does'nt contain base dark image.<br>
+Please merge base dark rectangle explicitly when you handle negative image file as below.
+
+```python
+import gerberex
+
+ctx = gerberex.GerberComposition()
+base = gerberex.rectangle(width=30, height=30, left=-5, bottom=-5, units='metric')
+base.draw_mode = base.DM_FILL
+ctx.merge(base)
+metal = gerberex.read('negative_image.gtl')
+ctx.merge(metal)
+```
+
+## Limitations
+
+### RS-274x
+pcb-tools-extension cannot handle all commands that the RS-274x parser implemented in
+[pcb-tool](https://github.com/curtacircuitos/pcb-tools) doesn't handle so far.<br>
+From the imaging point of view, pcb-tools-extension has following limitations.
+
+- Files contains ```IJ``` and ```IO``` commands, that affect entire image, cannot be handled correctly.
+- Files contains ```SR``` command to specify repeated pattern cannot be handled correctly.
+- Aperture block defined by ```AB``` command cannot be handled correctly.
+
+### Excellon
+pcb-tools-extension extends excellon parser in [pcb-tool](https://github.com/curtacircuitos/pcb-tools) to support routing operation. However following limitations still remain.
+
+- User defined stored pattern defined by ```M99``` command cannot be handled.
+- Canned text specified by ```M97``` command cannot be handled.
+- Patten defined by ```M25``` command cannot be handled.
+
+