Skip to content

Commit e074a39

Browse files
authored
Release 2.0.0rc1
Tokenizer support for Gerber X3 syntax: - [x] G04 - Comment - A human readable comment, does not affect the image. - [x] MO - Mode - Sets the unit to mm or inch. - [x] FS - Format specification - Sets the coordinate format, e.g. the number of decimals. - [x] FS (Deprecated modes) - [x] AD - Aperture define - Defines a template-based aperture, assigns a D code to it. - [x] AM - Aperture macro - Defines a macro aperture template. - [x] Dnn (nn≥10) - Sets the current aperture to D code nn. - [x] D01 - Plot operation - Outside a region statement D01 creates a draw or arc object with the current aperture. Inside it adds a draw/arc segment to the contour under construction. The current point is moved to draw/arc end point after the creation of the draw/arc. - [x] D02 - Move operation - D02 moves the current point to the coordinate in the command. It does not create an object. - [x] D03 - Flash operation - Creates a flash object with the current aperture. The current point is moved to the flash point. - [x] G01 - Sets linear/circular mode to linear. - [x] G02 - Sets linear/circular mode to clockwise circular. - [x] G03 - Sets linear/circular mode to counterclockwise circular. - [x] G75 - A G75 must be called before creating the first arc. - [x] LP - Load polarity - Loads the polarity object transformation parameter. - [x] LM - Load mirroring - Loads the mirror object transformation parameter. - [x] LR - Load rotation - Loads the rotation object transformation parameter. - [x] LS - Load scaling - Loads the scale object transformation parameter. - [x] G36 - Starts a region statement which creates a region by defining its contours. - [x] G37 - Ends the region statement. - [x] AB - Aperture block - Opens a block aperture statement and assigns its aperture number or closes a block aperture statement. - [x] SR - Step and repeat - Open or closes a step and repeat statement. - [x] TF - Attribute on file - Set a file attribute. - [x] TA - Attribute on aperture - Add an aperture attribute to the dictionary or modify it. - [x] TO - Attribute on object - Add an object attribute to the dictionary or modify it. - [x] TD - Attribute delete - Delete one or all attributes in the dictionary. - [x] M02 - End of file. Tokenizer support for **DEPRECATED** Gerber features: - [x] G54 - Select aperture - This historic code optionally precedes an aperture selection Dnn command. It has no effect. Sometimes used. Deprecated in 2012. - [x] G70 - Set the 'Unit' to inch - These historic codes perform a function handled by the MO command. See 4.2.1. Sometimes used. Deprecated in 2012. - [x] G71 - Set the 'Unit' to mm - This is part of the historic codes that perform a function handled by the MO command. - [x] G90 - Set the 'Coordinate format' to 'Absolute notation' - These historic codes perform a function handled by the FS command. Very rarely used nowadays. Deprecated in 2012. - [x] G91 - Set the 'Coordinate format' to 'Incremental notation' - Part of the historic codes handled by the FS command. - [x] G74 - Sets single quadrant mode - Rarely used, and then typically without effect. Deprecated in 2020. (Spec. 8.1.10) - [x] M00 - Program stop - This historic code has the same effect as M02. Very rarely, if ever, used nowadays. Deprecated in 2012. - [x] M01 - Optional stop - This historic code has no effect. Very rarely, if ever, used nowadays. Deprecated in 2012. - [x] IP - Sets the 'Image polarity' graphics state parameter - This command has no effect in CAD to CAM workflows. Sometimes used, and then usually as %IPPOS\*% to confirm the default and then it then has no effect. Deprecated in 2013. (Spec. 8.1.4) - [x] LN - Loads a name. Has no effect. It is a comment. Sometimes used. Deprecated in 2013. (Spec. 8.1.6) - [x] Combining G01/G02/G03 and D01 in a single command. (Spec 8.3.1) - [x] Coordinate Data without Operation Code. (Spec 8.3.2) - [x] Style Variations in Command Codes. (Spec 8.3.3) - [x] Format Specification (FS) Options (Trailing Zero Omission, Incremental Notation). (Spec. 8.2) - [x] Draws and Arcs with Rectangular Apertures (Spec. 8.2.3) Parser support for Gerber X3 features: - [x] MO - Mode - Sets the unit to mm or inch. - [x] FS - Format specification - Sets the coordinate format, e.g. the number of decimals. - [x] AD - Aperture define - Defines a template-based aperture, assigns a D code to it. - [x] Define circle. - [x] Define rectangle. - [x] Define obround. - [x] Define polygon. - [x] Dnn (nn≥10) - Sets the current aperture to D code nn. - [x] D01 - Plot operation - Outside a region statement D01 creates a draw or arc object with the current aperture. - [x] D01 - Plot operation - Inside region statement adds a draw/arc segment to the contour under construction. The current point is moved to draw/arc end point after the creation of the draw/arc. - [x] D02 - Move operation - D02 moves the current point to the coordinate in the command. It does not create an object. - [x] D03 - Flash operation - Creates a flash object with the current aperture. The current point is moved to the flash point. - [x] G01 - Sets linear/circular mode to linear. - [x] G02 - Sets linear/circular mode to clockwise circular. - [x] G03 - Sets linear/circular mode to counterclockwise circular. - [x] LP - Load polarity - Loads the polarity object transformation parameter. - [x] LM - Load mirroring - Loads the mirror object transformation parameter. - [x] LR - Load rotation - Loads the rotation object transformation parameter. - [x] LS - Load scaling - Loads the scale object transformation parameter. - [x] G36 - Starts a region statement which creates a region by defining its contours. - [x] G37 - Ends the region statement. - [x] M02 - End of file. Parser support for **DEPRECATED** Gerber features: - [x] G54 - Select aperture - This historic code optionally precedes an aperture selection Dnn command. It has no effect. Sometimes used. Deprecated in 2012. - [x] G70 - Set the 'Unit' to inch - These historic codes perform a function handled by the MO command. See 4.2.1. Sometimes used. Deprecated in 2012. - [x] G71 - Set the 'Unit' to mm - This is part of the historic codes that perform a function handled by the MO command. - [x] G90 - Set the 'Coordinate format' to 'Absolute notation' - These historic codes perform a function handled by the FS command. Very rarely used nowadays. Deprecated in 2012. - [x] G91 - Set the 'Coordinate format' to 'Incremental notation' - Part of the historic codes handled by the FS command. - [x] G74 - Sets single quadrant mode - Rarely used, and then typically without effect. Deprecated in 2020. (Spec. 8.1.10) - [x] M00 - Program stop - This historic code has the same effect as M02. Very rarely, if ever, used nowadays. Deprecated in 2012. - [x] M01 - Optional stop - This historic code has no effect. Very rarely, if ever, used nowadays. Deprecated in 2012. - [x] IP - Sets the 'Image polarity' graphics state parameter - This command has no effect in CAD to CAM workflows. Sometimes used, and then usually as %IPPOS\*% to confirm the default and then it then has no effect. Deprecated in 2013. (Spec. 8.1.4) - [x] LN - Loads a name. Has no effect. It is a comment. Sometimes used. Deprecated in 2013. (Spec. 8.1.6) - [x] Combining G01/G02/G03/G70/G71 and D01 in a single command. (Spec 8.3.1) - [x] Combining G01/G02/G03/G70/G71 and D02 in a single command. - [x] Combining G01/G02/G03/G70/G71 and D03 in a single command. - [x] Coordinate Data without Operation Code. (Spec 8.3.2) - [x] Style Variations in Command Codes. (Spec 8.3.3) Rasterized2DBackend Gerber feature support: - [x] Aperture definition with circle - [x] Aperture definition with rectangle - [x] Aperture definition with obround - [x] Aperture definition with polygon - [x] Draw flash - [x] circle aperture - [x] rectangle aperture - [x] obround aperture - [x] polygon aperture - [x] Draw line - [x] Draw clockwise arc - [x] Draw counterclockwise arc
2 parents 4761a5a + cb79868 commit e074a39

526 files changed

Lines changed: 375922 additions & 15833 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bumpversion.cfg

Lines changed: 0 additions & 20 deletions
This file was deleted.

.coveragerc

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
[paths]
2-
source =
3-
src
4-
*/site-packages
5-
6-
[run]
7-
branch = true
8-
source =
9-
pygerber
10-
tests
11-
parallel = true
12-
131
[report]
14-
show_missing = true
15-
precision = 2
16-
omit = *migrations*
2+
exclude_lines =
3+
pragma: no cover
4+
if TYPE_CHECKING:

.editorconfig

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/draft_release.yaml

Lines changed: 0 additions & 65 deletions
This file was deleted.

.github/workflows/release_pr_tests.yaml

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)