1. Introduction
Freeform optical lenses have emerged as transformative elements in modern optical engineering, offering a level of design flexibility and performance unattainable with traditional spherical or aspherical components [
1,
2,
3]. Unlike rotationally symmetric optics, freeform lenses can incorporate complex surface geometries that redistribute optical power in unconventional ways. This capability allows designers to correct higher-order aberrations, improve imaging performance, and integrate multiple optical functionalities into a single compact element. Their adoption spans a diverse range of high-performance fields, including Earth observation and remote sensing [
4], augmented and virtual reality (AR/VR) systems [
5], automotive LiDAR and advanced driver-assistance systems (ADASs) [
6], high-power laser systems for fusion research [
7], and military-grade imaging and targeting optics [
8]. The recent push towards more compact and powerful systems in consumer electronics and telecommunications further underscores their critical role [
9]. By reducing the number of optical elements required in a system, freeform lenses can decrease overall size and weight, improve energy efficiency, and enhance mechanical robustness factors that are critical for both portable consumer electronics and spaceborne platforms.
The unique capabilities of freeform optics stem directly from their departure from rotational symmetry. Spherical and aspherical lenses, although widely used, are constrained by their axisymmetric profiles, limiting their ability to correct complex field-dependent aberrations. In contrast, freeform surfaces can distribute optical power asymmetrically across the aperture, enabling wide fields of view, off-axis performance optimization, and compact packaging. For example, AR and VR devices increasingly rely on freeform components to deliver immersive visual experiences while maintaining small form factors that are comfortable for long-term wear [
10]. Similarly, in automotive LiDAR systems, freeform optics provide precise beam shaping and scanning efficiency, improving detection accuracy and minimizing blind spots under dynamic conditions [
11]. In space applications, weight reduction achieved through freeform designs translates directly into reduced launch costs and enhanced payload capacities.
However, the same characteristics that make freeform lenses appealing to optical designers present substantial challenges to manufacturing engineers. The surfaces of freeform optics exhibit highly variable slopes, curvatures, and local feature densities, making them significantly more difficult to fabricate than their spherical or aspherical counterparts [
8,
12]. Even minor deviations from the nominal profile can lead to measurable optical aberrations, degrading the performance of the entire optical system. Achieving the required sub-micron form accuracy and nanometer-scale surface roughness is therefore a central challenge in freeform optics fabrication [
13].
Modern fabrication of freeform surfaces primarily relies on advanced computer numerical control (CNC) machining techniques such as deterministic microgrinding and sub-aperture polishing [
14,
15]. These processes remove material in controlled increments, progressively shaping the optical surface to its final form. While CNC machining offers the flexibility and precision needed for complex geometries, its effectiveness is strongly influenced by the toolpath generation strategy employed. Conventional toolpath planning methods, particularly fixed-step Cartesian approaches, move the cutting tool along evenly spaced intervals without regard to local surface features. This approach is effective for simple geometries, where curvature and slope vary gradually, but becomes inefficient and error-prone when applied to freeform optics [
16]. Despite recent improvements in machine tool accuracy, the fundamental limitation of non-adaptive path planning remains a major bottleneck [
17].
In fixed-step machining, the interaction between the cutting tool and the workpiece surface changes unpredictably as curvature varies. Regions of high curvature may experience excessive tool engagement, leading to overcutting, surface tearing, and accelerated tool wear [
18]. Conversely, flatter regions may receive insufficient contact, resulting in incomplete material removal and surface waviness. These inconsistencies not only degrade surface quality but also extend machining cycles, as additional corrective passes are required. Over time, frequent tool changes, recalibrations, and machine downtime further inflate production costs [
19,
20]. For high-value optics, such as those used in space or defense, even small increases in fabrication inefficiency can have substantial economic impacts.
The dynamic forces exerted on the cutting tool during fixed-step machining also contribute to accelerated tool degradation. Variations in cutting angles and forces across the surface can induce chatter, microfractures, and local heating effects, reducing tool life and compromising machining accuracy [
21]. As tool wear progresses, it introduces further variability into the machining process, creating a feedback loop that exacerbates surface errors. In precision applications where optical performance depends on form deviations well below one wavelength of light, these errors can render a component unusable. Effective management of tool wear is thus critical not only for maintaining consistent surface quality but also for ensuring the long-term reliability of the manufacturing process.
Metrology and quality control present additional challenges in freeform optics manufacturing. Traditional interferometric testing and contact-probe measurements are well-suited for spherical and aspherical components but struggle to characterize non-rotationally symmetric geometries with high accuracy [
22,
23]. Advanced techniques such as optical profilometry and high-resolution 3D surface mapping offer better fidelity for complex surfaces but are not trivial to integrate into the machining workflow. Real-time or in-process measurement is particularly difficult, yet it is essential for reducing rework cycles and ensuring that the fabricated surface conforms to design specifications. Bridging the gap between advanced metrology and adaptive machining strategies remains a critical area of development [
24]. Recent efforts have focused on integrating on-machine probes and in situ interferometry [
25,
26], yet a seamless, automated loop for freeform optics is still lacking.
These difficulties highlight the need for a paradigm shift in CNC toolpath generation for freeform optics. Recent research has explored adaptive strategies that tailor machining parameters to local surface conditions, with promising results [
27,
28]. Adaptive control theory provides a robust theoretical framework for such strategies. By continuously monitoring process variables and adjusting machining parameters in real time, adaptive control can maintain stability and performance even in the presence of geometric or dynamic disturbances. When applied to toolpath planning, adaptive principles suggest aligning the cutter trajectory with the surface’s local tangential direction, a method known as tangential toolpath alignment. This approach ensures that the tool engages the surface consistently, minimizing abrupt changes in cutting dynamics and reducing the risk of surface defects [
29].
Tangential alignment can be viewed as a form of real-time feedback control: by orienting the toolpath to match local curvature, the machining process becomes inherently more stable. Variations in cutting forces are distributed more evenly, tool wear is reduced, and the energy required for material removal is optimized. Additionally, by maintaining a consistent engagement angle, tangential alignment mitigates thermal and mechanical stresses on the workpiece, leading to improved dimensional stability and reduced subsurface damage [
30]. In comparison with fixed-step approaches, tangential alignment has demonstrated substantial improvements in machining efficiency and surface finish in preliminary studies of complex geometries [
31]. However, these approaches often lack a fully integrated digital thread from CAD to G-code and are not yet widely adopted in industrial settings [
32].
Beyond the machining process itself, implementing tangential alignment requires an integrated software environment capable of translating surface geometry data into optimized CNC commands. This involves advanced mathematical modeling to calculate local tangents and curvatures, robust algorithms to generate smooth tool trajectories, and seamless integration with CAD/CAM platforms to ensure geometric fidelity. Simulation and validation modules are also critical for predicting potential issues such as tool interference, excessive force peaks, or machine kinematic limits. A user-friendly interface is essential to allow operators to input parameters, visualize toolpaths, and make adjustments without requiring deep expertise in computational geometry or control theory [
33,
34].
To address this critical gap, this work is founded on the central hypothesis that a dynamic, curvature-adaptive toolpath optimization strategy, which preemptively aligns the toolpath with local geometry, will fundamentally overcome the limitations of fixed-step methods. This hypothesis is investigated through the following specific research questions:
Can the proposed curvature-adaptive algorithm yield a superior surface finish and higher form accuracy compared to conventional fixed-step methods?
Can this strategy be effectively implemented through a dedicated, self-developed CAM software environment FreeForm-CAM (version 1.0) to create a practical and accessible solution?
Will the integration of this software into a closed-loop process enable rapid convergence to sub-10 µm form accuracy within a single compensation iteration?
Consequently, this study presents a comprehensive curvature-adaptive CNC machining methodology for freeform optical lenses based on dynamic tangential toolpath optimization. A dedicated CAM environment, Freeform-CAM, was developed to implement this approach, combining the computational power of MATLAB (version R2025a) for mathematical modeling with the geometric accuracy of UG NX for surface representation. The system generates optimized toolpaths and G-code tailored to the local curvature of freeform surfaces. The proposed methodology was rigorously evaluated through experimental trials on representative optical components to test the posed hypotheses.
3. Mathematical Framework for Local Curvature Estimation
The precision of a curvature-adaptive machining strategy is fundamentally governed by the accurate estimation of the local surface geometry across the freeform optic. Conventional toolpath planning, which relies on fixed Cartesian steps, fails to account for spatial variations in curvature, leading to non-uniform material removal. This study employs a differential geometry-based approach where the local morphology at any point is approximated by fitting a sphere to its immediate neighborhood. The radius of this sphere provides a stable, intuitive measure of local curvature, which directly dictates the optimal toolpath point density.
3.1. The Principle of Local Spherical Approximation
For a smooth, twice-differentiable surface, the local geometry at a point
P0 = (
x0,
y0,
z0) is characterized by its principal curvatures,
k1 and
k2 [
35]. The mean curvature
H, a fundamental property influencing material removal rates in sub-aperture is defined as their average:
The corresponding mean radius of curvature (ROC) is given by
R = 1/
H. This work employs a robust numerical method to estimate R by fitting a sphere to a local neighborhood of points surrounding
P0. in the surface point cloud. As illustrated in
Figure 4, a 5 × 5 kernel of points is selected around each target point (shown in red). The radius R of the best-fit sphere to these 25 points provides a direct measure of the local curvature. This calculated radius,
R, drives the dynamic path planning strategy. A small R indicates a highly curved region, necessitating a denser toolpath for accurate machining, while a large
R signifies a flatter area where a sparser toolpath is sufficient. This principle of local spherical approximation forms the cornerstone of the adaptive algorithm.
A 5 × 5 neighborhood kernel is used to select points around the target location (red) on the freeform surface point cloud. The local morphology is approximated by fitting a sphere, the radius R of which provides the local radius of curvature.
3.2. Numerical Estimation via Least-Squares Sphere Fitting
Given a discrete point cloud Pk = (xk, yk, zk) generated from the NURBS surface, the local curvature at a point is estimated from its local neighborhood. This implementation uses a (2m + 1) × (2m + 1) kernel with m = 2, resulting in a 5 × 5 kernel encompassing N = 25 points.
Let
N(
i,
j) =
Pk∣
k = 1, 2, …,
N be the set of points in the kernel centered on the target point. The general equation of a sphere with center
O = (
xc,
yc,
zc) and radius
R is:
This equation is expanded and rearranged into a linear form amenable to least-squares solution,
By defining a new parameter vector u, this becomes a system of linear equations solvable via least-squares minimization:
The equation for each point
Pk is:
For all
N points, this forms the matrix system
Au =
b, where
The least-squares solution is given by,
The center
O and radius
R of the best-fit sphere are then recovered from the solution vector:
3.3. Enhancement: Aspect Ratio Correction for Anisotropic Surfaces
Freeform optics often exhibit significantly different scales in the X and Y directions (e.g., off-axis parabolic sections). A standard sphere fit on raw coordinate data can be biased if the point cloud is anisotropically sampled or if the surface patch itself is highly elongated.
To mitigate this, an aspect ratio correction is applied during the fitting process. The Y-coordinates are scaled by the global aspect ratio of the point cloud, α = Xspan/Yspan, before constructing matrices A and b. The sphere is fitted to the scaled coordinates (xk,αyk,zk). The resulting radius of curvature R is the correct estimate for the original, unscaled geometry. This ensures the curvature estimation is isotropic and geometrically accurate, preventing artificial inflation of the radius estimate along the longer axis.
3.4. Quality Metric: Fit Error Estimation
The quality of the spherical fit is quantified by the root-mean-square (RMS) error εfit, which serves as a confidence metric for the curvature estimate:
A high εfit indicates a region where the surface deviates significantly from a spherical shape (e.g., at an inflection point or a highly astigmatic region), flagging it for potential review or a more conservative toolpath strategy.
This robust numerical framework transforms the discrete point cloud into a continuous curvature field k(i,j) = 1/R(i,j), which is the primary input for the subsequent dynamic tangential toolpath optimization. This ensures material removal rates are precisely tailored to the local surface geometry, advancing the precision and efficiency of freeform optic manufacturing.
3.5. Determination of Optimal Tool Center Position Based on Local Surface Geometry and Curvature
Following the estimation of the local radius of curvature R at each discrete point (
Ci,j) on the freeform optical surface, the next critical step in curvature-adaptive toolpath planning is the precise determination of the Tool Center Position (
TCP). The
TCP defines the spatial location of the center of the spherical cutting or polishing tool such that it maintains tangential contact with the workpiece surface at the target point
C, while conforming to the local curvature geometry. This section presents the mathematical derivation of the
TCP location, beginning with the fundamental 2D engagement geometry between the tool and the workpiece surface is illustrated conceptually in
Figure 5.
3.5.1. Fundamental Geometry of Tool–Surface Engagement
As illustrated in
Figure 5, the
TCP, the contact point
C on the workpiece, and the local curvature center
O of the surface are collinear along the surface normal direction. This geometric constraint arises directly from the requirement of tangential contact between the spherical tool (of radius
Rt) and the freeform surface at point
C.
The key geometric relationship is derived from the distance between the tool center (
TCP) and the local curvature center
O:
where
R is the local radius of curvature at point
C (estimated via sphere fitting),
Rt is the radius of the spherical tool,
is the unit surface normal vector at
C. The Tool Center Position (
TCP) is thus expressed as a signed offset from the surface contact point
C along the normal vector:
The offset distance
D depends on whether the surface is convex or concave. For a convex surface (
R > 0),
In the common simplification where
O lies along the normal and the local surface is approximated as spherical, this reduces to
D =
Rt −
R. For a concave surface (
R < 0),
Here, the tool center and curvature center lie on the same side of the surface contact point. This formulation ensures that the spherical tool maintains exact tangency with the freeform surface at the target point, adapting dynamically to local curvature variations.
3.5.2. Radial Toolpath Alignment and Coordinate Transformation
In addition to the normal-direction offset, the tool center position must also be correctly positioned in the radial toolpath plane, particularly for rotational symmetry or radially varying toolpaths common in optical fabrication (e.g., lens grinding/polishing). As illustrated in
Figure 5, let the radial distance from the optical axis (
Z-axis) to the contact point
C be:
The angle
ϕ between the surface normal and the
Z-axis is derived as,
The effective radial distance from the optical axis to the tool center point (
TCP) is then:
The angular position
θ is preserved from the workpiece point to the tool center as,
This radial transformation ensures that the tool engagement is not only normal to the surface but also correctly aligned with the intended toolpath geometry, such as concentric or spiral paths often used in optical manufacturing.
3.5.3. Enhanced Geometric Model for High-Precision Freeform Optics
For high-precision freeform surfaces such as aspheric, toric, or off-axis optics, the basic spherical engagement model must be extended to account for: Anisotropy in surface curvature (e.g., differing
X-span and
Y-span curvatures), higher-order geometric effects (e.g., astigmatism, irregular slope distributions), and non-uniform tool engagement across complex surface patches. To address these factors, an enhanced geometric model is introduced, incorporating: An aspect ratio correction factor
, Taylor-series or polynomial corrections for local surface deviations, Separate formulations for convex (
R > 0) and concave (
R < 0) geometries. The complete enhanced model yields the refined tool center position as:
where the function
f(
ϕ,surface type) encapsulates higher-order offset corrections based on the local surface normal, curvature magnitude, and tool–surface engagement geometry.
This enhanced TCP model ensures sub-micron accuracy in tool placement—critical for ultra-precision finishing of freeform optical components where surface irregularities, edge effects, and anisotropic wear can significantly impact final quality.
3.6. Dynamic Tangential Spiral (DTS) Toolpath Generation for Freeform Surfaces
The Dynamic Tangential Spiral (DTS) algorithm is a curvature-aware, 5-axis-compatible toolpath generation strategy designed to achieve high surface fidelity, minimal scallop height, and efficient material removal on complex freeform optical components. As illustrated in
Figure 6, the DTS transforms a discrete Tool Centre Point (
TCP) cloud into a smooth, continuous spiral trajectory that closely conforms to the local geometry of the workpiece. By integrating curvature-adaptive stepover, adaptive angular progression, and tangential B-axis alignment, the DTS method maintains a nearly constant scallop height, reduces lateral cutting forces, and avoids redundant or inefficient tool passes, outperforming conventional fixed-step Archimedean spirals or raster strategies.
3.6.1. Toolpath Geometry and Parametric Formulation
As illustrated in
Figure 6, the generated DTS toolpath is represented by a series of red concentric circles superimposed on the freeform surface. The spatial relationship between the toolpath and the workpiece is defined within both the workpiece coordinate system (
Xw,
Yw,
Zw) and the tool coordinate system (
Xt,
Yt,
Zt). The trajectory is parameterized in polar coordinates (
r,
θ), where
r(
θ) is the radial distance of the toolpath from the center, and
θ is the angular position around the spiral center. The 3D position vector of the tool center at angle
θ is expressed as:
where
F defines the surface sag or elevation based on the projection of the spiral in the
XY plane. To ensure uniform lateral spacing Δ
s between adjacent toolpath revolutions a key factor in controlling scallop height, the radial distance
r(
θ) is adaptively adjusted via a curvature-sensitive contraction law:
Here, k1 and k2 are the local principal curvatures of the surface at point X(θ), Y(θ), and (Δs) is the target stepover distance. Unlike the constant radial derivative in a classical Archimedean spiral dr/dθ = const, Equation (26) introduces real-time curvature feedback, causing the spiral to contract more tightly in high-curvature (convex) regions and remain more open in flatter zones. This adaptive behavior ensures more uniform surface engagement, minimizing scallop variations and improving edge definition.
3.6.2. Curvature-Adaptive Stepover
The scallop height
h, the vertical cusp between adjacent toolpaths is fundamentally governed by the stepover distance Δ
s and the local radius of curvature
R = 1/
k:
To maintain a constant target scallop height
htarget, the nominal stepover is modulated by a curvature-dependent scaling factor:
where Δ
snominal is the default stepover for flat regions,
α is a tuning coefficient controlling sensitivity to curvature, (
k1 +
k2) represents the combined curvature magnitude. This formulation ensures that high-curvature regions receive smaller stepovers for finer surface finish, while flatter areas use larger stepovers to improve machining efficiency. Pre-smoothing of principal curvatures (e.g., via Gaussian filtering) is applied to avoid noise-induced instability in stepover modulation.
3.6.3. Adaptive Angular Progression
A uniform angular increment (
dθ) across the entire spiral can lead to oversampling near the center (where radial steps are small) and under sampling at the periphery (where the tool covers more area per revolution). To address this, DTS employs an adaptive angular spacing law:
where (
dθmin) and (
dθmax) define the minimum and maximum allowable angular steps,
rtransition is the radial transition point where angular density begins to decrease,
β and
p are tuning parameters controlling the rate of angular progression. This strategy ensures finer angular resolution in the central region for precision and uniformity.
3.6.4. Tangential Alignment and B-Axis Orientation
In five-axis machining, maintaining the tool’s cutting face tangential to the spiral trajectory minimizes lateral forces, tool vibration, and wear. The instantaneous
B-axis angle (tool rotation about the
Y-axis) is derived directly from the spiral’s
XY projection:
For regions with steep local slopes, the nominal
B-axis orientation is refined by blending it with the local surface normal vector
n(
θ) = ∇
F(
X,
Y), ensuring smoother engagement and better tool conformity. Additionally, to prevent tool gouging due to sudden changes in surface height, the local slope angle
ϕ is monitored:
If ϕ > ϕmax (a predefined threshold), intermediate toolpath nodes are inserted to ensure gradual height transitions, controlled material removal, and stable machining conditions.
3.7. Enhanced Error Compensation Strategy
Achieving sub-micron accuracy in freeform optical grinding requires a sophisticated strategy to correct for systematic errors inherent in the machining process. These errors, arising from tool deflection, wheel wear, thermal drift, and machine kinematics, cause deviations between the machined surface and the target design. This section details an enhanced, geometry-aware compensation framework that integrates metrology data with a model of the tool-surface interaction to generate a corrected toolpath.
3.7.1. Error Mapping and Interpolation
The foundation of the compensation is the quantification of the machining error. After the initial grinding cycle, the workpiece is measured using a Hexagon high-precision Coordinate Measuring Machine (CMM) from Germany, producing a measured point cloud (
Xm,
Ym,
Zmeas). The local machining error
E(
X,
Y) at any measured point is defined as the deviation from the nominal design surface
Zideal(
X,
Y):
As the CMM data is discrete and may not cover the entire surface uniformly, this error must be interpolated to create a continuous error field
Einterp(
X,
Y) across the entire machining domain. This is achieved using a robust scattered data interpolation method (e.g., natural neighbor interpolation):
This continuous error map allows for the estimation of errors even at points not directly probed by the CMM.
3.7.2. Geometric Correction for Tool-Surface Interaction
Simply subtracting the interpolated error is insufficient, as it does not account for the finite radius of the spherical grinding tool. The compensation must be adjusted based on the local surface geometry (convex or concave) to ensure the tool tip contacts the correct point on the surface. The initial corrected surface, obtained by removing the systematic error, is:
However, the final toolpath must position the tool center point to achieve contact at
Zcorr. The required adjustment is a function of the tool radius
Rt and the local surface inclination angle
ϕ, where
For Convex Regions (
k > 0): The tool center must be offset outward along the surface normal. The compensated
Z-height for the toolpath is:
For Concave Regions (
k < 0): The tool center must be offset inward. To account for potential anisotropic (elongated) geometries, an aspect ratio factor
A (e.g.,
A =
Xspan/
Yspan) is incorporated. The compensation model for concave zones is:
The exponent 0.8 was determined empirically to optimize compensation effectiveness without introducing new distortions in steeply curved areas.
3.7.3. Compensation Validation and Final Toolpath Generation
The total local compensation applied at each point is quantified as the difference between the projected toolpath based on the measured surface and the newly calculated, compensated height:
This value Δ
comp serves as a key metric for validating the compensation, highlighting regions of significant adjustment. The final output of this strategy is a fully calibrated toolpath, which integrates the error correction with the geometric tool-offset compensation. This toolpath is then executed in a subsequent grinding cycle, resulting in a workpiece geometry that converges dramatically toward the target design, as demonstrated by the experimental results in
Section 5.
3.8. Comparative Justification with Conventional CAM Methods
The sophisticated mathematical framework detailed in this chapter is fundamentally more complex than the standard toolpath generation algorithms embedded in commercial CAM software. This added complexity is necessitated by the stringent sub-micron form accuracy and uniform surface quality requirements for freeform optics, which conventional methods are inherently inefficient at achieving. The key distinctions are summarized in
Table 1.
In essence, while a CAM programmer can generate a toolpath for a freeform surface using standard fixed-tolerance methods, the process is inherently inefficient and the resulting quality is not optimized. The programmer must often resort to manually partitioning the surface and applying different strategies, or using an excessively fine, globally fixed stepover to guard against errors in high-curvature zones. This leads to prohibitively long machining times and does not solve the core problem of variable cutting forces and tool wear.
The methodology presented in this work automates this high-level process planning. It translates the optical designer’s requirement for uniform, high-quality surface finish into a fundamental driver for the toolpath generation itself. The “execution tolerance” in our method is not a fixed geometric value but a dynamic parameter based on real-time local curvature. This ensures that machining effort is applied precisely where it is needed to achieve sub-micron precision without unnecessary overhead, thereby justifying the advanced mathematical framework.
4. Architecture of the Freeform CAM Software Development
To overcome the limitations of conventional fixed-step CNC machining for freeform optics, a dedicated CAM framework was developed that integrates curvature-adaptive toolpath generation, real-time error compensation, and end-to-end process verification. The proposed architecture is illustrated in
Figure 7, unifies four core functional modules—(1) design data import and storage, (2) curvature-aware toolpath planning, (3) adaptive error compensation, and (4) visualization and post processing—into a MATLAB-based software environment. Each module is engineered to preserve geometric fidelity while optimizing machining efficiency for non-rotationally symmetric freeform surfaces.
4.1. Design Data Import and Storage Module
Freeform optical geometries are initially defined in a feature-rich CAD environment (e.g., UG NX), where parametric surface models enable precise control over form and tolerance. To ensure compatibility with downstream machining workflows, the first stage of our CAM architecture exports idealized point-cloud data (X_ideal, Y_ideal, Z_ideal) directly from the CAD model. These discrete points serve as the foundation for all subsequent geometric computations. A custom-built data storage and retrieval subsystem then manages this point cloud, ensuring efficient access during curvature analysis, toolpath generation, and error mapping. By decoupling design from manufacturing via a standardized point-cloud interface, the framework preserves the integrity of the original freeform surface while enabling modular software development.
4.2. Curvature-Aware Toolpath Planning Module
The heart of the architecture lies in its ability to dynamically adapt toolpaths to local surface curvature. This module comprises two subcomponents: surface normal and principal curvature computation and tangential spiral toolpath generation. First, surface normal and principal curvatures are calculated at each discrete point in the imported cloud. These geometric descriptors quantify how the surface bends in the neighborhood of each point, enabling the software to distinguish regions of high versus low curvature. Next, a tangential spiral strategy aligns the tool center point (TCP) motion with the local principal directions. Unlike conventional rectilinear or circular interpolation, this approach ensures that the cutting or polishing tool moves tangentially to the surface gradient, thereby minimizing abrupt changes in material removal rate. Adaptive angular progression further refines the toolpath by adjusting stepover based on real-time curvature feedback—tightening spacing in high-curvature zones to maintain uniform stock removal and loosening it in flatter regions to reduce cycle time. The result is a smooth, curvature-responsive toolpath that balances precision and productivity.
4.3. Adaptive Error Compensation Module
Even with optimized toolpaths, geometric deviations between the designed surface (Z_ideal) and the machined workpiece (Z_meas) remain inevitable due to tool deflection, material inhomogeneity, or thermal effects. To close this loop, our architecture incorporates a physics-informed error compensation workflow. Measured surface data (captured via metrology such as coordinate measuring machines or interferometry) are first imported and interpolated to match the resolution of the original point cloud. A geometric adjustment algorithm then computes the signed error (E_interp = Z_meas − Z_ideal) at each measurement location. Rather than applying a global correction, an adaptive strategy distributes these corrections locally, respecting the kinematic limits of the CNC machine and the material removal characteristics of the process (e.g., grinding wheel wear, slurry flow in polishing). This closed-loop correction ensures that the final machined surface converges to the design intent with minimal iterative effort.
4.4. Visualization and Post Processing Module
To validate the toolpath and error correction workflows, the software includes a suite of visualization tools. A 3D toolpath renderer provides intuitive spatial context, while vector height difference plots and surface curvature diagrams highlight discrepancies between the ideal and compensated geometries. An error map and compensation plot further quantify the magnitude and distribution of corrections, enabling engineers to assess process stability before generating final G-code. Once validated, the compensated NC code is exported directly to the machine tool, completing the CAM-to-CNC pipeline.
5. Experimental Verification of CAM Software
To validate the efficacy and precision of the Freeform CAM Software in a real-world manufacturing scenario, a comprehensive experimental setup was devised, centered around a closed-loop manufacturing process, as illustrated in
Figure 8. The investigation utilized two distinct workpieces fabricated from H-K9L glass, selected for its relevant optical and mechanical properties: (i) 80.600FY and (ii) 850FY.
The process began with the design of each workpiece in UG NX. To mitigate the introduction of re-fixturing errors during the closed-loop process, a kinematic coupling principle was employed. A custom socket was machined into the workpiece base, which mates precisely with a corresponding fixture on the grinding machine table. This positive location scheme ensures highly repeatable positioning (estimated repeatability < 2 µm) each time the workpiece is unloaded for CMM measurement and reloaded for compensated grinding. The point cloud data defining the target geometry was subsequently exported directly to the Freeform CAM Software. Within the CAM environment, all necessary data processing and toolpath planning were conducted. Critical machining parameters were meticulously configured, including the grinding wheel radius (40.0125 mm), step size, feed rates, removal amount, and speed. The software then generated the Numerical Control (NC) code. This code was first validated through a digital simulation within the software to identify and rectify any potential errors, thereby minimizing the risk of machine damage or workpiece defects. The verified code was then transferred to the grinding machine for execution. Following the initial grinding operation, each workpiece was measured using a high-precision Coordinate Measuring Machine (CMM) from Hexagon Manufacturing Intelligence (Wendlingen, Germany). This step provided the essential metrological data, a high-fidelity 3D deviation map that fed into the core innovation of this process: the error compensation loop. When deviations from the target geometry were detected, the CAM software’s algorithm calculated a compensated NC code. This code accounted for the observed systematic and quasi-systematic errors, and the workpiece was re-ground. This closed-loop process of manufacture-measure-compensate-remanufacture was critical for achieving the final high-precision form.
5.1. Quantitative Analysis of Surface Form Error
The efficacy of the closed-loop manufacturing process was evaluated quantitatively using the Peak-to-Valley (PV) error, a critical metric that quantifies the total vertical distance between the highest peak and deepest valley on the surface error map. The two representative freeform optics used for this validation are illustrated in
Figure 9. The 850FY workpiece exhibits a distinctly asymmetrical geometry, with a significant height differential between the low ‘
L’ and high ‘
H’ regions. In contrast, the 80.600FY workpiece features a nominally symmetrical shape, indicated by the marked region ‘
L’, where the curvature is relatively uniform around the lens periphery. The quantitative results for both workpieces, measured before and after a single iteration of the error compensation cycle, are presented in
Table 2 and discussed in detail below.
5.1.1. Workpiece 850FY
The 850FY geometry, with its distinct shape and radii, presented a greater initial challenge, exhibiting a larger initial PV error of 15.7 µm. The error was asymmetrical, with a deep valley of −8.7 µm and a peak of +7.0 µm. The application of the error compensation loop proved exceptionally effective for this part. The final measured PV error was dramatically reduced to 8.1 µm. This constitutes a 48.4% reduction in form error. The algorithm successfully corrected both peaks and valleys, bringing the maximum negative deviation to −3.6 µm (a 58.6% improvement) and the maximum positive deviation to +4.5 µm (a 35.7% improvement). The results for both workpieces demonstrate the robustness and consistency of the closed-loop compensation mechanism across different part geometries. The detailed measured surface error can be seen in
Figure 10.
5.1.2. Workpiece 80.600FY
The initial grinding run for the 80.600FY workpiece yielded a surface with a PV error of 11.9 µm. The error profile was characterized by a maximum positive deviation (overcut) of +8.4 µm and a maximum negative deviation (undercut) of −3.5 µm. After a single iteration of the error compensation cycle, a significant improvement was observed. The PV error was reduced to 7.5 µm, representing a 37.0% improvement in overall form accuracy. The compensation algorithm was highly effective in mitigating both error extremes. The maximum overcut was reduced by 46.4% (from +8.4 µm to +4.5 µm), while the maximum undercut was also improved, decreasing by 14.3% (from −3.5 µm to −3.0 µm). The detailed measured surface error can be seen in
Figure 11.
5.2. Comparative Discussion
The experimental results demonstrate the high performance of the proposed curvature-adaptive strategy. To contextualize these results, a comparison can be made with the state-of-the-art in freeform optics manufacturing. For instance, a study by František Procháska et al., 2023, on the precise grinding of optical free-form elements utilized a high-end commercial CAM software (Siemens NX) and a dedicated optical grinding machine (Satisloh SPM60) from Germany [
36]. In their process, an initial conventional grind resulted in a form error of 15 µm PV, which was then reduced to 9 µm PV after applying a corrective grinding cycle.
The performance of our method compares favorably with this benchmark. Our proposed curvature-adaptive strategy, implemented in our custom-developed Freeform-CAM software, achieved a superior final form accuracy of 8.1 µm PV on a challenging asymmetrical workpiece (850FY), also within a single compensation iteration. Furthermore, our method achieved a more substantial relative error reduction (48.4%) from its initial state compared to the 40% reduction reported in the cited study.
This comparison highlights a key advantage of this approach. While the conventional method relied on a post-facto “corrective” step, our method is preemptive; the toolpath is dynamically optimized before machining based on local curvature to avoid non-uniform errors in the first place. The fact that this specialized algorithm can produce superior results to those achieved by established industrial methods underscores its significant potential.
6. Conclusions
This study was founded on the core hypothesis that a curvature-adaptive toolpath generation strategy, which dynamically aligns the toolpath with the local surface geometry, would significantly outperform conventional fixed-step methods in the machining of freeform optics. It was further hypothesized that this strategy could be implemented through a dedicated CAM software environment to create a robust and efficient closed-loop manufacturing process capable of achieving sub-10 µm form accuracy.
The experimental results provide compelling evidence to support these hypotheses. The proposed dynamic tangential toolpath optimization strategy, realized through the self-developed Freeform-CAM software, successfully addressed the inherent limitations of fixed-step methods. Validation on two distinct freeform workpieces (80.600FY and 850FY) confirmed a substantial improvement in precision, with a single compensation iteration achieving peak-to-valley (PV) error reductions of 37.0% and 48.4%, respectively, and final form accuracies below 8.1 µm. Furthermore, this performance was achieved without specialized hardware, demonstrating the software’s practical utility.
The findings lead to three principal conclusions that directly validate the initial hypotheses:
The primary hypothesis is confirmed: The curvature-adaptive algorithm provides a mathematically sound and highly effective basis for toolpath generation. By maintaining uniform cutting conditions, it preemptively minimizes errors, resulting in superior surface quality and a faster convergence rate than the conventional, corrective approach embodied in commercial systems.
The implementation hypothesis is validated: The successful integration of this algorithm into a custom CAM software proved critical. It offers a practical, hardware-agnostic solution that effectively bridges the gap between advanced theoretical algorithms and industrial applications.
The process hypothesis is demonstrated: The synergistic closed-loop process, integrating intelligent toolpath generation with metrology-driven compensation, represents a significant leap in capability. It delivers a combination of high precision, improved efficiency, and enhanced process flexibility that is paramount for the manufacture of next-generation optical systems.
By delivering a practical, high-performance manufacturing solution, this work establishes a new paradigm for freeform optics fabrication. Future work will focus on extending the algorithm for five-axis machining and integrating real-time adaptive control to further enhance efficiency and unlock nanometer-level accuracies.