1. are you affected?

Almost certainly yes. You should read this and probably make adjustments in your scripts and/or GUI usage, if you ever export to gerber.

If you use only other exporters but you need to have scripts to rename files or call multiple exporters for a single export job, you should also consider switching to CAM which could make your life easier.

I know every change is a hassle to users, "why fix what's not broken", etc., but after spending a lot of time thinking over how to do this CAM feature, I think I found a way that will really make everyone's life easier compared to what we have now.

2. export vs. cam - the future of direct exporting

Direct exporting still works and will work after the transition. We are merely separating two concepts:

The direct export path is for the simple case: when you want the default png render or gerber files with whatever names, just to open them with gerbv.

As soon as you want more, for example control over the file names of the gerber export, a different selection of layer groups exported in any format, you should use the CAM jobs.

It also turns out that the most common output paths, gerber for fab houses and ps/png for toner transfer, are affected: they are both becoming simpler and more efficient with CAM jobs. In fact, our original ps export and gerber export are already hardwired jobs: they do multiple exports onto multiple pages/files, they are just not much configurable about the details. The original gerber exporter even does multi-format job: it also exports excellon drill files, which are not the same format as gerber drill files.

The main reason for the switch-over is that over the decades export plugins grew kludges for handling file names (e.g. gerber name styles), for which layers should be exported, plus a lot of special casing options (e.g. "--as-shown" or "--monochrome"). The main problems with this:

3. gerber: how to use the new system: CLI

If you did this before you should do this instead
pcb-rnd -x gerber --name-style FOO bar.lht pcb-rnd -x cam gerber:FOO bar.lht
pcb-rnd -x gerber --name-style FOO --gerberfile g/bar bar.lht pcb-rnd -x cam gerber:FOO --outfile g/bar bar.lht

where FOO is an old gerber name style, gerber:FOO is a new CAM job name and bar.lht is the board file name.

4. gerber: how to use the new system: GUI

This works with GTK only at the moment, but as soon as the tree table widget is finished for lesstif, it will be automatically available for lesstif too.

Instead of the export dialog, please use the cam dialog, that can be invoked by the cam() action or the {f c} key sequence.

CAM dialog screenshot

The cam dialog is arranged similar to the library window and the padstack library window and the property editor dialog, etc.

It offers a list of CAM jobs on the left side. There is a filter entry on the bottom, which can reduce the number of jobs by name fragment, pretty much how the filter works in the library window.

On the right you see details of the selected job: on the top section the source of the job, which reveals the recipe, what the cam job will do (what layer groups are exported using what exporters into which files). On the bottom right there are options that may change the behavior of the CAM job; most notably the output file path, whose default value is derived from the board's file name.

5. what's the approximate schedule of the switch-over

First, we should get cam tested out. We are releasing the new cam GUI and other new cam features with our next release. Meanwhile we have a freeze on these sort of settings: no new gerber name-styles (but we will have new cam jobs instead), and no new "rendering modification implemented in only one export plugin" (but new generic, available-for-all-exporters cam options). Gerber/excellon: we now have a separate excellon export, but the gerber exporter still calls excellon when used without CAM.

Then we start promoting it over some old export hacks. This means whenever users ask how to solve certain export related problem, we will prefer offering a CAM job script instead of a long command line with exotic settings for a direct export.

Then later on, probably in a few months, I will mark a lot of those direct export flags deprecated. This means pcb-rnd will give loud warning when they are used, directing the user to the cam jobs. The main victim of this will be gerber's name-style parameter, but for example png's --only-visible and --monochrome will be like that too.

Later I will even hide these settings from the help and from the GUI. New users won't see them. Old scripts calling them will still work, with the loud warnings.

Even later, probably much later, I will remove the deprecated settings and old scripts will get an error message for unknown arguments. At this point I will remove the gerber->excellon implication. If someone does a direct gerber export, that will result in gerber files only (including gerber drill files, but NO excellon cnc files).

At the end we will have much less per exporter settings and they will be really specific to the given file format (e.g. png's DPI setting) and much more central, CAM based options (e.g. render with color or render in monochrome) that will work the same way on all exporters.

6. What will be the file names for direct gerber export after the switch?

6.1. the pcb-rnd name style

A new name style, called pcb-rnd is available in gerber. This is also the default name style now.

The pcb-rnd name style inserts the following string in between the file name prefix (--gerberfile) and the "extension" (.gbr for gerber and .cnc for excellon):

.location.type.purpose.groupID

If a portion of the string does not exist, e.g. the layer group has no purpose set, it's written as "none".

So a typical file name for foo.lht will look like this:

foo.top.copper.none.3.gbr
where none indicates the purpose string for the top copper group was empty and 3 is the unique layer group ID.

Rationale: this format avoids redundant file names (accidental overwrite of files during the export) and allows exporting all present and future layer groups without modifications. It also makes file listing/selecting easier, for example:

6.2. FAQ

1. Why can't we just use the user assigned group names?

Because they are not unique. You can still do that, tho, using CAM, but the purpose of the non-CAM naming style includes having unique file names.

2. But these names are so long and ugly!

If you prefer a different name style, please create (and share) a CAM job for that, it's really easy.

3. Where's my outline file?

The unplated, routed outline is called *.global.boundary.uroute.*.gbr

4. Why do we include the layer group ID?

To make the file name unique: it is possible to have multiple groups of the same type, location and purpose. The most trivial example is internal copper groups. Another good example is doc groups.

5. Internal copper group file numbering is random, doesn't even respect the physical order of the groups within the stack!

Yes, because we use the group ID, not the group offset. For most programmatic usage you will need the offset, and you can very easily get that with CAM jobs.

6. Why drills are 'virtual'?

Because we do not have an explicit, drawable drill layer: the only way to make drilled holes in pcb-rnd is using padstacks. The slot of a padstack ends up in a mech layer, but for historical reasons, the drills have their own virtual layers (which pre-dates mech layer groups).

7. Why do we use 'none', can't we just omit those portions?

If we use an explicit 'none', we keep things simpler as the field with the same meaning will end up in the same part of the file name regardless of how many other parts are missing.