Boundary Clipping

February 15, 2008 · Filed Under MeshCAM Development 

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.

 

islands

Comments

4 Responses to “Boundary Clipping”

  1. Jeff Demand on February 19th, 2008 8:39 am

    Robert,

    Could this new code be used to find the inner borders for supports which don’t extend to the stock boundary?

    Jeff

  2. Steve on February 20th, 2008 3:29 am

    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

  3. Robert on February 20th, 2008 5:45 am

    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

  4. Steve on February 20th, 2008 8:08 am

    :-) I’m in the UK Robert, no danger of that at all

    Steve