Computer Graphics & Geometry
S. Bolsunovsky, V. Vermel
Central
Institute of Aerohydrodynamics (TsAGI), Russia
E-mail: sa_bolsunovskiy@mail.ru
Contents
Abstract: Maximum feed rate is the fundamental approach to material removal rate (MRR) increasing for modern milling processes. The effectiveness of high feed rate milling strategy is practically verified; nevertheless, programming trajectories with high maximum feed in practice can result in unsatisfactory low average feed value due to milling path peculiarities for given part geometry. If that's the case, special approach to the toolpath programming should be utilized.
In this paper, cubic spline approximation to the initial trajectory is offered for toolpath specification. The specified algorithm was implemented in C++ code and milling process simulation was carried out on the basis of virtual machining emulation program.Simulation results show machining time reduction and several disadvantages concerned with cubic Bezier splines utilization. New approximation method that corrects the drawbacks is proposed on the base of current analysis.
In CAM-systems milling trajectories are computed as polylines connecting points on the surface to be machined. The resulting polygonal path is programmed as the consequence of G1-codes in the machine NC system. Additionally, in the case of plane trajectories modulation, G2/G3 codes could be used to represent arc path elements.
The fundamental problem arises when machining polygonal/arc trajectories. It lies in the fact that continuous feed motion should be maintained over the trajectory that has discontinuous tangent vector, so the feed velocity vector correspondingly should be discontinuous. An infinite acceleration is to be imposed to the tool point to maintain feed motion with constant velocity module (equivalent to infinitely small arc). Since it's impossible, the velocity should be diminished to zero at polyline break points (Fig. 1).
From the fact that sufficient acceleration to walk through the plain arc of given radius at constant speed can be seen the following:
![]()
Where
Centripetal acceleration,
Velocity module,
Arc radius.
In the case of nonzero constant velocity, if trajectory radius tends to zero, the required acceleration becomes infinite.
In practice, at the break point the tool is moving not exactly as programmed, but the polyline breaks are smoothed with small arcs (micro arcs) within a specified accuracy. Therefore tool passes break points at nonzero speed that depends on machine linear drives available accelerations (Fig. 1).
Nonzero feed breaks are passed at available for machine linear drives evaluative feed rate (Fig. 1).

Fig. 1. Passing polyline break point.
The fillet radius
defines evaluative feed rate value. In turn
fillet radius depends on break angle. Most often evaluative feed rate is about
, which could result in average feed much less than programmed.
If break angle and evaluative feed rate are fixed, mean polyline segment feed can be calculated applying averaging to the consequent motion stages: acceleration motion at the beginning of segment from evaluative feed rate to the programmed one, cutting on the programmed maximum feed and deceleration motion at the end of the segment from maximum feed to evaluative one. As a result mean feed rate value will be less than programmed (Fig. 2). Maximum feed rate is not generally achieved for short segments, and in this case feed approaches evaluative value.

Fig. 2. Mean segment feed rate is less than the programmed one.
Feed rate motion inefficiency arises from trajectory specification technique based upon line segments representation. To enhance mean feed rate value (achieving programmed feed rate value at the limit) it is necessary to pass on to smoother milling trajectory specification that has less number of breaks (smooth trajectory at the limit).
CAM systems compute trajectories using triangulated model of the part geometry, which are obtained as a consequence of vector-points lying on the surface to be machined. To build smoother trajectory various approximation techniques can be used, for example, arc segment approximation, with polylinear as the simplest one.
At present arc approximation can be widespreadly used. It shortens number of breaks by several times and consequently increases average feed rate. Fast and reliable arc approximation algorithms have been developed, but they can be used only for plane trajectories and with 3D helical approximation applied.
LookAhead technology is widely used in addition to the path approximation. Special computer algorithm analyzes a few part program frames ahead from current position to forecast sharp turns in trajectory. Arc approximation and forecast system together allow one to realize an effective high speed milling process in most cases, with further maximum feed growth taking into account, efficiency rise will be constrained by existing breaks between arc segments.
In this paper cubic splines, particularly Bernstein-Bezier spline and B-spline, are suggested as a basic elements for trajectory approximation. Mathematical apparatus of cubic splines is well studied, fast and robust approximation algorithms are developed [1][2]. At the same time cubic representation provides necessary level of continuity and flexibility for resulting curve.
The paper is organized as follows. The questions of preliminary polyline path splitting and cubic Bezier approximation are discussed in section 2. Then basics of machining process emulation are clarified and the results of emulation are analyzed as well. Finally we discuss some problems of Bezier cubic approximation and propose some ideas for possible future work.
Initial polyline toolpath in CAM-system can be written as a sequence of vector-points
Performing calculations of spline trajectory it is convenient to account for
the relative location of machined surface, which can be used in the
spline-trajectory smoothing process and other possible toolpath corrections.
Machined surface position is defined by the particularly consequence of surface
normal vectors. Since the surface position is used in spline-trajectory
correction process, we neglect them while calculating approximating spline. If
this is the case toolpath approximation problem becomes very alike to the
classical spline approximation problem that could be formulated as follows:
,
so that the following condition is satisfied:
| (1) |
The above problem comply with the toolpath approximation problem only in part, as the spline that approximates toolpath should be bound not only to vector points lying on the surface, but to the polyline segments connecting this points. The following condition binds spline to polyline segments (Fig. 3):
| (2) |

