# Removable CAD Roadmap

## Goal

Move `Removable Studio` from a flex-partial design-analysis alpha into a removable CAD system that can produce clinically reviewable, patient-specific flex partial geometry with separate base and teeth outputs.

The product focus remains:

- flex partials first
- single-arch design at a time
- separate `base`, `teeth`, and `all_teeth` outputs
- C-clasp dominant workflow
- clinician review always required

## Recommended tool stack

### Browser / review layer

- `three.js + STLLoader`
  - for STL preview, overlays, and patient-scan inspection
- `three-mesh-bvh`
  - for fast tooth picking, measurements, ray queries, and hotspot interaction

### Geometry worker

- `Open3D`
  - for ICP registration, scan-frame alignment, rigid transforms, and general 3D geometry handling
- `PyMeshLab`
  - for cleanup, remeshing, smoothing, and repair of raw scan meshes
- `Manifold` or `MeshLib`
  - for watertight booleans and CAD-grade output solids

### Tooth detection / segmentation

- public tooth segmentation benchmarks and repos should be used as starting points for tooth detection and numbering
- your own paired removable cases will still be the highest-value training and evaluation data

## The ten workstreams

### 1. Dedicated geometry service

The CAD engine should live in a durable worker, not mainly in request-time Vercel APIs.

Needed next:

- separate heavy geometry jobs from the website request path
- support long-running STL processing
- preserve job traces and intermediate artifacts

### 2. Tooth segmentation and numbering

We need to move from heuristic slot guesses to real tooth-instance detection.

Needed next:

- detect existing teeth from the scan
- number them with `1-32`
- detect edentulous spans from the remaining dentition

### 3. Digital surveyor and undercut engine

We need measured surveying, not only review-first heuristics.

Needed next:

- solve path of insertion
- map usable undercuts
- support blockout logic
- improve abutment scoring with real geometry measurements

### 4. Flex-partial design rules

The clinical rules need to drive geometry instead of only analysis text.

Needed next:

- base extension rules
- clasp shape and position rules
- relief and connector rules
- separate teeth socket rules

### 5. Solid modeling kernel

We need a CAD-grade boolean layer for printable outputs.

Needed next:

- base body creation
- tooth socket subtraction
- clasp/base unions
- watertight STL export

### 6. Occlusion and collision validation

We need to validate the generated setup against the opposing arch.

Needed next:

- collision checks
- contact checks
- setup warnings when occlusion is weak or unresolved

### 7. Browser review tools

The current website is still mainly text + forms. It needs richer review interaction.

Needed next:

- 3D STL preview
- tooth-level selection overlays
- clasp and border edit controls
- low-confidence hotspot overlays

### 8. Paired benchmark set

Real progress to CAD readiness depends on paired case data.

Needed next:

- input upper STL
- input lower STL
- bite if available
- approved final removable outputs
- notes on what changed after first draft

### 9. Clinician edit capture

The product should preserve revision history so edits become training signal.

Needed next:

- what the system suggested
- what the clinician changed
- why it changed
- what final design was approved

### 10. Manufacturing validation

The system must validate output for print and assembly, not only shape generation.

Needed next:

- minimum thickness checks
- clasp strength checks
- tooth socket / bonding geometry checks
- mesh repair and print export QC

## What is already in progress

The current product already contains the first pieces of several workstreams:

- geometry service shell
- raw mesh normalization planning
- review-first missing-tooth probing
- review-first survey and support posture
- parameter-based review workflow
- standardized export package contract
- large STL production upload handling

## What to build next

The highest-leverage order is:

1. split the geometry service into a durable worker
2. improve tooth segmentation and numbering
3. upgrade the surveyor into measured undercut logic
4. add a CAD-grade solid kernel
5. capture clinician edits and benchmark every first-pass result

## Domain timing

Buy the public domain after the core tester loop is stable enough that you will keep the product name and keep sharing the link.

A good threshold is:

- the product name is final enough to keep for at least six months
- uploads and first-pass generation are working consistently for testers
- you expect to keep sending the site to outside clinicians instead of changing URLs often

That means a domain makes sense soon, even before the CAD engine is fully mature, because it stabilizes trust and sharing. The domain does not need to wait for full removable-CAD readiness.
