Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(plotter, renderer): add proof-of-concept renderer #388

Merged
merged 19 commits into from
Jul 10, 2022
Merged

Conversation

mcous
Copy link
Member

@mcous mcous commented Jul 4, 2022

Overview

This PR almost completely rewrites the v5 plotter for much better test coverage and adds an experimental proof-of-concept for the layer renderer.

Highlights

This plotter and renderer are able to deal with a majority of the Gerber fixtures in @tracespace/fixtures

This is mostly an internal development milestone rather than anything user facing, but there's a couple helpful debugging / inspection tool in here: pnpm dev now serves an app with the parse tree, plot tree, and render of fixture gerbers

What's left after this PR?

  • Tests (and rewrites) of rectangle stroke and macro plotting
  • Board rendering
    • Outline plotting
  • Figure out a testing strategy for the SVG renderer
  • Layer plotting / rendering of:
    • Step-repeats
    • Multi-polarity files
  • A bunch of CLI stuff
  • A bunch of website stuff
  • A bunch of docs stuff

@codecov
Copy link

codecov bot commented Jul 4, 2022

Codecov Report

Merging #388 (2de8a16) into v5 (c78492d) will increase coverage by 24.05%.
The diff coverage is 82.20%.

@@             Coverage Diff             @@
##               v5     #388       +/-   ##
===========================================
+ Coverage   69.48%   93.53%   +24.05%     
===========================================
  Files          42       36        -6     
  Lines        4516     4348      -168     
  Branches      446      604      +158     
===========================================
+ Hits         3138     4067      +929     
+ Misses       1378      281     -1097     
Impacted Files Coverage Δ
packages/parser/src/types.ts 100.00% <ø> (ø)
packages/plotter/src/graphic-plotter/plot-macro.ts 40.50% <40.50%> (ø)
...ages/plotter/src/graphic-plotter/plot-rect-path.ts 90.62% <63.63%> (ø)
packages/renderer/src/render.ts 65.87% <65.87%> (ø)
packages/plotter/src/index.ts 96.87% <95.00%> (-3.13%) ⬇️
packages/plotter/src/graphic-plotter/plot-path.ts 95.48% <95.48%> (ø)
packages/plotter/src/bounding-box.ts 99.13% <99.13%> (ø)
packages/parser/src/constants.ts 100.00% <100.00%> (ø)
packages/parser/src/syntax/drill.ts 100.00% <100.00%> (+0.40%) ⬆️
packages/parser/src/syntax/gerber.ts 100.00% <100.00%> (ø)
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c78492d...2de8a16. Read the comment docs.

@mcous
Copy link
Member Author

mcous commented Jul 6, 2022

Notes:

  • Remove CLI and snapshot tests from this PR, to noisy, do later
  • Add various missing tests called out by codecov
  • Rework drill operation mode and modal interpolate mode in GraphicPlotter; it's too easy to trigger unintended behavior

@mcous mcous changed the title refactor(plotter, renderer, cli): add proof-of-concept renderer and CLI refactor(plotter, renderer): add proof-of-concept renderer Jul 7, 2022
@mcous mcous merged commit b7a8779 into v5 Jul 10, 2022
@mcous mcous deleted the v5-renderer branch July 10, 2022 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant