Gerber viewer issue

Hello!

I have an issue with the gerber viewer functionality.
Once the gerbers are produced, if I double-click one of them, it says Kicad is already running, I say yes, and it opens the directory where all the gerber files are stored.
Now I get this error:


As I can send my files to the maker, and as he can open them, I guess there is no error, but I alway

The message is only about the file I double-clicked. Here I have double-clicked the file -bottom.gbr, and I have errors only in this file (when scrolling down, all the errors are in the -bottom.gbr file).

Is there a way to open the Gerber files correctly?

Thanks,

Pascal

This works for me:

  1. Start the gerbview tool from the icon in the Kicad project application. Or the Tools menu.
  2. Go to FIles > Open Gerber File(s)
  3. Navigate to the gerber directory. Ideally you made it a subdirectory so that it’s easy to select all the Gerber files with Ctrl-A.
  4. Click Open and it will render the files.
  5. Turn layers off or on as you wish.

Edit: You can also open the drill files in addition, but depending on the colour scheme, you may have to zoom in to see the holes. But they are rendered, as toggling that layer shows.

Hello!

Thanks for your reply. For some reason I got even more errors like this:

GerbErrors

But I found another way, even faster. I always create a folder for the Gerber files, and I noticed it appears inside of Kicad’s left column. If I open it from the left column, it just works without any further action, so I guess it will be my favorite method.

Just in case it may help somebody else:

  • To create the Gerberfiles, choose Plot from the File menu of the board editor.
  • Make a folder for your files (Plot popup window’s output directory), it will be easier than picking every file one by one when sending them. Not sure about this, but just in case, create this folder in the current kicad directory so that Kicad can automatically include it in the left menus.
  • Press plot at the popup windows’ bottom
  • Also generate drill files.

In kicad project window’s left column, you can now find the newly created folder with all the gerber files. You can now open it and browse the files directly.

Pascal

Not sure how you got that error.

A drawback with your method is that AFAICT there is no way to select all the layer and drill files from the tree view to send to Gerbview so you only see a layer at a time or have to do additional opens from Gerbview. I prefer to load all the files and toggle visibility.

Philosophically this is a case where the object oriented approach doesn’t work so well because there is no way of grouping and then invoking the open action on the group. So the fallback is the verb (action) oriented approach.

Hello!

I tried the method you mentioned, and I get the same panel as above. But I was wrong, if I click OK, it works and I can get all the gerber files displayed together.

That said, I don’t understand why the object oriented approach wouldn’t work so well. I made a few embedded graphic programs, and from my point of view, object oriented makes it easier. And I don’t see why there would be “no way of grouping”.

Well, this goes beyond the scope of this forum.

Pascal

Because it hasn’t been made possible by the UI. Maybe some future version will, dunno.

But this is related to implementation of the UI, it has no relation with whether it’s programmed in object oriented or not.

Never said anything about the programming language. It’s about whether in the interaction you first select the object then select the action on it, or select the tool, then select the objects to work on. GUIs like desktops tend to be the former but not purely. CLIs tend to be the latter, but within the tools there may be OO parts.

I get those errors for gerbers produced with other CAD tools, or if the drawings have a legend that for example shows the layer stack up and explains it. I think kicad gerbviewer expects all lines to be connected or something like that. the program “gerbv” on linux runs them all flawlessly, and I suggest you only use kicad’s gerber viewer to import edge.cuts layers into a new pcb_new file/session.

If you select other than actual gerber files, you’ll get these errors. “Open Gerber files” action cannot open drill files or job file.

EDIT: correction: it can open the job file, but it’s the one which produces the errors shown:

{
  "Header": {
    "GenerationSoftware": {
      "Vendor": "KiCad",
      "Application": "Pcbnew",
      "Version": "(5.99.0-2094-gf8bfb2bc1)"
    },
    "CreationDate": "2020-07-08T11:23:08+03:00"
  },

See the error message character by character.

This seems to be a bug in gerbview. Please report it.

If you have such files, please report a bug and attach the files there. If the files are actually in valid gerber format they should of course be read by KiCad’s gerbview.

I could reproduce the error, there are the following options in GerbView:
Open Gerber File(s)
Open Excellon Drill File(s)
Open Gerber Job File(s)

They all do what their name suggest and should display only the files that are openable (!?), however, it is possible to open a Gerber Job File using the Open Gerber File(s) option and this cause parse errors.

Application: Pcbnew
Version: (5.1.6)-1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.66.0 OpenSSL/1.1.1d (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.1.1) nghttp2/1.39.2
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.71.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.66.0
    Compiler: GCC 9.2.0 with C++ ABI 1013

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

p.s. The same error is raised when opening the files from a ZIP

I went ahead and reported it here:

they are for work and I am not sure if I am allowed to share

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.