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 region handling of boundary points from arc #61

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

Argmaster
Copy link
Owner

@Argmaster Argmaster commented Sep 11, 2023

Inspired by @jekoie issue #222 from pcb-tools repository

Below gerber file, why pcb-tools draw it in a wrong way?

G04 This file illustrates how to use levels to create holes*
%FSLAX25Y25*%
%MOMM*%
G01*
G04 First level: big square - dark polarity*
%LPD*%
G36*
X250000Y250000D02*
X1750000D01*
Y1750000D01*
X250000D01*
Y250000D01*
G37*
G04 Second level: big circle - clear polarity*
%LPC*%
G36*
G75*
X500000Y1000000D02*
G03*
X500000Y1000000I500000J0D01*
G37*
G04 Third level: small square - dark polarity*
%LPD*%
G36*
X750000Y750000D02*
X1250000D01*
Y1250000D01*
X750000D01*
Y750000D01*
G37*
G04 Fourth level: small circle - clear polarity*
%LPC*%
G36*
G75*
X1150000Y1000000D02*
G03*
X1150000Y1000000I250000J0D01*
G37*
M02*

It should be this:
image

pcb-tools draw this:
image

Above code mostly works, but required additional G01 in before rectangle region creation:

G04 Third level: small square - dark polarity*
G01*

Additionally, during development of this feature I might have revealed hidden issue with centering images with debug features enabled, further investigation is needed.

@Argmaster Argmaster added the enhancement New feature or request label Sep 11, 2023
@Argmaster Argmaster added this to the Release 2.1.0 milestone Sep 11, 2023
@Argmaster Argmaster self-assigned this Sep 11, 2023
@Argmaster Argmaster linked an issue Sep 11, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Merging #61 (edffdf0) into dev (d5c3f25) will increase coverage by 0.05%.
The diff coverage is 97.95%.

@@            Coverage Diff             @@
##              dev      #61      +/-   ##
==========================================
+ Coverage   89.94%   89.99%   +0.05%     
==========================================
  Files          96       96              
  Lines        2853     2878      +25     
==========================================
+ Hits         2566     2590      +24     
- Misses        287      288       +1     
Flag Coverage Δ
unittests 89.99% <97.95%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/pygerber/gerberx3/tokenizer/tokens/d01_draw.py 96.82% <96.15%> (-1.29%) ⬇️
...ygerber/backend/abstract/draw_commands/draw_arc.py 98.50% <100.00%> (+0.72%) ⬆️
...er/backend/rasterized_2d/draw_commands/draw_arc.py 88.88% <100.00%> (-3.12%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Argmaster Argmaster merged commit d29c8d1 into dev Sep 12, 2023
@Argmaster Argmaster deleted the feature/arc-region-bounds-support branch September 12, 2023 22:03
@Argmaster Argmaster mentioned this pull request Nov 1, 2023
Argmaster added a commit that referenced this pull request Nov 1, 2023
## Release 2.1.0

- Fixed #37
- Added latest Gerber spec file revision 2023.08 to documentation.
- Added command line interface for PyGerber 2D rendering.
- Added Gerber X3/X2 language server which can be acquired with
`pip install pygerber[language-server]`. Currently server capabilities
include hover
messages with Gerber reference cited and minimal amount of suggestions.
We are
  planning to further extend this server in future releases.
- Added `is-language-server-available` CLI command for checking if
  `pygerber[language-sever]` is available.
- Added support for arc region boundaries (#61).
- Added warning messages whenever zero surface flash is created.
- Improved documentation for many of supported Gerber commands. This
documentation is
  used by language server to provide specification reference.
- Refactored tokenizer implementation, as a result #67 was fixed and #64
is no longer an issue in some cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add region handling of boundary points from arc
1 participant