Incorrect Gerber Import: Rotated Element / Beta 8.993

Issue #441 resolved
F.Haskamp created an issue

The current beta 8.993 has issues importing Gerber files with rotated elements.

How to reproduce:

  1. In KiCad: Place a resistor footprint on the PCB, use Ctrl+M to rotate it 120 degrees, attach some tracks, plot as Gerber
  2. Check in another Gerber viewer of your choice if everything is fine (e.g. https://gerber.ucamco.com/ )
  3. Open in Flatcam: one of the resistor’s pads are missing

See attached image for an overview how it looks like in the different tools.

Note: I tried this in Flatcam 8.5 and Gerber import works there!

Comments (9)

  1. Marius Stanciu

    Hi,

    Please attach here a simple Gerber file that show the issue so I can have a look at it.
    Thank you!

  2. Marius Stanciu

    Well, it seems that KiCAD is doing a move with pen up to a location followed by a single pen down operation and it expects that to be interpreted as a Flash.

    I’ve added this modification to the Gerber parser.
    It will be available in the the 8.994 version, when released.

    Thank you for the report!

  3. F.Haskamp reporter

    Thanks for your quick check! Would be interesting to know why it already worked in version 8.5 … ?

  4. Marius Stanciu

    That’s not so hard to guess. FlatCAM beta has now more differences than similarities with FlatCAM 8.5. It supports more formats and at some point, some changes I made to support some Gerber feature/format, break the old support.

    Gerber specifications already have a correct way to describe a Gerber flash (a point exposure with an aperture) and that is using the D03 operation code but KiCAD (and maybe others) used a hack: move with pen up D02 to the flash location and there make a pen-down D01 operation code at the same location, and not moving from there, basically making a line with one point only which of course is a point (flash). Interesting is that KiCAD did used the D03 to specify the non-rotated pad so I guess this is a semi-bug (unorthodox implementation) for KiCAD.

  5. Log in to comment