Straight lines, or G01 blocks, are the most widespread representation form for the tool path in CNC machining. At the junctions between consecutive segments, the tangency and curvature discontinuities may lead to feedrate fluctuation and acceleration oscillation, which would deteriorate the machining efficiency and quality. To solve this problem, a real-time path-smoothing method is proposed, which adopts a curvature-continuous B-spline with five control points to blend the adjacent straight lines. The advantage of the transition scheme is that, G2 continuity, analytical calculation of the curvature extrema, approximation error control and real-time performance are considered simultaneously. Then, a bidirectional scanning algorithm for jerk limited S-shape feedrate profile is proposed to evaluate the feedrate constraints. On this basis, a real-time look-ahead scheme, which comprises of path-smoothing, bidirectional scanning and feedrate scheduling, is developed to acquire a feedrate profile with smooth acceleration. Also, an arc-length based interpolation algorithm for mixed linear and parametric segments is proposed to overcome the difficulty of crossing different segments. With these schemes, the smoothness of both tool path and feedrate is guaranteed. Simulation and experiments on an X–Y–Z platform are conducted. The results demonstrate the feasibility and efficiency of the present algorithms.