PyGerber Bug Report
Mandatory checks
Before opening this issue:
#242
To Reproduce
Run below code with errtest-F_Paste.txt (note, wouldn't let me upload .gbr so I changed it to a .txt, just change it back)
from pygerber.gerberx3.api.v2 import GerberFile
GerberFile.from_file('errtest-F_Paste.gbr').parse().render_svg("output.svg")
Should result in

(Note: rounded rectangle macros generated by KiCad, not normal rectangles)
Expected behavior
Image should be this (from KiCad gerber viewer)

Also, output from raster renderer

Additional context
Initially thought the issue was inverted rotation, like with the rectangle issue, however it became clear its y axis inversion when looking at asymmetric elements (unfortunately I couldn't figure out how to make an original test file with such elements). I poked around trying to fix it myself for a bit, and I think the issue is somewhere around render_flash_macro in renderer2/svg.py. Changing flip_y=False (668 svg.py) to True sort of fixed the issue, but affected elements were misplaced vertically.
Environment:
Please complete the following information:
- Operating system: Windows 10
- Python version: 3.11.0
- PyGerber version: 2.4.2
Optional checks
PyGerber Bug Report
Mandatory checks
Before opening this issue:
duplicate.
resolved or marked as won't fix.
known issue.
known issue.
#242
To Reproduce
Run below code with errtest-F_Paste.txt (note, wouldn't let me upload .gbr so I changed it to a .txt, just change it back)
Should result in
(Note: rounded rectangle macros generated by KiCad, not normal rectangles)
Expected behavior
Image should be this (from KiCad gerber viewer)
Also, output from raster renderer
Additional context
Initially thought the issue was inverted rotation, like with the rectangle issue, however it became clear its y axis inversion when looking at asymmetric elements (unfortunately I couldn't figure out how to make an original test file with such elements). I poked around trying to fix it myself for a bit, and I think the issue is somewhere around render_flash_macro in renderer2/svg.py. Changing
flip_y=False(668 svg.py) to True sort of fixed the issue, but affected elements were misplaced vertically.Environment:
Please complete the following information:
Optional checks
of PyGerber for regression testing purposes.
an agreement described in first checkbox in this section.
an agreement described in first checkbox in this section.