gerbview aperture macros optional arguments to primitives ignored

Bug #1852924 reported by julian on 2019-11-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Committed
Undecided
jean-pierre charras

Bug Description

Gerber allows optional primitive arguments (e.g. for circles an optional rotation parameter can be given). While the appropriate behaviour to handle them is is properly documented in the code, it is not implemented.

This results in the 'sample_macro.gbr' of the Ucamco test suite (https://www.ucamco.com/files/downloads/file/210/gerber_file_format_examples%2020181113.zip)
 getting parsed incorrectly (see attached images).

The fix is simple. I have attached a patch.

julian (joposter) wrote :
julian (joposter) wrote :
julian (joposter) wrote :
Nick Østergaard (nickoe) wrote :

I assume this patch is for master, but for completeness, please state what version you use for the unpatched case.

tags: added: gerber gerbview import
Changed in kicad:
milestone: none → 6.0.0-rc1
julian (joposter) wrote :

Yes, sorry for not providing the version info.

Unpatched version:

Application: GerbView
Version: (5.99.0-207-g1a3f4fb38), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.67.0 OpenSSL/1.1.1d zlib/1.2.11 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh2/1.9.0 nghttp2/1.39.2
Platform: Linux 5.3.11-arch1-1 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    Build date: Oct 6 2019 18:56:13
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.69.0
    OpenCASCADE Technology: 7.3.0
    Curl: 7.66.0
    Compiler: GCC 9.1.0 with C++ ABI 1013

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=OFF
    KICAD_USE_OCC=ON
    KICAD_SPICE=ON

@Julian,
Good catch.
I fixed it.
Your patch helped me a lot...
Thanks.

Changed in kicad:
milestone: 6.0.0-rc1 → 5.1.6
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 32043cfa26a107ac87e62538a55d615836bc1691
https://git.launchpad.net/kicad/patch/?id=32043cfa26a107ac87e62538a55d615836bc1691

Changed in kicad:
status: New → Fix Committed
assignee: nobody → jean-pierre charras (jp-charras)
Julian Daube (julian.daube) wrote :

@jp-charras

Thank you for fixing this so quickly!

Sorry my patch was a bit hacky. After checking back with the spec indeed only circles can have an optional rotation argument, my bad.

Have a nice day :)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers