About X2 gerbers

This is a partially informed comment; something new in gerbers. I do not know if it is a tiny or a medium splash.

In the last 2-3 weeks I had learned about X2 gerbers, and that KiCad’s gerber viewer (at least in 5.99) can find reference designations when it opens the gbrjob file.

I have used Pentalogix viewmate for many years, and I was curious about this capability using that viewer. I inquired with their customer support and they responded nicely (remarkable for free software.) More remarkable…they tweaked the software in response to my inquiry. As of a few days ago, you can import X2 gerber files in Viewmate and find (at least reference designations.) This does not use the .gbrjob file.

I am curious as to whether anyone has insight or pros/cons comparing KiCad’s gerber viewer with Viewmate. For me the main benefit of this advanced gerber viewing capability is when I review layouts produced with other software such as Altium.

Some people use an external Gerber viewer for the single reason that if there is a bug in KiCad’s Gerber generation tools, then it is much more likely the bug would be caught by an external viewer, compared to KiCad’s own viewer.

I do not have much interest in other PCB related programs, except for to glean handy features that could be used to improve KiCad.

Thanks, paulvdh

I think much of this depends upon one’s “station in life”. I am semi-retired and doing consulting gigs as they come in. I have not yet found any clients who were using KiCad, at least not initially. Recently one client used DipTrace and others used Altium. The free viewer from Altium was inconvenient as it required setting up a license. I think that newer versions of Altium can produce X2 gerbers, but I do not know if they can produce the gbrjob file. If they cannot produce the gbrjob file, then (I think?) the Viewmate viewer offers an advantage for me over the KiCad viewer. Otherwise I find the KiCad viewer to be pretty user friendly.

Thanks to jpcharras’ connection with Ucamco, KiCad’s gerber export and gerber viewer are actually pretty advanced. Remember to test 5.99 if 5.1 seems to lack something. IIRC it sees the refdes in gerbers.

I prefer gerbv for checking my gerber files, however I am not sure how “advanced” it is, I know, however that is pretty easy to use and good enough for my needs:

Gerbv is an open source Gerber file (RS-274X only) viewer. Gerbv lets you load several files on top of each other, do measurements on the displayed image, etc. Besides viewing Gerbers, you may also view Excellon drill files as well as pick-place file

https://sourceforge.net/projects/gerbv/

Kicad 5.99 also supports X3 (generation and viewing ) so you can also see component outline, rotational centre and pin1

1 Like

Gerber X3 also has many more avancements in the specification which are not implemented in KiCad (or many other Gerber viewers for that matter)

V-score lines can be defined in the Gerbers.

  • Real pad locations (instead of guessing from solder mask layers)
  • “copper footprints” (Shorted jumpers, PCB inductors, etc) which can upset flying probe tests.
  • (Optional) Netlist information (This can be read by KiCad’s Gerbview)

https://html.duckduckgo.com/html?q=ucamco+gerber+specification

X2

X3

I am posting a screen shot of the gerber output dialog box from my 5.99 version. X2 is clearly visible but I do not see any mention of producing X3 gerbers.

Can the KiCad viewer find reference designations using X2 gerbers without a gbrjob file?

Application: KiCad PCB Editor (64-bit)

Version: (5.99.0-12088-gff9612b6da), release build

Libraries:
wxWidgets 3.1.5
libcurl/7.74.0-DEV Schannel zlib/1.2.11

Platform: Windows 10 (build 19043), 64-bit edition, 64 bit, Little endian, wxMSW

Build Info:
Date: Aug 26 2021 20:58:53
wxWidgets: 3.1.5 (wchar_t,STL containers)
Boost: 1.76.0
OCC: 7.5.0
Curl: 7.74.0-DEV
ngspice: 34
Compiler: Visual C++ 1928 without C++ ABI

Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON

If you go to the POS generation screen there is an (experimental) box for X3, basically it’s not in the main plotting screen (I also spent ages looking there months ago)

Do you mean that Gerber (experimental) as selected in my screen shot below produces X3 gerbers?

X3 is assembly information, i.e. position file, for gerber standard, therefore it’s not in the plot dialog.

That’s the one. I was about to post a screenshot

Looking at the -pnp_top.gbr and -pnp_bottom.gbr output files, it pulls the part information from the Pcbnew part footprint. This makes sense, but I generally don’t have the MFG and MPN fields from Eeschema populated in the footprint. I generate (like most everyone I think) a board BOM from Eechema using BOM button and one of the BOM scripts. So two questions:

  1. What is the proper workflow to get these fields populated so they land in the X3 output files?
  2. What part data generally needs to be in the X3 -pnp* files to manfucture an assembly? (MFG, MPN, etc.)

I assume that some ${MPN} and &{MFG} wildcard needs to be added to all the footprints to pull in the Eeschema information?

I think this is more of a UX consideration. For so longer GERBER has purely been artwork and thus there is an association with plotting.
Now GERBER is covering assembly information and thus it does make sense from a UI perspective to associate it with POS dialog since it is position/assembly information.

There however is a reasonable amount of UX inertia where GERBER is synonymous with PLOT. It will fade over time and when there is an autogenerate all data button/script it becomes less of a concern

For reference, Eurocicuits has a nice breakdown of the X3 attributes. It appears they build assemblies from native Kicad and Gerber X3.

Talking to myself, looking at the gerber_placefile_writer.cpp file in GitLab:

I think @JeffYoung can confirm, but it looks like only the part footprint name, value, library, position, and rotation are written out. Basically, replicating the .POS file data in X3 format. It appears the manufacturer and part number would not be written. It would be nice in the future to add the CMfr and CMPN fields, but I suspect some workflow issues need to be resolved. Until then, maybe a python script.

Right now there is no consistent field for such components in eeschema (have a look at kibom, it accepts multiple variables for the manf variable). Until this is standardised, it will be hard to populate these fields.
V7 is meant to have a db type capability for components, this should provide consistent key to then use

I copy from tools > edit symbol fields (there is a “select all” then I copy paste into Excel.)

Regarding some of the additional information contained in X3 gerbers; I suspect that my situation may be garbage in > garbage out. I play various “games” with footprints. A good example (I did not invent this confusing caper!) is 3 fat pads which can fit a SOT23 MOSFET or a 6 pin SOT MOSFET rotated 90 degrees. This is all mostly intended for hand built prototypes.

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