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

LevelMatchesVisible asNeeded for
G0PositionA creaseNothing — usually a defect
G1TangentSharp change in a highlightAdequate for many mechanical parts
G2CurvatureSmooth flowing reflectionsConsumer products, automotive
G3Curvature rateVery subtle highlight qualityClass-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

  1. Clean the point data — remove outliers, reduce noise, and decimate where density is excessive. Fitting quality is bounded by input quality.
  2. Segment — identify distinct regions that should become separate surfaces, and detect features like sharp edges that must be preserved.
  3. 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.
  4. Fit freeform regions — least-squares with a fairness term, starting with few control points.
  5. Refine adaptively — add control points only where deviation exceeds tolerance.
  6. Enforce continuity between patches — constrain shared boundaries to the required continuity level.
  7. 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.

Frequently asked questions

G0 means surfaces touch. G1 means tangent directions match, so there is no visible crease. G2 means curvature matches, so reflections flow smoothly across the join. Class-A automotive surfacing generally requires G2 or better, because the human eye detects curvature discontinuity in a highlight even when the geometry looks fine.
Because fitting too closely reproduces the scanner noise as geometry. Fitting is a trade-off between deviation from the points and smoothness of the result — a regularisation term. Tuning that balance is most of the practical work in reverse engineering.
As few as will meet your tolerance. More control points fit tighter and produce worse surface quality — waviness, awkward parameterisation, and geometry that is unpleasant to edit downstream. Start coarse and refine only where deviation demands it.