June 4, 2026 Β· Ongoing Project

TolAnalyzer

Every mechanical engineer has been there: a stack of 2D PDF drawings, a spreadsheet with manually typed dimensions, and the nagging worry that a transcription error will slip through and invalidate the entire tolerance analysis. TolAnalyzer is the tool I'm building to fix that. It uses AI to extract GD&T callouts directly from engineering PDFs and feeds them into a 1D Worst-Case and RSS stack-up engine β€” bridging the gap between error-prone spreadsheets and the $25K+ 3D variation analysis suites most teams can't justify.

System Architecture

The pipeline takes a PDF drawing from upload to a computed tolerance report. CAD-exported vector PDFs take the fast, deterministic text-layer path; scanned drawings fall back to an LLM-assisted extraction.

flowchart TD A["πŸ“„ PDF Upload"] --> B["πŸ” Page Classifier"] B -->|"vector (primary)"| C["πŸ“ PyMuPDF Text-Layer Reader"] B -->|"scanned (fallback)"| D["πŸ–ΌοΈ OpenCV Region Detection"] D --> E["πŸ€– LLM Extraction Backend\n(Gemini / Claude CLI)"] C --> F["βš™οΈ Dimension-String Parser\n(comma/dot, Ø/R, Β±, GD&T)"] E --> F F --> G["πŸ“ Default Tolerance Resolver\n(explicit β†’ title_block β†’ ISO-2768 β†’ …)"] G --> H["πŸ‘οΈ Human Review UI\n(bounding-box overlay + approval)"] H --> I["πŸ”— Assembly Reference Linking"] I --> J["πŸ”„ Loop Builder\n(closed chain + closure check)"] J --> K["πŸ“Š Stack-Up Engine\n(WC + RSS, pure math)"] K --> L["πŸ“‹ Immutable Report\n(JSON + SHA-256 checksum)"] style A fill:#e8f4f8,stroke:#0284c7 style C fill:#d1fae5,stroke:#059669 style D fill:#fef3c7,stroke:#d97706 style E fill:#fef3c7,stroke:#d97706 style H fill:#ede9fe,stroke:#7c3aed style K fill:#dbeafe,stroke:#2563eb style L fill:#f0fdf4,stroke:#16a34a

Tip: Pinch to zoom or scroll horizontally on mobile.

The Challenge: Why Build This?

Tolerance stack-up analysis is critical for design verification β€” it tells you whether your parts will actually fit and function when manufactured at the limits of their tolerances. But today, most engineers are stuck choosing between tedious manual spreadsheets and enterprise software they can't afford. TolAnalyzer targets this "Missing Middle."

0

% Time Reduction

Target reduction in stack-up calculation time vs. manual spreadsheet workflows.

0

%+ Extraction Accuracy

Target recall on linear dimensions and basic tolerances from 2D PDFs.

0

$K+ Competitor Cost

Annual cost of enterprise 3D variation analysis suites like 3DCS and Vis VSA.

0

Development Phases

From Core Infrastructure through Ingestion, Services, Review UI, to Scanned Fallback.

The Drawings: A Sample Assembly

The system is being developed against a reference drawing set: a simple 3-part linear assembly with component drawings and an assembly section view. Below are the actual engineering drawings that TolAnalyzer will process β€” a clevis, shoulder screw, and slider that form a pin-joint assembly.

Assembly section A-A showing the 3-part linear tolerance stack with clevis, shoulder screw, and slider

Assembly section A‑A β€” the primary tolerance loop. Three components (clevis, shoulder screw, slider) form a closed chain with gap GAP-0001 = 0.6 mm. The system extracts reference dimensions from this view and links them to component drawing sources.

Clevis component drawing P0001 with linear dimensions and datum references

Clevis (P0001) β€” 4 dimensions extracted: {20, Ø5.2, 30, 20}. Datum features A/B/C excluded from dimension capture.

Shoulder screw component drawing P0002 with explicit tolerance on diameter

Shoulder Screw (P0002) β€” 6 dimensions extracted, including the only explicit tolerance in the set: Ø5Β±0.05. All others inherit from ISO-2768m.

Slider component drawing P0003 with GD&T position callout

Slider (P0003) β€” 7 dimensions extracted, including a GD&T position callout (βŒ–0.1 A B) that mixes dot-decimal with the drawing's comma-decimal convention.

Assembly section B-B showing the second tolerance loop

Assembly section B‑B β€” the second independent tolerance loop, defining a separate stack from {7, 12.5, 0.5, 7.5}. Each section view in the assembly drawing produces its own loop.

The Implementation: Five Phases

TolAnalyzer is being developed incrementally β€” each phase delivers a self-contained capability that builds on the previous one. Phase 1 is in progress. Select a phase below to learn more.

1. Computation Engine

The math core β€” Worst-Case and RSS stack-up calculations with full audit trail.

2. Drawing Ingestion

Automated extraction of dimensions, tolerances, and GD&T from 2D PDF drawings.

3. Workflow Orchestration

End-to-end project lifecycle β€” from drawing import through loop definition to report generation.

4. Review Interface

Visual, interactive review of extracted data with human-in-the-loop approval.

5. Legacy Drawing Support

AI-assisted extraction for scanned and non-CAD drawings.

1. Computation Engine

The foundation is a standalone tolerance computation engine that performs direction-aware 1D Worst-Case and RSS stack-up calculations.

It handles the math that every mechanical engineer knows from textbooks but rarely trusts a spreadsheet to get right: properly accounting for how each dimension's direction in the loop affects whether its upper or lower tolerance widens or narrows the gap.

The engine also validates that the tolerance loop is geometrically closed β€” a basic sanity check that catches missing or mis-directed dimensions before they corrupt the results. All computation results are stored as immutable, checksummed records designed for regulated-industry traceability (AS9100, ISO 13485).

Technical Challenges

Building a reliable GD&T extraction pipeline surfaces edge cases that don't exist in typical document processing. Click each item to learn about the engineering challenges driving the architecture.

What's Next

TolAnalyzer is currently in the design and planning phase. The product requirements document, architecture decision records, domain glossary, and golden-fixture test specifications are complete. Twenty GitHub issues define the TDD vertical slices across all five phases. The next step is implementation β€” starting with the pure stack-up engine and database schema, which have no dependencies on each other and can be built in parallel. The goal: a tool that gives every mechanical engineer access to rigorous, traceable tolerance analysis without the $25K+ price tag or the transcription errors of a spreadsheet.