← Juwen Lie

tolstack

author · 2026-11-13

githubproject/tolstackstatus/activepublic

Built tolstack: a 1-D tolerance stack-up tool that reads a STEP assembly and 2D PDF drawings, ranks the part chains between two faces, finds tolerances on the drawings and writes worst case, RSS, Cp/Cpk and Monte Carlo results to an Excel report with live formulas; Streamlit app plus CLI, reads real project hand-over folders (zip/7z, up to 2 GB uploads), 106 tests, Excel formulas checked against the Python results in real Excel

Tolerance stack-ups from 3D and 2D, straight to Excel

What it is

Pick a gap or step between two faces of a STEP assembly. tolstack finds the chain of parts in between (real face outlines, ranked candidate chains, closure checked against the 3D), reads each tolerance from the matching 2D PDF (or the general-tolerance table), and writes nominal, worst case, RSS, Cp/Cpk, ppm, yield and Monte Carlo to Excel. Inputs are yellow cells; everything else is a formula. Sheets for 2D evidence, assumptions and sign-off.

Started from the ZIRIS Rising-button tolerance analysis (2026-11-12), generalised so others can use it.

Limits

1-D only (no angles). GD&T callouts are read from the drawing text and listed; one enters the stack only when you add it as a row at ± t/2, and the GD&T font mapping is untested on real drawings. The STEP unit check only warns. Contacts are planar faces normal to the axis. 2D lookup needs a text layer or Tesseract. Results are an engineering estimate, not a replacement for measured data (FAI/CPK). Read the real ZIRIS hand-over STEP (66.5 MB, 504 parts, 5,848 Z faces, 436 MB peak memory); a full stack-up on it is not yet checked against the manual analysis. Native Creo files are converted only on a PC with a licensed Creo of the same or newer release (installed Creo 2.0 is license-blocked and cannot open the Creo 5.0 files). AICC is capped at 1 CPU / 1 Gi (default tier): STEP files above ~110 MB must be run locally.

Log