-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Describe the bug
When rendering a simple gerber with rectangular pads as svg, the orientation of the pads is wrong.
To Reproduce
Steps to reproduce the behavior:
-
Run the following with this
example.gbrfile
from pygerber.gerberx3.api.v2 import GerberFile
gf = GerberFile.from_file('example.gbr').parse()
gf.render_svg("output.svg") -
You will get the output below
Expected behavior
The gerber file (here opened in the gerber viewer bundled with KiCad 8.0) should actually look like this:
Desktop:
- OS: Windows 10
- Python version: 3.12.4
- PyGerber version: 2.4.0
Additional context
I suspect this is due to gerber specifying rotation angles counterclockwise while svg uses a clockwise angle convention. I managed to fix the issue in this particular case by adding a minus sign here. There may be similar issues with other graphical primitives which I have not checked.
Metadata
Metadata
Assignees
Labels
Projects
Status