Hey there! This is a Python tool I built for Tolerance Stack-Up Analysis — inspired by real engineering problems at companies like Tesla and Apple.
If you're a mechanical engineering student or working in automotive/semiconductor industries, this tool helps you validate assembly designs before manufacturing.
You define:
- A set of dimensions and tolerances forming an assembly loop
- A gap requirement (min and max acceptable gap)
Then it runs 4 analysis methods and gives you:
- Gap range (min/max) for each method
- Cpk / Process Capability index
- Yield % and Sigma Level
- Sensitivity analysis — which dimension causes the most variation
- 8-panel dashboard with charts
| Method | Description | Yield |
|---|---|---|
| Worst-Case | Arithmetic sum — most conservative | 100% guaranteed |
| RSS | Root-Sum-Square — statistical | ~99.73% (±3σ) |
| Modified RSS | Bender method (k=1.5) | Engineering compromise |
| Monte Carlo | 100,000 simulations — empirical | Realistic yield & Cpk |
- 🚗 Automotive — Tesla Battery Pack · Cell-to-Cell Gap (ISO 2768 / IATF 16949)
- 🔬 Semiconductor — Apple Silicon · Flip-Chip Bond Line (SEMI M1 / IPC-7095D)
✈️ Aerospace — Turbine Blade Tip Clearance (AS9100D)
- Python 3
- NumPy / SciPy for calculations
- Matplotlib for 8-panel engineering dashboard
- Pandas for sensitivity tables
- Google Colab compatible (.ipynb notebook included)
Option 1 — Google Colab (recommended):
Option 2 — Run locally:
- Clone the repo:
git clone https://github.com/Shajuisaac/precision-engineering-analysis-tool.git
cd precision-engineering-analysis-tool- Install dependencies:
pip install numpy pandas matplotlib scipy- Run:
python tolerance_stackup_colab.py- Manufacturing Engineering (GD&T, ISO 2768, IATF 16949, SEMI M1)
- Statistics (Normal distribution, Cpk/Cp, Six Sigma, Monte Carlo)
- Python OOP (clean class design, separation of concerns)
- Data Visualisation (matplotlib 8-panel dark dashboard)
- Design Validation (Pass/Fail logic, sensitivity analysis)