Understanding the forces that operate on a machine tool during machining is an important way to model and predict important physical behaviours, such as vibration, chatter, tool wear, machine wear and their combined effects on surface quality, workpiece deformation and springback.
Predicting the forces acting on the cutting tool as a CAM toolpath is executed is also important for feed rate optimization – understanding where it is safe for the tool to move faster, or indeed where a lower feed rate will produce a more desirable result.
An accurate in-process stock model is an important part of computing and understanding the cutting forces operating on the tool as it engages with the stock. This article, and associated video demonstration, explain why the in-tolerance polygonal boundary models created by MachineWorks are particularly well-suited to this type of analyis.
What does the MachineWorks API provide?
Various cutting parameters can be easily returned through the MachineWorks API. These include:
- Volume of material removed.
- The maximum depth of cut.
- The cross-section silhouette profile along the cut vector.
For milling cuts:
- The width of the cut.
- Whether the left and right sides of the tool were engaged.
- The minimum and maximum distances from the tool axis at which material is removed, for both left and right sides, from which it is easy to compute the engagement angle.
For turning cuts, the silhouette profile of the tool motion in the space of a given solid e.g. the stock, or in world space, can also be returned.
The MachineWorks API also allows the creation and extraction of intersect solids i.e. the Boolean intersection of the solid volume of space the tool passes through during the cut (the swept volume) with the in-process stock.
As MachineWorks is based on the same general polygon-mesh modelling kernel as Polygonica, there are a variety of operations available to any solids within the system. These include:
- 3D Boolean operations – union, subtraction, intersection,
- Creation of intersection curves,
- Intersection with rays
- Classifying points against solid (inside/outside/on surface)
- Interference check with other solids
- Slicing
- Sectioning
- Computation of properties e.g. volume, silhouette, thickness and convex hull
- Healing*
- Surface fitting and feature detection**
- Extract/export
MachineWorks also provides a wide range of operations on 2D profiles (slices) such as offsetting and Booleans.
* Healing should not be needed on solids created by MachineWorks, but may be needed on solids imported from other sources.
** Optional Extra. Not included in standard license.
MachineWorks’ tool engagement demonstrator
At the end of this blog is a link to a video shows some live demonstrations of MachineWorks computing intersect solids. The video shows a new GUI demonstrator created specficially for the purpose of showing cut data and intersect solids.
The new GUI is a proof-of-concept example, not a real product. The source code is available to MachineWorks’ customers and evaluees on request, but it is unsupported.
The demonstrator is written in C#, using WPF and the supported C# wrappers provided with MachineWorks.
Four windows are shown, along with a properties display on the right hand side.
The properties display shows volume, depth and contact information for each cut.
The four windows are as follows:
- Top left: shows a standard ‘graphical’ simulation.
- Top Right: a view showing the intersect solid, in dark blue. This is a solid of volume of material removed by the current cutting operation. Since we are often interested in viewing this close up, the arrow shows the direction of tool motion, for context.
- Bottom Right: Shows the cutting tool from above. In this window the camera tracks the tool so that the tool stays centred as it moves. The blue lines are slices through the intersection solid created by MachineWorks. Note that the demonstrator creates many more slices for each cut, but we only display a smaller number for clarity.
- Bottom Left: The chart in the bottom left window shows the depth of cut plotted against the engagement angle, in polar coordinates.
Engagement Surfaces - new in MachineWorks 8.6
The engagement surface of a cut is the region of the tool body that is in direct contact with the stock at the end of the tool movement. This is distinct from the intersect solid, which includes one or more volumes covering all material removed by the cut.
For some types of analysis, the engagement surface is useful. In MachineWorks 8.6 a new API has been provided to extract this directly as a MachineWorks session primitive. Once extracted, the new primitive can be treated as a standard solid within the system and the full set of solid operations is available.
The MachineWorks Advantage
Apologies if the next bit is a little detailed - I've tried to keep it brief. We'll save a more detailed history and explanation of the four different geometry engines inside MachineWorks for another day. For now, we'll concentrate on two - polygonal and sampled.
The MachineWorks Visicut API provides a control variable that allows you to switch between two completely different underlying geometry structures. The same code can be used to generate a stock model in either, and, with caveats, you can switch between the two models mid-simulation should you wish to.
The polygonal engine - which for decades was called MachineWorks' Visicut - models solid material as a closed, connected, polygon mesh representing the boundary surface. It's analogous to a CAD BREP, except each face, or surface patch, is planar. I call it a polygonal BREP, but sometimes people get quite upset when I do this.
The sampled engine - which used to be called Samplecut - is a set of points in 3D space. Each point contains accurate information about the boundary surface. In order to render the model efficiently, taking advantage of GPU-based hardware acceleration*, a closed, connected polygon mesh is reconstructed from the cloud of points. The presence and location of sharp edges must be inferred from the data stored at each point.
When an application performs a cut in MachineWorks, a swept-volume is created. This is the volume of space the moving object, typically the tool, passes through during the motion. This swept-volume is also a polygonal boundary mesh.
The key point is that in MachineWorks you can specify a tolerance for that boundary mesh, and MachineWorks guarantees to create the boundary mesh within that tolerance. That means no point on the swept-volume is further than that tolerance from the true mathematical surface.
In MachineWorks both the polygonal engine and the sampled engine use the same high-quality, in-tolerance swept-volumes. The difference is that in the polygonal model that tolerance is effectively 'transferred' to the stock during an explicit Boolean subtraction operation of one mesh from another, whereas in the sampled model, only the points are updated. No information exists between the points**.
It is these gaps in the data that make the polygonal boundary model the more accurate and reliable solution for cutting force analysis.
Of course, the sampled model does a good job in the majority of common machining situations, but it can struggle with
- Thin tools
- Tools with small radii
- Scraping cuts that remove small amounts of material
- Large area stocks, such that features are small relative to the distance between sample points.
By thin-tools we generally mean milling tools, but the problem can also apply to simulating Wire-EDM and laser cutting.
The images at the beginning of this section show an example, from a real-world toolpath, of issues typical of the sampled approach.
A bull-nose cutter is used, so the in-process stock has several small radius fillets. The radius of the fillets is similar to the resolution of the sampling grid, and so the set of points does not contain enough information to consistently and accurately reconstruct the fillets from the samples. The jaggies visible in the left picture are a result of the algorithm doing its best to generate a matching polygonal surface from the 3D point structure given insufficient data.
Users of sampled models for physics simulation where high accuracy is needed report similar issues with noise in the results.
The potential problem is illustrated in the case above. Depending on the number of sample points, and where those sample points happen to lie with respect to the material that is being removed, the volume of material found to have been removed by the simulation could vary significantly. Potentially, in a worst case, the simulation could fail to detect any intersection at all between the tool sweep and the stock, and therefore report that no material has been removed.
Of course, there's no silver bullet. You trade accuracy for speed, and running a really accurate polygonal simulation might take a while ... but at least you know that you can set up the simulation such that the results are within the tolerance you set.
* This is referring purely to showing the graphics using the GPU. The in-process sampled model is still created on the CPU. To avoid confusion, this is not referring to the new MachineWorks GPU product, which creates the in-process stock model on the GPU. We will talk more about MachineWorks GPU in future blogs.
** In practice, given the tool definition and the cut definition, you could calculate the stock boundary at any point in space, but once you start down that road you lose many of the benefits of the sampled engine e.g. relative ease of implementation and relatively constant memory footprint.
Live Demo
The following video on the MachineWorks YouTube channel shows a live recording of the new tool engagement demonstrator.