Fig. 3. Conditions to be satisfied in approximation process.
Fig. 4
illustrates the necessity of condition (2). Condition (1) is valid for all
points of the array to be approximated
, however in relation to moving tool the resulting spline
curve is inadequate - the curve deviates significantly from polyline segment
, Condition
(2) is violated.

Fig. 4. Example: spline approximation condition (2) has not been satisfied.
Well-known classical approximation methods are often based on least squares method. Spline curve obtained from least squares is bound to points not to segments, so that condition (2) has not been satisfied in approximation process. To solve this problem initial polyline is subjected to special verification, which ensures that condition (2) is met.
In order to
reveal segments such as
, the
bending deflection criteria is utilized [3].
Spatial arc computation is based upon three consecutive points of polyline trajectory [3], where the corresponding deviation of two segments is checked using points from the arc (Fig. 5). If the segment deviation is more then the certain permissible value, corresponding segment is not approximated. The circumstance is mathematically written as:
| (3) |
In such a way, the "bad " segments could be sifted out by a consecutive trajectory segments sweeping.
Fig. 5. The bending deflection criteria.
Least squares method approximation guarantee condition (1) will be met for all polyline points. But if "bad" segments check up precedes the least squares, condition (2) will be met with the accuracy equal to the sum of tolerances of conditions (1) and (3):
,
,
and respectively:
,
to within the coincidence of arc and spline in the vicinity of polyline segment.
Hence one can proceed to the classical approximation problem (1), which is solved in a wide range of CAD/CAM applications [1][2].
In program
code we have implemented least squares algorithm [2], which fits the
consequence of points with Piecewise-Bezier curve of
geometrical
continuity (Fig. 6):
| (4) |
Start and
end Bezier segment points
are polyline points, whereas points
are selected in such a way that they met the
polyline tangent condition computed from finite difference estimation (Fig. 7à). Tangent vector lengths are
determined from the best square fit into the polyline points between start and
end points (Fig. 6). Tangent condition at start and end points are also
determined from finite difference (Fig. 7b), but if the number of polyline
points between start and end points is not enough to apply the finite
difference estimation low order end conditions are used up to zero for single
segment polyline case (Fig. 8).

Fig. 6. Piecewise-Bezier least squares approximation.

Fig. 7. An estimation of tangent vector from finite differences.

Fig. 8. Low order tangent condition.
The above algorithm has been implemented in C++ programming code. It enables one to convert original invariant APT-code part program with trajectories represented in polyline format to machine part program based on spline trajectory representation. In particular, the machine part program file format has corresponded to NC machine system Siemens Sinumerik 840 that supports NURBS toolpaths [4]. Fig. 9 illustrates the part program fragment of Piecewise-Bezier trajectory converted to NURBS representation [2].

