naming module#

JLCPCB’s recommended gerber filenames, as a jitxlib-gerber strategy.

Registered in the jitxlib.gerber.naming entry-point group, so jitx design export gerber –names jlcpcb picks it up with nothing to patch in that package. The table is from JLCPCB’s “Suggested Naming Patterns” and their gerber preparation article.

XLN_EXT = '.XLN'#

JLCPCB’s preferred drill extension. .TXT is understood but multiple .TXT files raise a merge warning on their side.

class JLCPCBNaming[source]#

Bases: FileNaming

Protel-style names, which JLCPCB recommends over descriptive ones.

Defers (returns None) for paste, component and job files: those conventions predate X3 entirely and inventing extensions for them would be worse than falling back to descriptive.

name(function, stem, file_set)[source]#

The complete filename for one file, or None to defer.

Parameters:
  • function (Copper | Soldermask | Legend | Paste | Profile | Drill | Component | Job) – what the file is, as the structured description it already carries for its TF.FileFunction attribute, so a scheme branches on data rather than on a rendered string.

  • stem (str) – the scrubbed design name. Conventions that replace the extension entirely need it, which is why the strategy returns a whole filename rather than a suffix.

  • file_set (Sequence[Copper | Soldermask | Legend | Paste | Profile | Drill | Component | Job]) – every file function in the set being written, in emission order. Real conventions are not per-file functions of one file - whether a drill name needs decorating depends on whether the other drill file exists - so the set is passed even though many schemes will ignore it.

Return type:

str | None