multigcs / viaconstructor

python based cam-tool to convert dxf into gcode
GNU General Public License v3.0
57 stars 8 forks source link

How to pocket a path with "holes" in it? #11

Open faern opened 2 months ago

faern commented 2 months ago

Hi! I'm trying to pocket some letters with the CNC mill. However, letters with holes in them, such as o and lower case e are cut weirdly and I can't seem to make viaconstructor not cut in the holes/islands of the letter.

Here is an example file file I'm trying to operate on, that shows the issue. I have tried to save it from inkscape as inkscape svg, plain svg, and DXF. All with the same results: o-with-weird-results

Here is how viaconstructor wants to cut it: screenshot_2024-08-22_01-02-55

It treats it as two separate objects, in this case rings. And it cuts everything inside each ring. Instead of cutting inside the outer ring, except the stuff inside the inner ring. So the area in the middle of the o is cut twice. I can under objects see two objects, each ring.

Is this possible to achieve what I want with viaconstructor, have I just configured it wrong? I have enabled pocketing. I have tried disabling "islands".

Thank you for a really nice simple software :)

multigcs commented 2 months ago

can you please give me your configuration “viaconstructor.json” and the circle again as DXF

via

multigcs commented 2 months ago

via2

faern commented 2 months ago

I'll see if I can supply that. I want the inverse of that your screenshots show they cut out. I want to cut (pocket) on the letters. Where the o is black in the svg I uploaded. The letters are supposed to be pockets into wood.

faern commented 2 months ago

This is what I want the end result to look like (temporarily did the pocketing in FreeCAD instead to show it):

screenshot_2024-08-22_07-53-24

Here is the dxf as well as the saved viaconstructor project: o-with-weird-results.zip

multigcs commented 2 months ago

Ahh, ok, sorry.

i see the problem, the program can't handle it properly, you can put a frame around it and set offset back to auto. you can deactivate the frame in 'Objects:

via4

... in the Font-Tool, you can use the Border-Option, this generates the frame around the text

faern commented 2 months ago

I'll try it out! So basically I just invert my vector image. I briefly thought about that, but never tried it as it did not feel like the correct solution. But thank you for telling me this is the way to do it currently :sparkles:

faern commented 2 months ago

This works! It's a bit tricky, but doable. Thank you. You can decide if you want to keep the issue open or not. There is a workaround, but as you said yourself, this is a limitation in the software currently