Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#9 Hole pocketing shapes with holes

open
nobody
None
5
2010-12-31
2010-12-31
Peter Uithoven
No

I was very happy when I found the new holes pocketing functionality. But while I was testing it I came across a limitation. Lets say I have a rectangle that has a hole and I would like to mill the rect, but not the hole. This doesn't seem possible. This is relevant when you want to engrave big texts for example, because there will be a lot of shapes with holes in them.
I added a little test svg file in which I tried a few things.
In svg it will draw the object using the normal v's and h's and when it creates the hole it will move (m) into the object and start drawing (v's and h's) from there again. Whatever you draw inside the shape seems to be subtracted from it.

Discussion

  • Peter Uithoven
    Peter Uithoven
    2010-12-31

    Hole pocketing test SVG

     
    Attachments
  • Lars
    Lars
    2010-12-31

    Hi Peter,

    yes, it is a pity, but the pocketing is currently absolutely simple - it will just ignore all areas that contain smaller polygons (as you described above).
    I would really like to have a working offsetting algorithm (I tried for some time), but it does not seem to be as easy as I thought. But I have to admit, that I don't know too much about geometry :(
    My "plan" actually is to wait for opencamlib (http://code.google.com/p/opencamlib/) or others to implement a working algorithm an then use the library (or maybe port it to python). Voronoi diagrams (as far as I understand them) seem to be the most promising candidate to accomplish polygon offsetting: http://www.anderswallin.net/2010/11/voronoi-diagram-algorithm/
    Another option could be something based on a Straight Skeleton (http://en.wikipedia.org/wiki/Straight_skeleton).

    So I am afraid, that there won't be a better pocketing algorithm in PyCAM within the next few months.

    Maybe you want to try the single-line fonts shipped with PyCAM instead of true-type fonts?
    Another alternative could be True Type Tracer (http://www.timeguy.com/cradek/01276453959).

    cheers,
    Lars

     
  • Lars
    Lars
    2011-01-09

    Hi Peter,

    I took a look at the Inkscape plugin some months ago (at the time when I was considering to implement 2D support for PyCAM). Sadly the code was (from my point of view) not really in a maintainable shape thus I decided to add 2D processing to PyCAM instead of using Gcodetools for my work.

    Right now I checked the pocketing code of Gcodetools. It seems like it is based on the bezier code of Inkscape. Digging deeper into that code is quite time-consuming, so I (personally) will not do this for now.

    Let's hope for a good implementation popping up in opencamlib or somewhere else soon ...

    If anyone has a link to a robust polygon offsetting code, I will be happy to adopt it.

    cheers,
    lars

     
  • Lars
    Lars
    2011-03-08

    Hi schaebo,

    thanks for the hint!
    But sadly CGAL's license is not suitable. The polygon offsetting algorithm is lincensed under the QPL, which disallows reuse in GPL programs.
    What a pity!

     
  • do not slice & paste the guide. [url=http://cheapbeatsbydrstore.webstarts.com/]beats pro[/url] <a href="http://cheapbeatsbydrstore.webstarts.com/" title="beats pro">beats pro</a>