curtacircuitos / pcb-tools

Tools to work with PCB data (Gerber, Excellon, NC files) using Python.
Apache License 2.0
279 stars 135 forks source link

Png image flipped vertically #82

Open mrath opened 6 years ago

mrath commented 6 years ago

When running the example with other gerber files, the output PNG is flipped about the horizontal axis. Can't attach a screenshot, since it would contain sensitive information.
I'm assuming it's because image files usually has the Y axis pointing downwards, unlike the gerber files themselves, but I'm confused by the fact that this issue hasn't been raised before. It is also not entirely clear to me if the example code in the readme, or the example code linked to in the readme, is the "correct" way to render..?

hamiltonkibbe commented 6 years ago

It sounds like the gerber file might have the axis inverted... I don't think rendering currently supports the mirror image commands.

It would show up in the file as an MI command like: %MIA0B1*%

Either way works, the linked code is what is actually used to render the example image and demonstrates some more of the features.