Surface fitting is the least glamorous part of CAD engineering and one of the most consequential. The quality of your surfaces determines how the model renders, whether booleans succeed, how cleanly it machines, and whether a designer can edit it afterwards.
What fitting is actually asked to do
Given points — from a scanner, a measurement, or a computed field — construct a smooth surface that approximates them. Two objectives pull against each other:
Accuracy
- Surface should pass close to the points
- Deviation within a stated tolerance
- More control points fit tighter
Fairness
- Surface should be smooth and well behaved
- No ripples, no awkward parameterisation
- Fewer control points give better quality
The trap: optimising purely for deviation. A surface that passes within a micron of every scanned point has faithfully reproduced the scanner's noise. It will look wavy under a reflection line, machine badly, and be miserable to edit. Fitting is a regularisation problem, not an interpolation problem.
Continuity, and why it is visible
| Level | Matches | Visible as | Needed for |
|---|---|---|---|
| G0 | Position | A crease | Nothing — usually a defect |
| G1 | Tangent | Sharp change in a highlight | Adequate for many mechanical parts |
| G2 | Curvature | Smooth flowing reflections | Consumer products, automotive |
| G3 | Curvature rate | Very subtle highlight quality | Class-A exterior surfacing |
The reason this matters commercially: a G1 join looks fine in a shaded viewport and shows an obvious break in a reflection. On a painted product, that break is visible to a customer. It is a geometry problem that presents as a manufacturing quality complaint.
Parameterisation: the invisible decision
How points are distributed across the surface's parameter space affects everything downstream. Poor parameterisation produces:
- Uneven isoparametric curves that make the surface hard to edit
- Distorted texture mapping
- Toolpaths that bunch up in one region and spread in another
- Numerical difficulty in intersection and projection operations
Two surfaces can be geometrically identical and behave completely differently downstream, purely because of how they are parameterised.
The practical pipeline
- Clean the point data — remove outliers, reduce noise, and decimate where density is excessive. Fitting quality is bounded by input quality.
- Segment — identify distinct regions that should become separate surfaces, and detect features like sharp edges that must be preserved.
- Recognise analytic shapes — a region that is genuinely a plane or a cylinder should be fitted as one, not as a freeform NURBS approximating it. This is a large robustness and downstream-quality win.
- Fit freeform regions — least-squares with a fairness term, starting with few control points.
- Refine adaptively — add control points only where deviation exceeds tolerance.
- Enforce continuity between patches — constrain shared boundaries to the required continuity level.
- Verify — deviation map against the original points, plus curvature and reflection analysis for quality.
Step 3 is where the biggest practical gains are. A cylinder fitted as an analytic cylinder intersects exactly, machines predictably, and is trivial to edit. The same cylinder approximated by a freeform surface intersects numerically, may fail booleans, and cannot be edited by changing a radius. Detecting analytic regions is worth substantial effort.
Where it shows up in products
- Reverse engineering — scan to CAD, the most common application.
- Inspection — comparing a manufactured part against nominal geometry.
- Simulation post-processing — fitting smooth fields to discrete results.
- Terrain and survey — building surfaces from measured points.
- Medical imaging — anatomical surfaces from segmented scans.
- Styling — converting a designer's mesh into editable CAD surfaces.
Evaluating fit quality honestly
Deviation alone is insufficient. A complete assessment reports:
- Deviation statistics — maximum and RMS, with a colour map showing where error concentrates.
- Curvature analysis — revealing waviness that deviation numbers hide.
- Reflection or zebra lines — the standard visual test for continuity quality.
- Control point count — an indicator of whether the surface is over-fitted.
- Continuity achieved at patch boundaries, measured rather than assumed.
Building reverse engineering, inspection or surfacing capability? Tell us your data source and tolerance requirement. See our CAD kernel service and B-Rep vs NURBS.