Unable to open COPPER GERBERS on FlatCAM 8.994 and SlikScreen texts. Generated by ORCAD Allegro 17.2

Issue #614 new
Tartesos created an issue

I have created the GERBER files in ORCAD Allegro 17.2,. I have tried to open them on flatCAM 8.994,

Results:

  • Copper Top:

Gerber processing. Parsing 1365 lines.
[ERROR] Gerber Parser ERROR
Gerber Line #1278 Gerber Line Content: X13118000Y5114500D03*
IndexError('list index out of range'):
[ERROR] Object is not Gerber file or empty. Aborting object creation.
New object with name: COPPER_TOP.art. 0.733040 seconds executing initialize().
[ERROR]Open Gerber failed. Probable not a Gerber file.

  • Copper Bottom:

Gerber processing. Parsing 3458 lines.
[ERROR] Gerber Parser ERROR
Gerber Line #962 Gerber Line Content: X13118000Y5114500D03*
IndexError('list index out of range'):
[ERROR] Object is not Gerber file or empty. Aborting object creation.
New object with name: COPPER_BOTTOM.art. 1.418018 seconds executing initialize().
[ERROR]Open Gerber failed. Probable not a Gerber file.

  • SilkScreen Top and Bottom:

It opens, but the text from silkscreen does not appear.

  • Outline:

Gerber processing. Parsing 19 lines.
[ERROR] Object is not Gerber file or empty. Aborting object creation.
New object with name: OUTLINE.art. 0.003972 seconds executing initialize().
[ERROR]Open Gerber failed. Probable not a Gerber file.

Why dos no appear the the text in the SlikScreen Gerbers or the outline?. Am I doing something wrong?

Copper Bottom an Top → Maybe the board is too big?. I really don´t know where is the problem.

Comments (4)

  1. Marius Stanciu

    Hi,

    In the file COPPER_TOP.art, there is an aperture macro (a custom aperture with a custom shape) named MACRO25.

    This aperture macro is defined in the beginning of the file like this:

    %AMMACRO25*
    4,1,40,0.0,1.,
    -.086824,.992404,
    -.17101,.969846,
    -.25,.933013,
    -.321394,.883022,
    -.383022,.821394,
    -.433013,.75,
    -.469846,.67101,
    -.492404,.586824,
    -.5,.5,
    -.5,-.5,
    -.492404,-.586824,
    -.469846,-.67101,
    -.433013,-.75,
    -.383022,-.821394,
    -.321394,-.883022,
    -.25,-.933013,
    -.17101,-.969846,
    -.086824,-.992404,
    0.0,-1.,
    .086824,-.992404,
    .17101,-.969846,
    .25,-.933013,
    .321394,-.883022,
    .383022,-.821394,
    .433013,-.75,
    .469846,-.67101,
    .492404,-.586824,
    .5,-.5,
    .5,.5,
    .492404,.586824,
    .469846,.67101,
    .433013,.75,
    .383022,.821394,
    .321394,.883022,
    .25,.933013,
    .17101,.969846,
    .086824,.992404,
    0.0,1.,
    0.0*
    %
    

    The first line is the aperture macro name which is, like I said, MACRO25, the AM in the front is the aperture macro declaration command, part of the Gerber specification.

    The Gerber specification says that the first number that follows this, in our case 4 is the type of primitive that follows after.

    In our case 4 means that it is an outline that follows.
    Next number, 1 signifies that it is a filled shape that follows.

    And now the most important stuff, where the error is is.
    The next number, in our case it is 40, says that after itself there has to follow 40 + 1 pairs of values (vertex points coordinates in the format x, y).

    I say that 40 + 1 because the first pair of coordinates that follows is the origin, which needs therefore to be followed by the x,y coordinates for 40 points.

    In the end of the macro (line 41 in the above code) , the last value is always the rotation of the macro, in degrees. In our case, the last number found on line 41 is 0.0 which means a rotation of 0.0 degrees (no rotation).

    Therefore, according with the Gerber specification, between the line 3 and line 40 (including) as posted above there has to be 40 pairs of values (the 41th value that we spoke about is on the line 2).
    If we count them we find …. 38 pairs while we need 40 pairs, as declared.
    So this is not a bug of FlatCAM beta 8.994, it is a bug of the software that generated the Gerber file, Allegro 17.2. Try to change the settings in the Gerber generation page.

    For reference, page 55 from the Gerber specifications found here: https://www.ucamco.com/files/downloads/file_en/399/the-gerber-file-format-specification-revision-2020-09_en.pdf?df3a1d29deffdbc28f2712cb5a613ae6

    describes what I have written above.

  2. Tartesos reporter

    Hi Marius,
    I had never discovered the problem by myself.
    I been trying to modifiy the gerber generating options in Allegro 17.2, but there is no way to generate the copper layers properly.
    I´ll try to download the 17.4 version of ORCAD allegro and try to generate the gerbers from there.

    Thank you very much Marius for so fast and concrete answer!

  3. Marius Stanciu

    Hi,
    In any case, as you can see in the above picture, I’ve added a hack to bypass this issue. It is a hack because it may backfire in case of other situations.
    The fix is on my fork of FlatCAM currently and it will be made available for all once I will be able to make a new release.

  4. Log in to comment