code wiki / _hdl_build / nx_metrology.nx

nx_metrology.nx

buildroot/runtime/_hdl_build/nx_metrology.nx

3500 B81 linesdepth 3pulls 3 transitivereach 5 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_metrology.nx -- the ACCURACY GATE (operator: "i want that level of accuracy"). Given what a machine was COMMANDED to position/print vs what was MEASURED, this computes the real error and maps it to a RESOLUTION CLASS = what the machine can actually MAKE. This is the honest bridge from "how accurate is my machine" to "can it print a CPU": only SUBMICRON class reaches transistor scale; FDM class makes brackets; MICRON makes fine features / PCB traces. Inputs are nm arrays (commanded[], measured[]). All integer. Composes nx_micron_geom (nm units). LAWS: struct-free, integer-only. license_tier: ORIGINAL

dependencies 2 imports · 2 importers

nx_micron_geom.nx nx_syscalls.nx nx_metrology.nx nx_mask_geom.nx nx_precision_test.nx

imports: nx_micron_geom.nxnx_syscalls.nx

imported by: nx_mask_geom.nxnx_precision_test.nx

structs

none

consts

12const MT_CLASS_FDM: i64 = 0 // >= 50 um deviation -- enclosures, brackets, bodies
13const MT_CLASS_FINE: i64 = 1 // >= 5 um -- fine FDM / resin / PCB traces (printed electronics)
14const MT_CLASS_MICRON: i64 = 2 // >= 1 um -- 4004-class lithography (Zeloof/Hacker Fab floor)
15const MT_CLASS_SUBMICRON:i64 = 3 // < 1 um -- modern-ish CPU features (the operator's target)
17const MT_PASS: i64 = 1
18const MT_FAIL: i64 = 0

functions

20func mt_abs(x: i64) -> i64 { if x < 0 { return 0 - x } return x }
called by 1: mt_max_deviation
23func mt_max_deviation(cmd: *i64, meas: *i64, n: i64) -> i64
called by 1: main calls 1: mt_abs
35func mt_mean_offset(cmd: *i64, meas: *i64, n: i64) -> i64
called by 1: main
45func mt_scale_error_ppm(cmd: *i64, meas: *i64, n: i64) -> i64
61func mt_verdict(max_dev_nm: i64, tol_nm: i64) -> i64
called by 1: main
69func mt_resolution_class(max_dev_nm: i64) -> i64
called by 1: main
78func mt_can_make(max_dev_nm: i64, feature_nm: i64) -> i64
called by 2: mk_makeablemain