Boundary Clipping
The last few shots I’ve posted show that the toolpaths have not been clipped by the stock boundaries. The shot below shows this problem fixed. The toolpaths are properly clipped by the machine boundaries even though the clipping created new islands in the lower part of the X and in the middle of the C shape. The code also correctly handled the clipping of the existing island in the O.
This clipping task may seem simple when using a rectangle but the code is made to be very generic so that, at some point in the future, the machine region could be defined by a freeform curve imported via DXF or though a dialog. The code below just creates a polyline from the stock shape so it’s pretty simple.
This is very hard code to write if you want it to work with arbitrary polygons so I didn’t write bother- I licensed it from someone that had it worked out. A thin wrapper of C++ and it was ready to integrate into MeshCAM.
Comments
4 Responses to “Boundary Clipping”


Robert,
Could this new code be used to find the inner borders for supports which don’t extend to the stock boundary?
Jeff
Looks good Robert, can hardly wait, now the weathers getting better here I’ll be wanting to get out to the workshop more and carry on with the parts I put on hold over winter.
Opps spoke to soon it’s starting to rain again.
Steve
Jeff- Potentially it could but it would not be able to fit them to the geometry like the current code I’m about to release.
Steve - I’ll try to get it out and debugged before the temperature gets so high that you end up avoiding the garage in the summer.
-Robert
Steve