Skip to content
OpenChipwiki

The print-correction profile

A print-correction profile is a .ocdfm file: plain JSON describing how one printer, with one resin at one set of exposure settings, departs from the geometry it is asked to print. See Print correction for how one is made and used.

It is a separate file from the project on purpose. A profile belongs to a machine and a bottle of resin, so one serves every design printed on that setup, and a .openchip file stays a description of the chip as drawn.

{
"kind": "openchip-dfm-profile",
"schemaVersion": 1,
"meta": { "...": "..." },
"compensation": { "...": "..." },
"fit": { "lateral": { "...": "..." }, "vertical": { "...": "..." } },
"coupon": { "version": 1, "widthsMm": [], "heightsMm": [] },
"measurements": []
}

Units are in the field names: Mm is millimetres, Microns is micrometres, S is seconds.

Field Type Required Notes
kind "openchip-dfm-profile" yes Marks the file as a profile.
schemaVersion integer yes 1. See Versions.
meta object yes Below.
compensation object yes Below.
fit object no Below. Defaults to manual on both axes.
coupon object yes Below.
measurements array no — defaults [] Below.

Identifies the setup. Nothing here is used by the model except xyPixelMicrons, when pixel snapping is on.

Field Type Constraint
name string Not empty. Shown in the selector and used in export file names.
printerModel string Defaults to empty.
resin string Defaults to empty.
layerHeightMicrons number Greater than zero.
exposure.normalExposureS number or null Not negative.
exposure.bottomExposureS number or null Not negative.
exposure.bottomLayers number or null Not negative.
exposure.other string Free text: lift speed, rest time and so on.
xyPixelMicrons number or null Greater than zero. null when unknown.
createdAt string ISO-8601.
notes string Free text.

The parameters an export applies.

Field Type Constraint Meaning
model "edge-bleed-v1" The only accepted value Which model the parameters belong to.
deltaXyMm number Not negative Lateral bleed per side on an isolated edge.
lateralDecayMm number Not negative, defaults 0 Decay length of stray light across a channel. 0 applies the same offset at every width.
deltaZMm number Not negative Cure-through into a channel ceiling.
snapToPixelGrid boolean Defaults false Round corrected widths to whole pixels. Ignored when xyPixelMicrons is null.

How the parameters were arrived at. fit.lateral and fit.vertical have the same shape.

Field Type Notes
method "measured", "open-closed", "manual" or "none" What the value rests on.
dataPoints number Channels that informed this axis.
rmsMm number, optional RMS residual of a measured fit.
bracketMm [low, high], optional The range an open-closed fit can place the offset in. high is null when nothing stayed open to bound it.
inconsistent number, optional Channels no single threshold could explain.
Field Type Notes
version integer Version of the coupon layout the measurements came from. Currently 1.
widthsMm number[] Channel widths on the coupon.
heightsMm number[] Channel heights on the coupon.

The raw results, one entry per coupon channel. They are kept in full so a profile can be fitted again later.

Field Type Constraint
id string Group and position, such as 2.3.
nominalWidthMm number Greater than zero. The width as drawn.
nominalHeightMm number Greater than zero. The height as drawn.
result "open", "partial", "closed" or null null when the channel was not checked.
measuredWidthMm number, optional Not negative.
measuredHeightMm number, optional Not negative.

A profile whose schemaVersion is newer than the build understands is refused, with a message saying which format it uses and which the build reads. Nothing is loaded.

This is stricter than a project file, which opens in an older build with its unknown fields preserved. A project’s unknown fields are things the build does not draw. A profile’s would be terms of a correction the build does not apply, and exporting with half a correction is worse than exporting with none.

Within a version, unknown fields are kept through a load and save.

A profile is identified by the SHA-256 of its contents, computed over the JSON with keys sorted and whitespace removed. Re-indenting a file does not change the hash; changing any value does.

The hash is what a compensated export records. Its first 12 characters go in the STL header, the full hash goes in the OpenSCAD source, and a project stores it in dfmProfileRef.

A profile that cannot be read is not loaded, and the message names the section and the field: for example Compensation parameters → deltaXyMm: lateral offset (deltaXyMm) cannot be negative. A .openchip file opened here by mistake is recognised and reported as a project.