BEng thesis / computational geometry / 2021

Development of a machine-learning CAD filter using computational geometry.

An experimental C++ pipeline that samples triangulated CAD surfaces, approximates their medial axis, and exposes local feature radii for downstream filtering. This browser reconstruction makes the geometry tangible.

C++PCLEigenNumPyJupyter

Interactive reconstruction

Roll the shrinking ball.

The orange sphere begins at the selected surface point. Its centre travels along the inward normal until another feature point limits the radius.

Section / Filleted blockFeature retained
surfaceretained medial centresactive ball
Profile

A superellipse stands in for a softened, machined CAD profile.

Initial ball radius1.05
Filter threshold0.18
Surface samples160
Active radius0.234
Iterations8
Feature index019

Input samples

160oriented boundary points

Retained centres

160above radius threshold

Median radius

0.306normalised section units

Radius distribution

0 to 1

The method

From solid model to geometric signal.

  1. 01

    Sample the surface

    Subdivide the STL mesh and export vertices with their outward normals as contiguous NumPy arrays.

  2. 02

    Shrink tangent balls

    For every oriented point, search the point cloud and iteratively move a sphere centre along its normal.

  3. 03

    Recover local radii

    Record the converged medial centre, constraining feature index, and ball radius introduced by this fork.

  4. 04

    Filter CAD features

    Use the radius distribution as a scale-aware signal for separating fine geometric details from the primary form.

What I contributed

Research code, made observable.

The project began with the open-source masbcpp implementation. My thesis fork adapted its I/O and shrinking-ball path for a CAD experiment, increased convergence precision, and surfaced the radius of every computed ball.

  • Added inner and outer medial-radius NumPy outputs.
  • Built an STL to remesh to normals to MAT notebook workflow.
  • Instrumented convergence and feature-point behaviour for analysis.
  • Explored radius histograms as a CAD feature-filtering signal.

The visual demo is a two-dimensional educational reconstruction. The production research implementation remains the C++/PCL pipeline in the repository.