The stencil buffer sweep plane algorithm for 5-axis CNC tool path verification
A new algorithm based on the sweep plane approach to determine the machined part geometry in 5-axis machining with general APT tools is presented. Undercut and overcut can be determined. Collision detection between the toolholder, workpiece and workpiece fixture can also be detected. The subtraction of the removed material is obtained for each sweep plane by using a stencil buffer. A flat plane is swept through the blank part, fixture and tool swept volume geometry. The intersections of sweep planes and the swept tool volume are computed based on the canonical representation of a cone, torus and sphere. The necessary data to compute all the intersections is stored in a text file, here called the M-Plane file (Memory Plane). The equations of the intersections are approximated by a polygon with variable accuracy. The resulting APT tool intersection in each sweep plane is then clipped against the blank workpiece intersection with the current sweep plane. The stencil buffer provides automatically the union of all tool intersections and the subtraction from the blank workpiece. This algorithm provides a 3D geometric model of the tool swept volume. The display algorithm is based on the Painter's algorithm, but there is no time consuming sorting from back to front required, as the sweep proceeds from back to front. The accuracy of the algorithm can be varied as a function of the requirements by changing the polygon approximation and the distance between the sweep planes.
sweep plane collision detection nc milling gouging