Closed Argmaster closed 1 month ago
Attention: Patch coverage is 90.95745%
with 17 lines
in your changes missing coverage. Please review.
Project coverage is 90.49%. Comparing base (
b467888
) to head (60e789a
). Report is 10 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This pull request introduces new implementation of
VirtualMachine
interface,ShapelyVirtualMachine
utilizingshapely
library for generation of complex geometry. Alongside the implementation, unit and e2e tests are included. CurrentlyShapelyResult
allows only SVG export. Overall performance of implementation is above expectations, seems to be very close to whatpillow
based implementation offers. On Ryzen 9 7950X rendering of A64-OlinuXino_Rev_G-B_Cu.gbr takes around 20s, including parsing and compilation to RVMC. However I must admit that this is still like 10x slower than Reference Gerber Viewer, no idea what kind of black magic they are using to render this so quickly šHere is sample output:
Also, output is much cleaner than with masking approach used in drawsvg based rendering in PyGerber 2.4.1. Still, drawsvg backend will be likely implemented, since it is so easy to do so.
This virtual machine is not enabled by default in PyGerber to avoid depending on shapely and GEOS. It can be installed with
shapely
extras:Also, it is sick how easy it is to implement new virtual machines, VM code itself is like 370 lines.