Fig. 9. Example: spline representation in part program.
Using the code a few 2D milling programs for a simple part have been created. Milling process was simulated using Siemens VisuTool system. The system contains full NC system mathematics and dynamics of machine linear drives. Available speed and acceleration parameters are bounded to some average values.
The algorithm described above has been tested
on the simple model (Fig. 10). The toolpath was built as 2D contour milling.
Cutting feed was
and approximation tolerance was
, relative
machining tolerance was
accordingly. Emulation has been carried out
for the following toolpath representation techniques:
LookAhead function was enabled in machining emulation process for all part program versions to increase mean trajectory feed rate according to capability to forecast trajectory behavior of several frames forwards.
Fig. 10. Milling trajectories approximation techniques are tested on.
Machining time has served as a criterion for the trajectory quality estimation. The appropriate diagram is showed in summary of this chapter.
The emulation results are obtained as a text data file containing time-discrete information about axis tool positions and velocities; in addition, VisuToolä system allows one to visualize information about the instantaneous feed rate and trajectory geometric continuity.
Comparison of two trajectories - the first, cubic spline approximation obtained from algorithm of section 2, and the second, calculated by the built-in frame compressor, is of the most interest (Fig. 11).
On the picture, left screen shows toolpath built by the compressor, and right screen illustrates cubic spline trajectory.
Fig. 11 shows up toolpath continuity picture for cubic Bernstein-Bezier spline on the left (Bezier segments are transmitted to NC system separately) and NURBS spline on the right (if Bezier segments are connected continuously, they are converted to NURBS).
Green markers denote points of geometrical
continuity
, but the
red one designates trajectory tangent break is possible i.e. toolpath is
continuous in the point. In case of separate
Bezier spline segments describing toolpath all connection points are marked as
points of possible tangent break, since Beziers are not mathematically
connected. They have only end points coincidence, while end tangents are not
supposed to be so. Red marker indicates this. Some markers on the right screen
are green - there are points of segment end tangent continuity, two adjacent
segments from the left screen are laced to NURBS-spline. It can be seen that
some markers are still red. This indicates tangent breaks and impossibility of
Bezier to NURBS lacing.
The analysis shows that insufficient trajectory approximation accuracy is the reason. For some Bezier connections that have extremely small tangent break to be considered by VisuTool as tangent vector discontinuity. Fig. 13a and Fig.13b illustrate that such virtual breaks do not influence the feed rate.

Fig. 12. Spline trajectory continuity picture.
The trajectory feed rate picture is shown on the Fig. 13à. Spline color indicates feed rate reduction because of inadequate trajectory behavior, thus the red one indicates maximum programmed feed rate. Yellow, green and blue represent feed rate reduction, where yellow corresponds to minor feed reduction and blue means almost exact stop.
Left side of the screenshot illustrates feed rate over compressor trajectory and the right part of it depicts feed rate over cubic-based toolpath. Even in an overall view, one could notice that toolpath computed by built-in frame compressor has higher quality (has less feed rate reduction zones) than that based on cubic splines.
The most noticeable feed reduction arises when
tool passed trajectory elements responsible for Z-level shifting, while cutting
occurs on a programmed feed rate, except for some areas having low-quality
trajectory elements connection. Cubic spline trajectory has more such
connections. Comparative analysis of continuity data along with feed rate
picture shows that feed rate reduction is not correlated with trajectory
continuity revealed by VisuTool. Feed rate diminishing is equally possible for
continuous connections
and
connections with a tangent break
, as marked by
VisuTool.

Fig. 13a. Compressor vs. cubic spline global feed rate picture.

Fig. 13b. Cubic spline feed rate picture compared to continuity picture.
That was a very surprising result following to mathematically C0-continuous connections (Fig. 12) in machining process, being viewed as continuous, while feed reduction effect had another background.
Analyzing Fig. 13a and Fig. 13b thoroughly one could notice characteristic zones of feed rate diminishing connections between lengthy straight/nearly straight trajectory segment and filleting toolpath of many fewer radius Fig. 13a and Fig. 13b). In this case an uneven trajectory curvature changing occurs. This is illustrated by Fig. 14, obtained from VisuTool curvature analysis application.

Fig. 14. Curvature distribution along cubic spline toolpath.
Curvature changes significantly in point of
junction between
continuously connected segments, especially
in case of line segment and spline approximating filleting toolpath elements
junction which is typical for elements of Fig. 13a and Fig. 13b.
To investigate the problem a comparative analysis of toolpath feed rate and curvature information using VisuTool emulation data files was carried out. Fig. 15 illustrates how trajectory feed rate changes while the trajectory is machined (dependence on time is showed). The case of trajectory with compressor enabled is showed on two upper graphs and the case of cubic spline approximation on the lower graph respectively.
Braces on the graphs mark out time intervals corresponding to machining of the same trajectory part, and the time shift appears as the machining in compressor case goes faster.
Significant feed rate diminishing (nearly exact stop) corresponds to shift of Z-level in 2D milling process.
If the feed rate graphs for the same trajectory part (marked by braces) are compared, the graph corresponding to cubic spline trajectory contains feed rate falls, that are not on the compressor trajectory graphs. They are marked with red ellipse on the graph.
The corresponding part program code is
illustrated on the Fig. 9. Analyzing the program code one could find it
describing
continuous NURBS; nevertheless some problems,
that are discovered by feed rate reduction, arise in machining.

