gerber module#

The relay into jitxlib-gerber.

The only module that imports jitxlib.gerber, and it does so inside the call rather than at module level: the plugin module is imported whenever anything enumerates jitx plugins, and a top-level chain from there would make importing a stackup expensive.

The registry (jitx.plugin.Export.get(“gerber”)) is deliberately not used. That is introspection machinery for the CLI, which derives its flags from the signature of export(), so everything reachable that way is a flat scalar. A direct import takes a configured naming strategy, a drill format and the compatibility adjustments, and gets the written file set back.

class Board(archive, files=list())[source]#

Bases: object

What the relay produced, as the packet and order sheet need it.

Parameters:
archive: Path | None#

The gerber zip, at the packet root.

files: list[tuple[str, str]]#

(file function, filename) for every gerber file written. For an archive these are the names inside it; nothing is on disk but the zip.

export(design, packet, stem, *, overwrite=False, creation_date=None)[source]#

Write the gerber set as the single archive JLCPCB’s form takes.

Passing an output path ending in .zip writes exactly that archive with the files at its root and nothing beside it, which is the layout the upload form expects and what the packet wants sitting next to the CSVs.

Return type:

Board

Parameters: