Skip to content

Releases: Argmaster/pygerber

Release 2.2.1

27 Jan 02:35
ea140b6
Compare
Choose a tag to compare
  • Fixed rendering of first macro flash.
  • Added reference page for SvgRenderer2 in docs.
  • Fixed duplicated element prefixes in docs.
  • Fixed supported feature counts in docs.
  • Updated README.md feature support links.

Release 2.2.0

23 Jan 21:34
bd8cbae
Compare
Choose a tag to compare
  • Added alternative parser implementation, pygerber.gerberx3.parser2.parser2.Parser2
    class.
  • Added introspection interface based on new Parser2 class.
  • Added macro support to Parser2 class which was not previously available in Parser
    class.
  • Added API for customizing Token classes used by Tokenizer. Tokenizer class now
    accepts optional options parameter of class TokenizerOptions.
  • Added documentation for introspection.
  • Added experimental SVG backend for Gerber code with Parser2 generated command buffers.
  • Changed documentation layout to improve readability.
  • Fixed switching to single quadrant mode being ignored.
  • Refactored feature support documentation.

Release 2.0.2

02 Jan 00:16
537047c
Compare
Choose a tag to compare
  • Fixed incorrect bounding box prediction for displaced drawings (#105).
  • Added 3.12 as supported in package tags.
  • Fixed documentation links in README.md and pyproject.toml.

Release 2.1.1

01 Jan 23:42
be3eff8
Compare
Choose a tag to compare
  • Fixed incorrect bounding box prediction for displaced drawings (#105).
  • Added 3.12 as supported in package tags.
  • Fixed documentation links in README.md and pyproject.toml.

Release 2.1.0

01 Nov 17:35
c102351
Compare
Choose a tag to compare
  • 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.

Release 2.0.1

12 Sep 22:11
2c1fe02
Compare
Choose a tag to compare
  • Fixed names of Gerber specification files (.pdf.pdf extension replaced with .pdf)
  • 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.
  • Changed 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).
  • Changed circle aperture to make result better match expectations and KiCAD reference.
  • Fixed warning message logged every time a valid region was created to show up only
    when region is not valid.
  • Added warnings for zero surface aperture draws.

Release 2.0.0

06 Sep 21:32
Compare
Choose a tag to compare
  • Added Gerber X3 format tokenizer with support for selective feature support:

    • Supported Gerber X3 features: G04, MO, FS, AD, AM, Dnn (nn≥10), D01,
      D02, D03, G01, G02, G03, G75, LP, LM, LR, LS, G36, G37,
      AB, SR, TF, TA, TO,TD, M02.

    • Supported DEPRECATED Gerber features: G54, G70, G71, G90, G91, G74,
      M00, M01, IP, LN,
      Combining G01/G02/G03 and D01/D02/D03 in a single command,
      Coordinate Data without Operation Code, Style Variations in Command Codes, FS,
      Draws and Arcs with Rectangular Apertures.

    For more detailed descriptions of supported features please refer to documentation or
    README.md.

  • Added Gerber X3 format parser with support for selective feature support:

    • Supported Gerber X3 features: G04, MO, FS, AD, AM, Dnn (nn≥10), D01,
      D02, D03, G01, G02, G03, G75, LP, LM, LR, LS, G36, G37,
      M02.

    • Supported DEPRECATED Gerber features: G54, G70, G71, G90, G91, G74,
      M00, M01, IP, LN, Combining G01/G02/G03 and D01 in a single command,
      Coordinate Data without Operation Code, Style Variations in Command Codes,
      Draws and Arcs with Rectangular Apertures.

    For more detailed descriptions of supported features please refer to documentation or
    README.md.

  • Added rendering backend capable of producing 2D rasterized images based on parser
    instructions. Supported drawing elements:

    • Aperture definition with circle
    • Aperture definition with rectangle
    • Aperture definition with obround
    • Aperture definition with polygon
    • Draw flash with circle aperture
    • Draw flash with rectangle aperture
    • Draw flash with obround aperture
    • Draw flash with polygon aperture
    • Draw line
    • Draw clockwise arc
    • Draw counterclockwise arc

Release candidate 2.0.0rc3

03 Sep 23:17
9a0ec25
Compare
Choose a tag to compare
Pre-release
  • Added changelog content.
  • Fixed outdated README.md examples (#34).
  • Added get_image() method to Rasterized2DRenderingResult and Rasterized2DResultHandle objects.
  • Added CI (#39).
  • Added issue templates (#38).

Release candidate 2.0.0rc2

19 Aug 22:46
Compare
Choose a tag to compare
Pre-release
v2.0.0rc2

Release candidate 2.0.0rc2

Release candidate 2.0.0rc1

30 Jul 17:49
e074a39
Compare
Choose a tag to compare
Pre-release

Supported Python versions: 3.8 - 3.11

Tokenizer support for Gerber X3 syntax:

  • G04 - Comment - A human readable comment, does not affect the image.
  • MO - Mode - Sets the unit to mm or inch.
  • FS - Format specification - Sets the coordinate format, e.g. the number of
    decimals.
  • FS (Deprecated modes)
  • AD - Aperture define - Defines a template-based aperture, assigns a D code to it.
  • AM - Aperture macro - Defines a macro aperture template.
  • Dnn (nn≥10) - Sets the current aperture to D code nn.
  • 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.
  • D02 - Move operation - D02 moves the current point to the coordinate in the
    command. It does not create an object.
  • D03 - Flash operation - Creates a flash object with the current aperture. The
    current point is moved to the flash point.
  • G01 - Sets linear/circular mode to linear.
  • G02 - Sets linear/circular mode to clockwise circular.
  • G03 - Sets linear/circular mode to counterclockwise circular.
  • G75 - A G75 must be called before creating the first arc.
  • LP - Load polarity - Loads the polarity object transformation parameter.
  • LM - Load mirroring - Loads the mirror object transformation parameter.
  • LR - Load rotation - Loads the rotation object transformation parameter.
  • LS - Load scaling - Loads the scale object transformation parameter.
  • G36 - Starts a region statement which creates a region by defining its contours.
  • G37 - Ends the region statement.
  • AB - Aperture block - Opens a block aperture statement and assigns its aperture
    number or closes a block aperture statement.
  • SR - Step and repeat - Open or closes a step and repeat statement.
  • TF - Attribute on file - Set a file attribute.
  • TA - Attribute on aperture - Add an aperture attribute to the dictionary or modify
    it.
  • TO - Attribute on object - Add an object attribute to the dictionary or modify it.
  • TD - Attribute delete - Delete one or all attributes in the dictionary.
  • M02 - End of file.

Tokenizer support for DEPRECATED Gerber features:

  • G54 - Select aperture - This historic code optionally precedes an aperture
    selection Dnn command. It has no effect. Sometimes used. Deprecated in 2012.
  • 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.
  • G71 - Set the 'Unit' to mm - This is part of the historic codes that perform a
    function handled by the MO command.
  • 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.
  • G91 - Set the 'Coordinate format' to 'Incremental notation' - Part of the historic
    codes handled by the FS command.
  • G74 - Sets single quadrant mode - Rarely used, and then typically without effect.
    Deprecated in 2020. (Spec. 8.1.10)
  • M00 - Program stop - This historic code has the same effect as M02. Very rarely,
    if ever, used nowadays. Deprecated in 2012.
  • M01 - Optional stop - This historic code has no effect. Very rarely, if ever, used
    nowadays. Deprecated in 2012.
  • 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)
  • LN - Loads a name. Has no effect. It is a comment. Sometimes used. Deprecated
    in 2013. (Spec. 8.1.6)
  • Combining G01/G02/G03 and D01 in a single command. (Spec 8.3.1)
  • Coordinate Data without Operation Code. (Spec 8.3.2)
  • Style Variations in Command Codes. (Spec 8.3.3)
  • Format Specification (FS) Options (Trailing Zero Omission, Incremental Notation).
    (Spec. 8.2)
  • Draws and Arcs with Rectangular Apertures (Spec. 8.2.3)

Parser support for Gerber X3 features:

  • MO - Mode - Sets the unit to mm or inch.
  • FS - Format specification - Sets the coordinate format, e.g. the number of
    decimals.
  • AD - Aperture define - Defines a template-based aperture, assigns a D code to it.
    • Define circle.
    • Define rectangle.
    • Define obround.
    • Define polygon.
  • Dnn (nn≥10) - Sets the current aperture to D code nn.
  • D01 - Plot operation - Outside a region statement D01 creates a draw or arc object
    with the current aperture.
  • 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.
  • D02 - Move operation - D02 moves the current point to the coordinate in the
    command. It does not create an object.
  • D03 - Flash operation - Creates a flash object with the current aperture. The
    current point is moved to the flash point.
  • G01 - Sets linear/circular mode to linear.
  • G02 - Sets linear/circular mode to clockwise circular.
  • G03 - Sets linear/circular mode to counterclockwise circular.
  • LP - Load polarity - Loads the polarity object transformation parameter.
  • LM - Load mirroring - Loads the mirror object transformation parameter.
  • LR - Load rotation - Loads the rotation object transformation parameter.
  • LS - Load scaling - Loads the scale object transformation parameter.
  • G36 - Starts a region statement which creates a region by defining its contours.
  • G37 - Ends the region statement.
  • M02 - End of file.

Parser support for DEPRECATED Gerber features:

  • G54 - Select aperture - This historic code optionally precedes an aperture
    selection Dnn command. It has no effect. Sometimes used. Deprecated in 2012.
  • 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.
  • G71 - Set the 'Unit' to mm - This is part of the historic codes that perform a
    function handled by the MO command.
  • 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.
  • G91 - Set the 'Coordinate format' to 'Incremental notation' - Part of the historic
    codes handled by the FS command.
  • G74 - Sets single quadrant mode - Rarely used, and then typically without effect.
    Deprecated in 2020. (Spec. 8.1.10)
  • M00 - Program stop - This historic code has the same effect as M02. Very rarely,
    if ever, used nowadays. Deprecated in 2012.
  • M01 - Optional stop - This historic code has no effect. Very rarely, if ever, used
    nowadays. Deprecated in 2012.
  • 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)
  • LN - Loads a name. Has no effect. It is a comment. Sometimes used. Deprecated
    in 2013. (Spec. 8.1.6)
  • Combining G01/G02/G03/G70/G71 and D01 in a single command. (Spec 8.3.1)
  • Combining G01/G02/G03/G70/G71 and D02 in a single command.
  • Combining G01/G02/G03/G70/G71 and D03 in a single command.
  • Coordinate Data without Operation Code. (Spec 8.3.2)
  • Style Variations in Command Codes. (Spec 8.3.3)

Rasterized2DBackend Gerber feature support:

  • Aperture definition with circle
  • Aperture definition with rectangle
  • Aperture definition with obround
  • Aperture definition with polygon
  • Draw flash
    • circle aperture
    • rectangle aperture
    • obround aperture
    • polygon aperture
  • Draw line
  • Draw clockwise arc
  • Draw counterclockwise arc