Automatic Hole Detection in STL Files

Yes. Paramesh AI detects through-holes and blind holes in STL files automatically. The pipeline segments cylindrical regions, verifies they span a full 360-degree arc (not a partial fillet), measures radius and depth, and classifies each as through or blind. Tested on parts with 4-10+ holes.

How it works

Hole detection is part of Stage 5 (Feature Recognition) in the Paramesh AI pipeline. After surface segmentation identifies cylindrical regions and primitive fitting extracts their parameters:

  1. Check angular span — full cylinders (>270 degrees) are hole candidates, partial arcs are fillets
  2. Check radius — must be within the configurable hole_max_radius_ratio of the bounding box diagonal
  3. Classify through vs. blind — compare hole height to part extent along the hole axis (>80% = through)
  4. Extract sketch geometry — center point, radius, depth for CadQuery reconstruction

Accuracy

On test models, all through-holes and blind holes are detected correctly. The radius and position match the original CAD model within the mesh resolution.