-
Notifications
You must be signed in to change notification settings - Fork 14
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
Release 2.1.0 #59
Release 2.1.0 #59
Conversation
## Command line usage After installing `pygerber`, depending on your environment, it should become available in your command line: ```bash pygerber --version ``` Output should be similar to one below **⇩**, where `x.y.z` should match version of PyGerber installed. ``` $ pygerber --version pygerber, version x.y.z ``` Use `--help` to display help messages with lists of subcommands and subcommand options: ``` pygerber raster-2d --help ``` To render 2D PNG image of some gerber file you can simply use: ``` pygerber raster-2d gerber-source.grb ``` Image will be saved to `output.png` in current working directory. ![example_pcb_image](https://github.com/Argmaster/pygerber/assets/56170852/9bca28bf-8aa6-4215-aac1-62c386490485)
This pull request attempts to fix some of the rendering differences between KiCAD and PyGerber. Currently following changes have been made: - Added `draw_region_outlines` option (disabled by default) which controls whether lines which make up a region boundary should be drawn after region is filled. KiCAD seem to assume that those boundaries are not drawn and region outline is 1px instead of thickness of aperture. - Increased expected Decimal precision to 60 decimal places. - Changed precision of `INCH_TO_MM_MULTIPLIER` (now its `25.4`) and `MM_TO_INCH_MULTIPLIER` (dynamically calculated with `Decimal`). ![image](https://github.com/Argmaster/pygerber/assets/56170852/9b587ab5-704d-4868-a60d-5ea5e6e12594)
Codecov Report
@@ Coverage Diff @@
## main #59 +/- ##
==========================================
- Coverage 91.31% 85.68% -5.64%
==========================================
Files 93 124 +31
Lines 2810 3605 +795
==========================================
+ Hits 2566 3089 +523
- Misses 244 516 +272
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Inspired by @jekoie issue [#222](curtacircuitos/pcb-tools#222) from [pcb-tools](https://github.com/curtacircuitos/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](https://user-images.githubusercontent.com/6836400/172787712-5ddd91e5-4682-44b9-943a-ffee0fd6e45c.png) > > pcb-tools draw this: > ![image](https://user-images.githubusercontent.com/6836400/172787860-53f069e2-cfad-451a-b649-dacf4ab74673.png) 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.
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.278 to 0.0.289. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](astral-sh/ruff@v0.0.278...v0.0.289) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
- better specification references in token docstrings. - better specification references in warnings.
Bumps [tzlocal](https://github.com/regebro/tzlocal) from 5.0.1 to 5.1. - [Changelog](https://github.com/regebro/tzlocal/blob/master/CHANGES.txt) - [Commits](regebro/tzlocal@5.0.1...5.1) --- updated-dependencies: - dependency-name: tzlocal dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.3.0 to 2.4.2. - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md) - [Commits](pydantic/pydantic@v2.3.0...v2.4.2) --- updated-dependencies: - dependency-name: pydantic dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pyparsing](https://github.com/pyparsing/pyparsing) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/pyparsing/pyparsing/releases) - [Changelog](https://github.com/pyparsing/pyparsing/blob/master/CHANGES) - [Commits](pyparsing/pyparsing@3.1.0...3.1.1) --- updated-dependencies: - dependency-name: pyparsing dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.289 to 0.1.2. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@v0.0.289...v0.1.2) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 3.4.0 to 3.5.0. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](pre-commit/pre-commit@v3.4.0...v3.5.0) --- updated-dependencies: - dependency-name: pre-commit dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [lsprotocol](https://github.com/microsoft/lsprotocol) from 2023.0.0a3 to 2023.0.0b1. - [Release notes](https://github.com/microsoft/lsprotocol/releases) - [Commits](microsoft/lsprotocol@2023.0.0a3...2023.0.0b1) --- updated-dependencies: - dependency-name: lsprotocol dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [mkdocs](https://github.com/mkdocs/mkdocs) from 1.5.2 to 1.5.3. - [Release notes](https://github.com/mkdocs/mkdocs/releases) - [Commits](mkdocs/mkdocs@1.5.2...1.5.3) --- updated-dependencies: - dependency-name: mkdocs dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [mkdocs-literate-nav](https://github.com/oprypin/mkdocs-literate-nav) from 0.6.0 to 0.6.1. - [Release notes](https://github.com/oprypin/mkdocs-literate-nav/releases) - [Commits](oprypin/mkdocs-literate-nav@v0.6.0...v0.6.1) --- updated-dependencies: - dependency-name: mkdocs-literate-nav dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.21 to 9.4.7. - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](squidfunk/mkdocs-material@9.1.21...9.4.7) --- updated-dependencies: - dependency-name: mkdocs-material dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Release 2.1.0
pip install pygerber[language-server]
. Currently server capabilities include hovermessages with Gerber reference cited and minimal amount of suggestions. We are
planning to further extend this server in future releases.
is-language-server-available
CLI command for checking ifpygerber[language-sever]
is available.used by language server to provide specification reference.