An algorithm for generating a toolpath for a milling machine is descri
bed. The approach to its design was interdisciplinary. The algorithm c
ontains ideas from computer graphics and mathematics, rather than mech
anical engineering alone. An artefact described by any set of curved s
urfaces is carved out of a workpiece in two stages. Horizontal slices
are removed to reveal the roughly cut artefact, and a final pass cuts
the artefact to within a present tolerance. The toolpath might seem to
be needlessly convoluted, but it has substantial advantages over less
sophisticated paths. Its local complexity adapts automatically to the
local complexity of the artefact, so that more attention is concentra
ted on those parts of the artefact which require it. At the roughing o
ut stage, the path efficiently skips over completely worked areas with
out retracing them with each new horizontal slice. The path minimizes
the amount of tool movement which does not cut material, and minimizes
the number of occasions on which the tool reenters the material. A pr
ototype system has been developed to demonstrate that the new approach
is viable.