Explaining the Roughing Spikes
Several users of the 3D roughing option have pointed out the spikes that can appear near the geometry. On first glance, they look like a bug in the code that projects the toolpath down to the surfaces. The problem is actually microscopic movements in the toolpath in the XY plane.
When the roughing toolpaths are laid out, they are done in 2D first and then projected down to the surface. This process includes the contours being adjusted and moved several times along the way. As I’ve mentioned it here before, floating point numbers pickup errors as they are manipulated.
Since the inner and outer contours of a pocket started out being in contact with the surface, you would hope that they would remain in contact when you’re done. If the point has moved in the XY plane then the point would now undercut or overcut the model in some microscopic way if the Z value remained the same. If the points were not projected back down then you would never know about it- the over/undercut is way beyond the capability of your machine anyway.
If the shifted point happens to fall on a surface with a very steep slope then even a very small shift in XY distance will cause a large shift in Z. The picture below shows this effect.
The solution here will probably be to lock the Z value of the contours that are in contact with the model. I am going to try a few more things before that but I’m at a loss to come up with a better solution right now.
For what it’s worth, I was able to determine that one of my methods to fix the problem, that has been shipping for a while, actually made the problem worse.
In the mean time just remember that they are ugly looking but are not gouges- they should never be visible on the final part.

Robert, would it be possible to “postprocess” the toolpath with the shifted points? You would take each shifted point and displace it along a line normal to the surface normal (i.e. parallel to the facet and in a plane normal to the XY plane) down to the desired Z level, which would tweak the XY coordinates of the point accordingly. Would that be more work than restricting the Z value of the contour ahead of time?
Randy
Last night I would have said that it would be more difficult to post process them but I’m now having second thoughts. I have a lot of plumbing in the code for the ability to load DXF files as machining boundaries (V4
). By the time I generate a contour around the part and then intersect it with the machine boundaries I loose all concept of where the contour came from- which makes it difficult to know what contours to “lock.”
I’ve been staring at the code for about an hour trying to “will it to work”, a technique I learned for a former coworker who was young and unmotivated. The “will it to work” method never worked for him so I shouldn’t be surprised that mine still doesn’t work.
In the mean time I may add code to cap the paths so they cannot go above the current machine plane. That would eliminate half of the problem but the other half would remain difficult.
I may end up with something like you propose but it’s a big chunk of code to bite off right now.
-Robert
Robert, I’d think that the downward spikes would be the simple ones to “fix”. From your illustration, the downward spikes are where the actual toolpath is slightly outboard of the theoretical path. If you just substitute the defined Z value for the actual Z value, the net result would just be a microscopic outwards glitch in the toolpath. Since the glitches are solely in the “inner” edge of the pocket, it seems no harm, no foul since it’s just roughing and the glitches would be into the cleared area…
Randy
The problem is that I want to try and keep the “valid” dips if I can so I’ll need more testing to know which ones are valid. Your comments came at the right time last night and gave me some ideas to try today. If it goes well then I should have this mostly fixed today or tomorrow… and V3 will be done!
-Robert
Robert, could you please explain “valid dip” in the context of roughing
? If we set the roughing stepdown to limit the load on the cutter, it would seem that local dips in the toolpath below that level would be unhealthy for the cutter since they would be plowing into the stock. The 3D roughing ramps down to the preset depth for that pass, but I would think that you would never want to go below that depth for any reason…
Randy
The way the toolpath projection works would never let a point dip below the max depth of that cutting pass.
A “good” local dip might be the cutter moving across a flat plane and then dipping down into a hole that is only slightly larger than the tool diameter. If this is the case then the tool might only have one point dropped into the hole before it climbs back out. This will not hurt the tool because it will not plunge deeper than the specified “depth per pass” value. You could correctly argue that this is a rare case that wouldn’t happen that often. I’ve found that, because MeshCAM generates millions of toolpath points each time you run a calculation, even low probability events happen enough that they have to be considered.
-Robert