Challenge
Upper and lower jaws are scanned independently and often arrive in unrelated coordinate systems. The service had to find a clinically plausible bite automatically, avoid mistaking a neat geometric guess for a reliable result, and handle cases where two STL files objectively provide insufficient evidence.
Solution
I built a multi-stage pipeline: a fast path for near-correct inputs, multistart with eight or more hypotheses, anatomical regions following the U-shaped dental arch, 6-DOF optimisation, bilateral smart release and a rescue path for strongly mismatched coordinates. Protected input prevents the optimiser from destroying an already good contact, while metrics drive three honest outcome states.
Outcome
The system reached production. Most synthetic and real cases are solved automatically: fast cases take 2–15 seconds, complex ones 1–7 minutes, with sub-millimetre agreement against clinician-approved references. Regression covers 32 synthetic scenarios, real clinical cases and 69+ automated tests; insufficient evidence returns manual review or not confirmed instead of a potentially incorrect file.