This module focuses on the output of the integrated CAD/CAM workflow: the NC code required for the fabrication of the functional surface to become a physical replica of the CAD model. The MFB 3 module receives input from the parametric modeling stage, supplemented by four additional secondary functional parameters. In contrast with commercial CAM software, a dedicated visualization engine is not incorporated within this module since geometric modeling is primarily handled by MFB 2. The only form of visualization provided by MFB3 is a Matlab-generated 3D representation of the tool path trajectory.
5.1. Tool Geometry (SFB 4)
According to the proposed framework (
Figure 1), the cutting tool geometry must be defined initially in SFB 2. Among the various micromachining strategies applicable to the fabrication of V-groove structures, micro-milling and single-point diamond cutting [
17] are notable examples. The selection between them is generally dependent on the specifics of the application and the capabilities of the micromachining platform. Because the focus of the current study is the generation of functional surfaces consisting of symmetric curvilinear V-grooves, single-point diamond cutting (SPDC) remains the preferred manufacturing method primarily due to its precision and geometric fidelity. As shown in
Figure 7, a V-shaped monocrystalline diamond insert mounted on a carbide holder represents the common tool/adaptor setup used for this purpose.
For toolpath generation, the CAM module requires a concise but complete set of geometric descriptors of the diamond insert, namely: (i) included (apex) angle (θ) that determines the V-groove facet orientation, (ii) rake angle required to compute the cutting edge normal, (iii) side and bottom clearance angles that prevent flank interference, (iv) cutting-edge (edge-hone) radius required to ensure adequate material removal, (v) tip height (tool-reference offset) defined as the distance from the insert datum to the cutting apex, which is required for RTCP positioning, and (vi) shank dimensions (width, thickness, overhang) that are required for collision and reachability checks within the post-processor. These six parameters are passed from SFB 4 to SFB 5–7, ensuring that the chordal deviation discretization, cutting strategy calculations, and RTCP transformations are performed in accordance with the tool geometry that is being used.
Given the emphasis on symmetric curvilinear V-grooves in this integrated approach, the most critical parameter of SFB 2 is represented by the included angle (
θ) because the physical V-groove will materialize an inverse geometric replica of the cutting tool profile in the sense that the size of the included angle dictates the orientation of the two side/facet angles of the V-grooves. Some additional tool geometry parameters (rake and clearance angles) must also be set at this stage to ensure accurate process planning.
Figure 7 presents two examples of monocrystalline diamond insert tools featuring a rake angle of 0°, with both the side and bottom clearance angles set at 10° on each symmetric cutting face. The inserts were precision-ground and lapped to achieve symmetric included angles of 90° and 30°. Once defined, these tool geometry parameters were propagated to SFB 5 for further integration into the manufacturing model.
5.3. Cutting Strategy (SFB 6)
Achieving a unit V-groove with high surface quality (
Sa < 10 nm), burr-free edges, and precise form fidelity remains a significant technical challenge in ultra-precision machining. Secondary Functional Block 6 (SFB 6) addresses this by offering the possibility of multiple cutting strategies designed to balance machining efficiency with geometric and surface integrity. Numerous strategies have been proposed in the literature for the fabrication of functional surface structures, two of which have been integrated into the proposed framework: constant cutting area (CCA) and constant chip thickness (CCT) [
17].
As shown in
Figure 10, both strategies rely on a single flank cutting approach, wherein both groove facets are formed simultaneously, but with an emphasis placed on the primary cutting flank. This cutting approach has advantages, such as reduced burr formation and a lower risk of damaging adjacent V-grooves. Nonetheless, alternative cutting strategies, including double-flank and alternating-flank cutting, could also be implemented in SFB 5 in order to potentially enhance productivity or improve surface finish, depending on the context of the application.
Figure 10a illustrates the first cutting strategy, constant chip thickness (CCT). This approach is widely regarded as one of the most practical for single-point diamond cutting (SPDC) due to its ease of implementation and minimal requirement for prior process planning [
17]. As its name suggests, the defining characteristic of CCT is the maintenance of a uniform uncut chip thickness (
δth = constant) throughout the cutting sequence. This was achieved by maintaining a constant depth of cut, with cutting points (P
1, P
2, P
3, and P
4) strategically defined along the groove profile. The final cutting point (P
4) corresponds to the final groove depth,
hi. Although the target chip thickness is preserved across the majority of toolpaths, the final increment may yield a smaller chip than prescribed if the remaining depth is less than
δth. Although the depth of cut remains constant, the cross-sectional area—and thus the volume of material removed—increases progressively with each pass. This results in a corresponding increase in the cutting forces, which can adversely affect the tool life, induce wear, and degrade the surface integrity. In severe cases, it may lead to tool fracture or chipping at the groove peak. Nonetheless, the primary advantages of the CCT strategy are its operational simplicity and high material removal rate, which contribute to a faster surface generation.
Figure 10b presents the second cutting strategy, the constant cutting area (CCA), which addresses several of the limitations associated with the CCT approach. While CCA offers improved control over cutting forces and tool integrity, it typically requires longer machining times than CCT. The core distinction between the two strategies lies in the parameter held constant: CCA maintains a uniform material removal area per cut (
Ai = constant). This implies that A
1 = A
2 = A
3 = A
4 (
Figure 10b). The CCA approach translates into a uniform cutting volume and, therefore, stable cutting forces throughout the process. The preset incremental cutting area
Ai serves as a key input to the strategy and can be used to estimate the tool load per pass as follows: In instances where the final segment would result in a depth exceeding the predefined profile depth
hi, the area of the final cut is automatically reduced to avoid overcutting. By maintaining constant cutting forces, the CCA strategy reduces the risk of tool wear, edge chipping, and deformation of the V-groove peaks. Although this method is more time-intensive, it is generally more favorable for extending the tool life and preserving the surface quality. This makes CCA suitable for machining scenarios in which surface quality and tool life are prioritized over simplicity and productivity, which are the core traits of the CCT strategy.
Depending on the specific requirements of the target functional structure, either of the two cutting strategies presented can be used within the developed CAD/CAM framework. Furthermore, alternative strategies, such as alternate-flank and double-flank cutting, may be employed to accommodate various geometric or process-specific constraints. The availability of multiple cutting strategies enables the optimization of machining parameters with respect to fabrication speed, surface quality, and tool longevity, depending on the intended application of the functional surface. Once a cutting strategy was chosen, the corresponding set of discretized toolpath points Pj, j = 1…p can be forwarded to the subsequent functional block for NC code generation.
5.4. Cutting Process Plan (SFB 7)
The final processing stage of the CAM module involves the actual fabrication of the surface as a series of V-grooves. This is handled by Secondary Functional Block 7 (SFB 7), labeled as “Process Plan” in
Figure 1. This block governs the selection of the machining strategy used to generate a complete functional surface. In the context of single-point diamond cutting (SPDC), the post-processing of the tool path requires a continuous adjustment of the surface orientation to ensure that the vector normal to the primary rake face of the cutting tool remains confined within the vertical plane that contains the feed direction associated with each discretized segment (as generated in SFB 5). Depending on the configuration of the micromachining system, achieving the desired orientation along the groove path typically requires rotational movements about one of the principal axes of the machine tool.
In the example presented in
Figure 11, the direction of cutting is aligned with the
Y-axis of the machine tool, which likely means that a rotation about the
Z-axis is required to reorient the workpiece in the proper direction. The underlying assumption here is that the machine tool has a kinematic structure, as outlined in [
25], namely, a rotary table configuration capable of
B and
C rotations.
The angular increments were calculated as follows:
and
Equation (1) computes the absolute angular orientation of each discretized point with respect to the Y-axis based on its original pre-rotation coordinates. These absolute angles were subsequently converted to incremental angles using Equation (2) since the NC code generated for the SPDC process operates in an incremental post-rotation mode.
Figure 11c,d illustrate the complete reorientation of the tool path following each rotational adjustment. Rotation is performed about the
C-axis, corresponding to the physical rotation of the workpiece, prior to initiating each cut. The reoriented tool path for the first cut is depicted in
Figure 11c, and
Figure 11d shows the updated path for the subsequent cut after another incremental rotation. This process is repeated iteratively for each segment along the tool path until the full surface structure is machined.
A critical challenge in 5-axis machining arises from the transformation of surface points relative to the global coordinate system of the machine during each rotation. As illustrated in
Figure 12, the workpiece was rotated within the machine coordinate frame, which is separately shown in the inset box using the
Z-axis indicator. If the point of rotation, that is, the transition point from one cut to the next, does not coincide with the center of the rotary axis, the start point for each subsequent segment must be recalculated following each incremental rotation. This redefinition ensures the alignment between the tool path and the updated workpiece orientation, thus preserving the dimensional accuracy and trajectory consistency throughout the entire machining process.
Two primary methods are currently available for redefining tool or point positions following rotational movements available on multi-axis machining systems. The first approach involves implementing a user-defined or system-specific transformation matrix within the CNC post-processor. This method can be adapted to a broad range of CNC controllers, including those lacking built-in rotation compensation capabilities. The second technique uses the rotation tool center point (RTCP) functionality, a manufacturer-provided feature embedded within some advanced controllers. Although the RTCP simplifies tool orientation management during rotational movements, it is available only on select high-end commercial controllers.
As outlined in the past [
26], the transformation matrix-based approach is highly customizable but demands an in-depth understanding of spatial coordinate transformations/inverse kinematics, particularly for five-axis machines. The general transformation matrix must be generated according to the specifics of the machine tool kinematics, which in turn means that each matrix is only applicable to the machine tool configuration for which it was determined. Once all its components are known, the matrix can be integrated within the post-processor, thereby enabling the recalculation of the rotational pivot point as well as the entire tool path trajectory in the machine coordinate system (MCS), which is the only one that is a priori known to the numerical controller. This recalculated trajectory is passed directly to the CNC controller, eliminating the need for external computation during machining. Although not difficult, this approach requires advanced knowledge of kinematics and is rather tedious since the general transformation matrix is only applicable to the machine tool for which it was determined.
In contrast, the RTCP approach dynamically maintains the cutting tool tip at a fixed location relative to the workpiece coordinate system (WCS) while allowing the workpiece to rotate as needed about the Z, X, or Y-axes. The RTCP relies on an inbuilt transformation matrix and automatically adjusts all tool position coordinates in real time as the workpiece rotates. When RTCP is activated, programming is simplified since all tool motions remain expressed in the WCS without the need to be converted to and from the MCS. The RTCP approach requires precise positioning of the WCS origin within the MCS and accurate alignment between the WCS and MCS axes; however, unlike the previous approach, it is more straightforward and does not require external-to-controller calculations. Evidently, all these advantages come at the expense of a higher cost for the controllers.
Figure 12 and
Figure 13 illustrate the implementation of discretization in the fabrication of curvilinear V-groove functional structures. Both figures continue the example of the sinusoidal curve shown above in the sense that they are built on the information detailed about SFB 2, 3, and 6. To initiate the tool path trajectory for this type of structure, the cutting tool must first be positioned above the initial groove segment at a predefined height above the workpiece (L
1 in
Figure 12). Once in position, the RTCP function is activated, and the workpiece is rotated about the
C-axis by an angle of
ΦA. The RTCP function is then deactivated, aligning the direction of the first cut with the machine’s Y-axis. The tool is subsequently moved to point L
2 and then lowered to L
3 via a circular interpolation move rather than a linear descent. This lead-in motion improves tool stability, reduces the likelihood of motion-induced vibrations, and facilitates chip evacuation, as discussed in [
17]. The location of L
2 and L
3 is determined based on the start parameter of the sinusoidal curve,
that is dependent on the input geometry and may lie within the workpiece boundary. Point L
3 is aligned to the cutting depth corresponding to the first point P
1, which is defined by the selected cutting strategy. The initial cutting operation then proceeds from L
3 to L
4, where the endpoint L
4 is determined by the chordal deviation. This implies that the segment length varies according to the local curvature of the curve being discretized/traced.
After the first cut is completed, the tool remains at point L
4 to prepare for machining the next segment. The second part of
Figure 12 depicts the process for the subsequent segment, for which the toolpath sequence is repeated with reinitialized labeling for clarity. The RTCP function is reactivated, and the workpiece is rotated by the next angle
ΦB, aligning the new segment with the
Y-axis for the second cut. The CNC code structure corresponding to this iterative process is also shown in
Figure 12, highlighting the cyclic nature of the commands. Notably, the location of L
1 in the new sequence corresponds to L
2 from the previous cut, while the updated L
2 coincides with the former L
1 to maintain toolpath continuity. The toolpath and cutting sequence shown in
Figure 13 correspond to the second iteration, demonstrating the repetitive yet synchronized nature of the multi-segment groove fabrication.
Figure 13 illustrates the benefits of employing the chordal deviation discretization approach in generating smooth, optimized tool paths for curvilinear V-groove cutting. This motion is iteratively executed along the curve until reaching its terminal point (
), thereby completing the groove at the target depth corresponding to point P
1. After that, the groove can be progressively deepened by means of repeated passes until the target depth is reached. Once the groove is completed, subsequent grooves can be machined by laterally moving the tool in the X-direction using a step-over distance that is consistent with the spacing of the periodic pattern to be fabricated. This cutting sequence can then be repeated for each groove, such that the entire workpiece can be structured according to the intended design of the functional surface. Moreover, grooves can be machined sequentially or in an alternating/arbitrary pattern, depending on the selected process strategy. The chosen groove arrangement can significantly influence the quality and performance of the final functional surface. For instance, the sequence of cuts may be optimized to minimize the cumulative deformation of adjacent riblets, reduce burr formation, enhance surface quality, and fulfill performance criteria related to aerodynamics, hydrodynamics, flow control, or optical applications.
Once the process plan for fabrication is completed, by integrating the outputs from SFB 4, SFB 5, SFB 6, and MFB 1, numerical control (NC) code can be automatically generated using the CAM module (MFB 3). The NC code encompasses the full machining logic presented in
Figure 12 and
Figure 13 and includes all discretized toolpath points (SFB 5), cutting strategy decisions (SFB 6), and tool orientation instructions (SFB 7). When operating within the WCS, the use of the RTCP function greatly simplifies the NC code generation process. In RTCP-enabled systems, tool orientation and spatial transformations are handled natively by the CNC controller, eliminating the need for manual coordinate recalculation by an external programmer. However, if the controller lacks the RTCP functionality, a system-specific transformation matrix must be developed and integrated into the post-processor (MFB 3) in order to accurately map the tool path after rotational movements.
By ensuring its compatibility with both RTCP-capable and conventional CNC systems, the integrated CAD/CAM approach offers a flexible and robust solution for the automated fabrication of curvilinear V-groove-based functional surfaces. Once MFB 3 is completed, the developed framework is practically ready for final implementation and testing.