jobfile module#
Write the .gbrjob job file (spec 2020.08, JSON schema 2023.06).
The job file is the glue that lets CAM import a file set without guessing, so it is written from the first release rather than treated as an extra.
Its Path values are the final resolved filenames, which means naming runs before this writer does and the caller hands over the resolved set rather than anything here re-deriving a name.
- class StackupType(*values)[source]#
Bases:
StrEnumMaterialStackup row types.
Soldermask and legend rows exist so a stackup layer that declares itself one is not mislabeled dielectric, which is what a “everything that is not a conductor is a dielectric” walk produces.
- COPPER = 'Copper'#
- DIELECTRIC = 'Dielectric'#
- SOLDERMASK = 'SolderMask'#
- LEGEND = 'Legend'#
- SURFACE_FINISH = 'SurfaceFinish'#
- class StackupRow(type, thickness=None, name=None, material=None, dielectric_constant=None, loss_tangent=None)[source]#
Bases:
objectOne MaterialStackup entry, top to bottom. Thickness in mm.
- Parameters:
- type: StackupType#
- class FileEntry(path, function, polarity=None, file_format=None)[source]#
Bases:
objectOne FilesAttributes entry.
- Parameters:
path (
str) – the resolved filename, as written to disk.file_format (
str|None) – XNC for a drill file; omitted for Gerber, whose format is implied.function (FileFunction)
polarity (FilePolarity | None)
- function: Copper | Soldermask | Legend | Paste | Profile | Drill | Component | Job#
- polarity: FilePolarity | None = None#
- class JobFile(size, conductors, thickness=None, stackup=list(), files=list())[source]#
Bases:
objectThe job file model.
- Parameters:
- stackup: list[StackupRow]#