Articles · Series
CAD Kernel Foundations
What a boundary representation is and what has to be true of it; the curves and surfaces the topology points at, and how they are parametrised; the foundation algorithms — projection, intersection — that everything else is built from; and the modelling operations themselves, taken apart one at a time.
-
What a B-rep Is
A B-rep describes a solid by its boundary. This article covers the topology/geometry split, the Euler–Poincaré formula, the orientation convention, manifold models and tolerances, and the four questions the theory leaves to whoever implements it.
-
The Mathematics a Kernel Stands On
Part one described a solid by its boundary. This article covers the linear algebra the rest of the series stands on: points, vectors and directions, the dot and cross products, frames and placements and their handedness, what a mirror does to a frame, and where a surface normal comes from.
-
The Mathematics Behind Geometry
Part one split a B-rep into topology and geometry. This article covers the geometry: the ten curves and surfaces most CAD models are made of, what each formula is, whether its parameters measure angles or lengths, and where each one degenerates.
-
Working in the Parametric Domain
A kernel does most of its geometric work in the (u, v) rectangle, because two dimensions are cheaper than three. But that rectangle is not a plane: its axes carry different units, its metric changes from point to point, and some of its edges are seams and poles. We look at what this costs and how algorithms handle it.
-
Projecting onto Curves and Surfaces
From a point in space back to the parameters of the nearest point on a curve or a surface. We derive the condition every projection solves, give the closed forms for the elementary surfaces and the conics (and the root the ellipse quartic loses), then build the free-form algorithm step by step: bounded Newton from seeds, boxes that rule out whole spans, and an exact root scan, so that it cannot return a point that is not the nearest.
-
Point Classification
Is this point inside this region? A kernel asks this more often than almost any other geometric question, and the usual two-line answer only covers the simplest case. We go through the rule on a plain polygon and the four configurations that break it, then what a kernel does when there is no polygon to test against: it builds one out of chords, and carries the error it made in building it all the way to the answer.
-
Discretising a B-rep
A graphics pipeline draws triangles and knows nothing of surfaces given by equations, so a kernel builds a second, finite copy of the model: a polygon for every edge, a triangulation for every face, and nothing of their own for the shells and solids above them. In this article we look at what that copy is made of and how the edge polygons are computed from one relation about a circle, the sagitta.
-
Meshing a Face
How a kernel meshes a face: a lattice in the parameter rectangle for each surface type, Bowyer–Watson insertion inside the boundary, and a check of the deflection it delivers.
-
Intersecting Curves and Surfaces
Where two pieces of geometry meet, how they meet, and how to find all of it. The closed forms for lines, conics and the elementary surfaces, with tangency decided as a distance; the quartics of two quadrics, walked along the generators of a cylinder or a cone; box subdivision for free-form curves; the predictor-corrector marching of two surfaces, with its step length from curvature; and the closed loops that no starting point on a boundary can reach.
-
Booleans on B-rep Models
The classical five-step algorithm, the two schools that solved the problem in different ways, what each step has to do, and why a correct implementation still fails on real CAD data.