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.
Hole pocketing test SVG
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
I understand your priorities.
Perhaps you can get some inspiration from the following Inkscape plugin?
http://www.cnc-club.ru/forum/viewtopic.php?f=33&t=35&start=100&sid=76ec195edd12def156a69dd95c61117b
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
Maybe you could use CGAL, it provides some of the mentioned algos and it seems there are python bindings available
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Straight_skeleton_2/Chapter_main.html#Subsection_23.1.3
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>