Fig. 15. Feed rate variation during 2D-milling.
If one will plot the curvature module graph for the trajectory part, where feed rate falls take place (Fig. 15). Obtained curvature profile for the cubic spline trajectory greatly differs from the compressor one (Fig. 16).
Fig. 16. Curvature variation for the trajectory part under investigation.
It can be seen from the graphs that, trajectory consists of two straight-line elements (zero curvature) connected with filleting spline curve.
In cubic trajectory calculating, filleting polyline is approximated by spline with tangent-continuous junction to the corresponding straight segments. Curvature continuity restrictions are not imposed; hence the trajectory has a disconnection in a junction point.
Opposite, compressor trajectory is
characterized by smooth curvature variation; it looks as if compressor toolpath
has the second order of geometric continuity
.
From the comparison of Fig. 15 and Fig. 16, it can be seen that the falls in feed rate (Fig. 15) call forth curvature module discontinuities at the filleting spline ends. Based on the results, new requirements to the toolpath geometry could be formulated. It will be done in the final chapter.
In the end of this chapter full trajectory machining time diagram is analyzed (Fig. 17).

Fig. 17. Relative machining time diagram.
Estimating time shortening value on the diagram
one could doubt the effectiveness of different technique approximations. For
example, the gain from implementation of cubic spline approximation is
with respect to polyline trajectory with
exact stops, and the gain with respect to micro arcs filleted polyline is only
.
The cause of the ineffectiveness is short
trajectory machining time
. An
essential part of the time is spent to level shifting that holds with the feed
rate reduction and stops, while cutting feed movement trajectory parts are
machined fast. As a result of such an averaging, the effectiveness of the
implemented approximations becomes small. For the real milling trajectories the
cutting time significantly overcomes level shifting time, so the approximation
becomes effective.
Partly, more realistic results could be obtained if the relation between corresponding approximation techniques time machining value is taken into consideration. For example, implementation of trajectory compressor allows one increase in time shortening gain with respect to micro arcs approximation together with LookAhead method almost to a half of it.
Due to curvature module jumps, cubic spline
trajectory is machined slower than that of compressor. Though the absolute
difference is small
,
faster along the
curved trajectory. Nevertheless, for the resulting three forth cubic
approximation satisfies the conditions concerning toolpath continuity together
with machining time value.
To improve the approximation effectiveness additional end conditions should be imposed on the toolpath representation spline, particularly the conditions ought to prevent curvature module breaks.
The described toolpath fitting technique based
on cubic splines has showed the spline approximation, which is very effective
for the smooth milling tool trajectory representation. However, the
restrictions imposed on the spline segment end tangents, providing toolpath
geometric continuity
, are not
enough for the tool trajectory representation, and
smooth toolpath could have feed rate
diminishing regions.
Special analysis based on the milling process emulation program VisuTool that is used by Siemens Sinumerik 840D NC system mathematical kernel has showed the curvature module profile, which has an essential influence on the tool movement dynamics. Abrupt curvature changes result in feed rate motion decelerations; therefore curvature continuity condition should be used in addition to it. In the general case of spatial toolpath this restriction for two spline segments to be connected could be written as:
| (5) |
where
curvature and binormal vector at the
parametric end of the first segment,
curvature and binormal vector at the parametric
beginning of the second segment.
The continuity condition has a second degree of
continuity
. Bernstein
basis doesn't allow one to build (in consecutive fitting process) spatial third
degree
continuous curve (for the plain curve it is
still possible and the problem has been solved in many applications), therefore
another basis for the fitting curve should to be used. For the given problem,
it is convenient to implement spline-fitting procedure based upon B-splines of
the third degree. Third degree B-splines satisfy the geometric continuity
condition (5).
This approach will be evolved in the future work.
[1] Les Piegl, Wayne Tiller, The NURBS book, 1997.
[2] David F. Rogers, J. Alan Adams, Mathematical elements for computer graphics,
Second edition, 2001.
[3] I.D. Faux, M.J. Pratt, Computational geometry for design and manufacture, 1982.
[4] Sinumerik 810/840D programming guide, 03/04 edition.