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

Add PyGerber 3 VM prototype #254

Merged
merged 162 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
131f4c8
Add PyGerber 3 VM prototype
Argmaster Jul 11, 2024
fda0359
Implement simple polygon drawing
Argmaster Jul 12, 2024
a669c69
Add proper arc polygon part rendering
Argmaster Jul 12, 2024
0b8a6c7
Change version string to 3.0.0-alpha
Argmaster Jul 12, 2024
9ddede1
Add PasteLayer implementation
Argmaster Jul 12, 2024
169cd88
Rename Polygon command to Shape command
Argmaster Jul 14, 2024
0b40481
Add more Vector class tests
Argmaster Jul 14, 2024
6893a86
Add new ast scaffold
Argmaster Jul 14, 2024
c9ee3af
Move math node imports
Argmaster Jul 14, 2024
f0e76e5
Add pyparsing based parser layout
Argmaster Jul 16, 2024
9877898
Add assets for testing different token types
Argmaster Jul 16, 2024
fa46cd8
Remove deprecated Parser implementation
Argmaster Jul 16, 2024
869a8e7
Add more test assets for indivitual ast node types
Argmaster Jul 22, 2024
33bd9cf
Change AST root from list to File class
Argmaster Jul 22, 2024
09e283f
Add test assets for testing primitive 1 with rotation
Argmaster Jul 23, 2024
ef6aaf8
Add macro definition parsing
Argmaster Jul 23, 2024
c1c95bc
Add fields to primitive nodes
Argmaster Jul 23, 2024
168f82d
Add test assets for macros
Argmaster Jul 23, 2024
ff92e4b
Reorder grammar definitions in grammar.py
Argmaster Jul 24, 2024
aa64afd
Add aperture block and step repeat support
Argmaster Jul 24, 2024
f56e1b2
Add parsing of AD command
Argmaster Jul 24, 2024
4e13640
Add implementation of FS node parsing
AdeRegt Jul 25, 2024
98075f1
Add MO command parsing
Argmaster Jul 26, 2024
9662f02
Skip token tests in Parser2 related suites
Argmaster Jul 26, 2024
94313c3
Add TA extended command support
Argmaster Jul 26, 2024
3021de1
Add TD extended command support
Argmaster Jul 26, 2024
e336a7a
Add file attribute parsing logic
Argmaster Jul 26, 2024
a3a1151
Add TO attribute nodes implementation
Argmaster Jul 28, 2024
6ed6c38
Redesign Coordinate representation
Argmaster Jul 28, 2024
2e641aa
Add implementation of IP node parsing
AdeRegt Jul 29, 2024
8892da4
Add test for AstVisitor base class
Argmaster Jul 31, 2024
d5fca5c
Add implementation of IR node parsing
AdeRegt Aug 3, 2024
6f3b11d
Removed standalone command end token
Argmaster Aug 12, 2024
17e087d
Remove ExtendedCommandOpen/Close
Argmaster Aug 13, 2024
ffa88a5
Replace direct use of self._asterisk with calls to self._command()
Argmaster Aug 13, 2024
6bd6021
Add implementation of LN node parsing
AdeRegt Aug 13, 2024
3240b62
Add OF command
Argmaster Aug 13, 2024
543949d
Fix OF when A or B is not supplied
Argmaster Aug 13, 2024
95831fc
Add AS node parsing
Argmaster Aug 13, 2024
eb564b2
Add MI command parsing
Argmaster Aug 13, 2024
6c547d9
Add IN command parsing
Argmaster Aug 13, 2024
3a2895c
Add SF command parsing
Argmaster Aug 13, 2024
ffe4457
Add support for formatting G codes
Argmaster Aug 14, 2024
bf359f3
Add macro formatting
Argmaster Aug 14, 2024
d6f95fd
Add properties formatting
Argmaster Aug 14, 2024
8420bb4
Add aperture nodes formatting
Argmaster Aug 14, 2024
d2881b7
Add TA & TD formatting
Argmaster Aug 15, 2024
11e4255
Add TF formatting
Argmaster Aug 15, 2024
55d450b
Add TO formatting
Argmaster Aug 15, 2024
bf14e2c
Fix G04 formatting
Argmaster Aug 15, 2024
f4cba79
Add macro related formatting options
Argmaster Aug 17, 2024
471a173
Add intendtation options implementation
Argmaster Aug 17, 2024
1a1b0cf
Add typing-extensions package to dependencies
Argmaster Aug 17, 2024
5bbd452
Replace test logging handler with RotatingFileHandler
Argmaster Aug 17, 2024
125d9ca
Add load commands parsing
Argmaster Aug 17, 2024
9f28a3e
Add support for non-standalone G codes
Argmaster Aug 17, 2024
a13d27d
Merge branch 'feature/pygerber-3-parser' into feature/pygerber-3-form…
Argmaster Aug 17, 2024
762979f
Add PyGerber 3 formatter #1 (#272)
Argmaster Aug 17, 2024
8b8910a
Add formatter options for non standalone codes
Argmaster Aug 17, 2024
e88239e
Fix assert in formatter test
Argmaster Aug 17, 2024
9c9401c
Add load commands formatting
Argmaster Aug 18, 2024
5593607
Fix parsing and formatting of SR block
Argmaster Aug 18, 2024
c278f58
Add empty_line_before_polarity_switch implementation
Argmaster Aug 19, 2024
24f86a1
Add test_step_and_repeat_body_indent()
Argmaster Aug 19, 2024
8c0bef6
Add formatter presets
Argmaster Aug 19, 2024
bbe7be9
Improve Shape docstring
Argmaster Aug 19, 2024
7c31175
Extract enums used by nodes into separate module
Argmaster Aug 19, 2024
7ce8da4
Add common base class for all AD command variants
Argmaster Aug 19, 2024
99b3c2a
Add AB class for wrapping whole AB blocks
Argmaster Aug 19, 2024
4f63df0
Add AM class for aperture macro wrapping
Argmaster Aug 19, 2024
3939c6f
Fix nested AB parsing
Argmaster Aug 19, 2024
e8168fc
Add SR class for wrapping whole SR blocks
Argmaster Aug 19, 2024
7866d07
Add aperture creating commands to StateTrackingVisitor
Argmaster Aug 19, 2024
18cde8d
Add attribute tracking logic to StateTrackingVisitor
Argmaster Aug 19, 2024
c4de2f9
Add D01 handling to StateTrackingVisitor
Argmaster Aug 21, 2024
2b77f5e
Fix poe calls + add pytest_mock
Argmaster Aug 22, 2024
362048e
Add tests for aperture callbacks
Argmaster Aug 22, 2024
eb9f067
Replace aperture_identifier with aperture_id for consistency
Argmaster Aug 22, 2024
e513fe3
Improve abstraction in expression definition in grammar
Argmaster Aug 22, 2024
4401024
Improve abstraction in expression definition in grammar
Argmaster Aug 23, 2024
93c834d
Add separate draw handlers for region mode
Argmaster Aug 23, 2024
6363d27
Remove location and source parameters from hand crafted Node instances
Argmaster Aug 23, 2024
569c1f2
Remove location and source parameters from hand crafted Node instances
Argmaster Aug 23, 2024
e50d6d3
Fix expression handling & add tests for explicit_parenthesis in Forma…
Argmaster Aug 24, 2024
9cf28c3
Add support for arc interpolation swapping
Argmaster Aug 24, 2024
3a6e73e
Fix error message for D01 with no aperture selected
Argmaster Aug 24, 2024
bb5b335
Add StateTrackingVisitor support for G90 & G91
Argmaster Aug 24, 2024
2ca3572
Add StateTrackingVisitor support for load commands
Argmaster Aug 24, 2024
c209d47
Add StateTrackingVisitor support for M00 & M02
Argmaster Aug 24, 2024
738890c
Fix MD5 checking
Argmaster Aug 24, 2024
70e42f1
Rename visitor.py module to ast_visitor.py for consistency
Argmaster Aug 24, 2024
b5c153f
Add StateTrackingVisitor support for property commands
Argmaster Aug 24, 2024
6ca4a98
Fix state_tracking_visitor.py docstring
Argmaster Aug 25, 2024
16e3d86
Add ExpressionEvalVisitor for evaluating math expressions
Argmaster Aug 25, 2024
4a4a05e
Extend ExpressionEvalVisitor test suite
Argmaster Aug 25, 2024
eeaabf8
Ignore failures in legacy code
Argmaster Aug 25, 2024
30a272e
Replace list with List in type hints for backwards compatibility
Argmaster Aug 25, 2024
3fc3629
Make staticmethods in Formatter a free functions
Argmaster Aug 25, 2024
e912b5d
Add test for coordinate format selection
Argmaster Aug 25, 2024
4d16851
Replace dict with Dict in type hints for backwards compatibility
Argmaster Aug 25, 2024
4e07559
Add PyGerber 3 Parser implementation (#256)
Argmaster Aug 26, 2024
d955549
Remove Unit class from vm
Argmaster Aug 26, 2024
132f600
Add integration tests for arc drawing
Argmaster Aug 27, 2024
54bc049
Add reference image comparison to test_pillow.py
Argmaster Aug 27, 2024
e410384
Redesign layer handling to support auto sizing [no ci]
Argmaster Aug 27, 2024
6918e68
Add tests for AutoBox handling
Argmaster Aug 28, 2024
b0a7930
Restructurize vm internals
Argmaster Aug 30, 2024
e72cca6
Add unit tests for VM base class
Argmaster Aug 31, 2024
4c971e2
Add unit tests for Line class
Argmaster Aug 31, 2024
a30f857
Add unit tests for Arc segment class
Argmaster Aug 31, 2024
f593298
Wrap VM commands in RVMC object
Argmaster Aug 31, 2024
09f9bd1
Rename main layer to %main% to avoid name collisions
Argmaster Sep 1, 2024
803e700
Update test/.gitignore
Argmaster Sep 1, 2024
7d92cbb
Add obround factory function for Shape
Argmaster Sep 1, 2024
ee30332
Add coordinate handling to StateTrackingVisitor
Argmaster Sep 1, 2024
821f62e
Remove dashes from asset paths
Argmaster Sep 1, 2024
1208acc
Add DPMMTooSmallError for arc with segment count < 1
Argmaster Sep 1, 2024
1f6e722
WIP [skip ci]
Argmaster Sep 1, 2024
3ff25f5
Fix bounding box handling in vm
Argmaster Sep 7, 2024
cd590f8
Add polygon aperture handling implementation
Argmaster Sep 7, 2024
1c8de59
Add e2e tests for flash rotations on rectangle std template
Argmaster Sep 7, 2024
a756de7
Add e2e test FcPoly_Test.top
Argmaster Sep 7, 2024
56bc5f1
Add basic Gerber AST builder
Argmaster Sep 8, 2024
b7f23a2
Add pad handling to GerberX3Builder
Argmaster Sep 9, 2024
a393d32
Add custom pad construction API to GerberX3Builder
Argmaster Sep 9, 2024
29e303a
Add macro code 0 primitive support to compiler
Argmaster Sep 9, 2024
644c461
Add macro code 2 & 20 primitive support to compiler
Argmaster Sep 10, 2024
77add4d
Add macro code 4 primitive support to compiler
Argmaster Sep 10, 2024
62f6f7a
Add macro code 5 primitive support to compiler
Argmaster Sep 10, 2024
01b0a85
Add macro code 6 primitive support to compiler
Argmaster Sep 10, 2024
be31707
Add macro code 7 primitive support to compiler
Argmaster Sep 11, 2024
b2622ad
Add macro code 21 primitive support to compiler
Argmaster Sep 11, 2024
4c99bf3
Add macro code 22 primitive support to compiler
Argmaster Sep 11, 2024
b8402f4
Add clockwise multi quadrant arc support to compiler
Argmaster Sep 11, 2024
4ab20ec
Add region support (no legacy) to compiler
Argmaster Sep 12, 2024
dcf4a0a
Add more E2E tests, fix obrounds
Argmaster Sep 12, 2024
5a9462a
Add return value to AstVisitor interface
Argmaster Sep 13, 2024
54c07ed
Add test suite for coordinate packing and unpacking
Argmaster Sep 14, 2024
c94ad9b
Remove use_parent from on_coordinate_* in ReBuilderVisitor
Argmaster Sep 14, 2024
8ddf44e
Add aperture block support to compiler
Argmaster Sep 14, 2024
c361906
Remove legacy tests
Argmaster Sep 14, 2024
eb48e6b
Fix test_state_tacking_visitor
Argmaster Sep 14, 2024
08ca0f9
Fix _Draw object annotations
Argmaster Sep 14, 2024
4271748
Add SR support to compiler
Argmaster Sep 15, 2024
b3517dd
Add OLinuXino rev G based benchmark
Argmaster Sep 15, 2024
5bcab0a
Restore arc point density
Argmaster Sep 15, 2024
c61f2b7
Migrate ls to new parser
Argmaster Sep 15, 2024
5ab7864
Rename negative to is_negative
Argmaster Sep 15, 2024
afa645b
Add xfail to ls completion test
Argmaster Sep 15, 2024
447857f
Add PyGerber 3.0.0 AST to RVMC compiler (#285)
Argmaster Sep 15, 2024
dab693f
Add NodeFinder class for searching for nodes by location
Argmaster Sep 15, 2024
6e2621d
Add hover messages for D01
Argmaster Sep 16, 2024
70004fe
Extend hover messages for D01, D02 & D03
Argmaster Sep 17, 2024
ac6b7cf
Extend language server hover actions
Argmaster Sep 17, 2024
2d9286f
Add code completion
Argmaster Sep 19, 2024
673b75e
Add more extended command suggestions
Argmaster Sep 19, 2024
032c51c
Fix on_hover selection range
Argmaster Sep 20, 2024
bb2954e
Move language server to new parser (#292)
Argmaster Sep 20, 2024
abeea95
Remove legacy docs
Argmaster Sep 20, 2024
4d20e7f
Merge remote-tracking branch 'origin/main' into feature/pygerber-3-vm
Argmaster Sep 20, 2024
ca57691
Update version to 3.0.0a0
Argmaster Sep 20, 2024
5f47ce5
Merge branch 'main' into feature/pygerber-3-vm
Argmaster Sep 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
exclude: '^(\.tox|\.env|dist|\.vscode)(/|$)'
repos:
- repo: https://github.com/python-poetry/poetry
rev: "1.8.2"
hooks:
- id: poetry-check

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.1.0"
hooks:
Expand Down
177 changes: 0 additions & 177 deletions docs/70_gerber/50_legacy/20_api_v1_usage.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/70_gerber/50_legacy/21_api_v1_reference.md

This file was deleted.

Loading
Loading