tolerance-stackup
/tolerance-stackup
Runs 1-D tolerance stack-ups (worst-case, RSS, Monte Carlo) on a dimension chain, ranks contributors, and estimates reject rate against a gap spec. Use when the user asks about tolerance stack-up, gap/interference analysis, clearance between parts, or how to allocate tolerances.
- Author
- BaratiLab ↗
- Repository
- mechanical-engineering-skills ↗
- Licence
- MIT
- Last repository change
- 03.11.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 1
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 03.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 1 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/stackup.py
What it does and when to use it
Runs 1-D tolerance stack-ups (worst-case, RSS, Monte Carlo) on a dimension chain, ranks contributors, and estimates reject rate against a gap spec. Use when the user asks about tolerance stack-up, gap/interference analysis, clearance between parts, or how to allocate tolerances.
Original author description
Runs 1-D tolerance stack-ups (worst-case, RSS, Monte Carlo) on a dimension chain, ranks contributors, and estimates reject rate against a gap spec. Use when the user asks about tolerance stack-up, gap/interference analysis, clearance between parts, or how to allocate tolerances.
How it works
- Workflow
- Output format
- Limits
SKILL.md preview
--- name: tolerance-stackup description: Runs 1-D tolerance stack-ups (worst-case, RSS, Monte Carlo) on a dimension chain, ranks contributors, and estimates reject rate against a gap spec. Use when the user asks about tolerance stack-up, gap/interference analysis, clearance between parts, or how to allocate tolerances. --- # Tolerance Stack-up ## Workflow 1. **Define the gap.** Name the gap being studied and its spec (LSL / USL). Draw the loop in text: `Housing face → bore bottom (+) → bearing (−) → spacer (−) → gear hub (−) → gap`. 2. **Build the chain CSV** (`scripts/example_chain.csv` shows the format). Rules: - Go around the loop in one direction; dimensions pointing the "positive" way are `+1`, the rest `-1`. - Enter unequal tolerances as `plus`/`minus` (both positive numbers). The script handles mean shift. - `dist`: `normal` for controlled processes (set `cpk`), `uniform` for unknown processes or purchased parts with no data. - Convert GD&T to ± equivalents first: position Ø0.2 → ±0.1 radial; flatness/parallelism add as their own rows. 3. **Run:** ```bash python scripts/stackup.py chain.csv --lsl 0.10 --usl 0.60 --out stack ``` 4. **Interpret** - Worst-case OK → done; tolerances can be loosened. - Worst-case fails but RSS / MC passes → acceptable for high volume if the processes really are in control; state the predicted ppm. - MC reject > 2700 ppm (beyond ±3σ) → redesign: tighten the top 1–2 contributors only, or add an adjustment (shim, slotted hole). 5. **Recommend tolerance reallocation**: tighten the contributors with the largest `pct_rss` first; loosen the ones under 5%. ## Output format - Loop diagram (text) and the chain table - Results table: Nominal | Worst-case min/max | RSS min/max | MC ±3σ | Reject ppm - Contributor chart (`stack_contrib.png`) and histogram (`stack_hist.png`) - 2–3 concrete recommendations ## Limits 1-D linear stacks only. For 2-D/3-D stacks (angular errors, chains with rotation), linearize with sensitivity coefficients: enter `direction` as the partial derivative ∂gap/∂xᵢ instead of ±1, and say so in the report.
Files in this package (3)
- SKILL.md 2 KB
- scripts/example_chain.csv 1 KB
- scripts/stackup.py 5 KB
Versions
The database has no other skills named tolerance-stackup.
Database snapshot: 13.11.2026 · package version ac90cf909a31 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 95check_tolerance
Check a part's toleranced dimensions against what the chosen manufacturing process can actually hold, with a capability index per dimension, DFM flags for too-tight bands and sub-minimum features, and an optional RSS stack-up, then record the verdict in the twin. Use when the… - 100monte-carlo-asset-health
Curated upstream guidance for Monte Carlo Asset Health; use when the workflow matches the user goal. - 100monte-carlo-asset-health
Curated upstream guidance for Monte Carlo Asset Health; use when the workflow matches the user goal. - 100cad-design-review
Review manufacturing-ready mechanical part models, engineering drawings, and assemblies. Covers ISO fits and tolerances, general tolerances (ISO 2768), ISO 20457 plastic molding tolerances, GD&T (ISO 1101 / ASME Y14.5), tolerance stack-ups, plastic snap-fit joints, and… - 100monte-carlo-analyze-root-cause
Curated upstream guidance for Monte Carlo Analyze Root Cause; use when the workflow matches the user goal. - 100monte-carlo-analyze-root-cause
Curated upstream guidance for Monte Carlo Analyze Root Cause; use when the workflow matches the user goal.