Creating Toolpath

Discussions around the CAM Add-On of QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Indicate the post processor used.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
HJ Seef
Newbie Member
Posts: 3
Joined: Mon Sep 15, 2025 1:14 pm

Creating Toolpath

Post by HJ Seef » Thu Sep 25, 2025 2:04 pm

Hi, having some trouble with creating toolpaths from hatched lines.
Attachments
ArceerToolpath.zip
(29.1 KiB) Downloaded 94 times
250715_Triac_Module_B_Cu.zip
(179.15 KiB) Downloaded 92 times
BUG_QCAD_2025_09_24.pdf
(418.65 KiB) Downloaded 94 times

CVH
Premier Member
Posts: 4920
Joined: Wed Sep 27, 2017 4:17 pm

Re: Creating Toolpath

Post by CVH » Thu Sep 25, 2025 3:48 pm

Hi,

Note that DXF files can be attached directly to a post.
Spares us the trouble of downloading the ZIP and extract a DXF from in there. :wink:


In ArceerToolpath.dxf the source was a Hatch or a Hatch exploded to individual lines.
Best is to 'engrave' or mill these 'On path'.
Hatch lines are 1.905 units apart, best milling overlap is 30%.
But you use a laser and your laser spot is defined as 0.08 mm in diameter.

A Laser is turned on/off, a mill or an engraver point plunges down and retracts upwards.

Also remark that for zig-zag pocketing a contour, a finishing pass at the interior of the pocket is required.
The better option is continuous spiral pocketing but QCAD/CAM doesn't support pocketing out the box.
Alternative is: Pocketing with QCAD/CAM

Caution: The zig-zag pattern ends at the contour limit ... That is the center position for 'On path'.
As is, the islands may be 2x a half tool diameter narrower and the edge may be jagged.


In 250715_Triac_Module_B_Cu.dxf I can detect 1 Hatch on layer 'B_Hatch'.
It explodes to 12067 lines, 0.075 units apart.
Which profile is used to clear that area?

Are you going to vaporize copper with a Laser?

If a profile toolpath is not generated ...
... Perhaps the nearest neighbor algorithm to find an optimal processing sequence chokes.

Regards,
CVH

CVH
Premier Member
Posts: 4920
Joined: Wed Sep 27, 2017 4:17 pm

Re: Creating Toolpath

Post by CVH » Thu Sep 25, 2025 4:31 pm

CVH wrote:
Thu Sep 25, 2025 3:48 pm
As is, the islands may be 2x a half tool diameter narrower and the edge may be jagged.
In 250715_Triac_Module_B_Cu.dxf try:
- Select hatch on layer 'B_Hatch'.
- Explode to lines (XP).
- Edit Layer 'B_Hatch'.
- Select a Lineweight that nearly matches your mill or laser spot diameter > 0.09mm.
- Turn off 'Screen-based Linetypes' (and weights) (NL)

The lines are rendered with a round pen mimicking your mill or laser spot diameter.

Regards,
CVH

HJ Seef
Newbie Member
Posts: 3
Joined: Mon Sep 15, 2025 1:14 pm

Re: Creating Toolpath

Post by HJ Seef » Thu Sep 25, 2025 6:44 pm

@CVH It's not the first time I'am using a 2,5W laser cutter to burn an thin alkyd paint layer from a PCB so it can be etched. The laser diameter is 0,10 mm. By setting it at 0,08 mm diameter, the overlay is 20%.

For 230 VAC- safety reasons the copper between the traces have to be removed.

One could use a lot of offset-outside-toolpaths with fictive diameters (see the tool list), but that is an awful lot of work, and it wil not remove all the in between copper.

Pocketing would be realy be nice, however .... QCAD/CAM does not support it (realy a missing feature!).

In the workflow, to make sharp traces they are lasered first with an Inside and Outside toolpath. Next, the copper between the traces have to be removed. As a solution I try to use a lined hatch pattern with an On-toolpath. I tried and tested this solution witch ArceerToolpath.dxf. That works fine.

However, in the PCB design 250715_Triac_Module_B_Cu.dxf the same solution is aborted.

=> " It explodes to 12067 lines, 0.075 units apart. ", is what it should do. Whenever I try to explode the hatch, it disappears completely.

Why can I create toolpath with the test-drawing and not on the PCB?

CVH
Premier Member
Posts: 4920
Joined: Wed Sep 27, 2017 4:17 pm

Re: Creating Toolpath

Post by CVH » Thu Sep 25, 2025 10:56 pm

HJ Seef wrote:
Thu Sep 25, 2025 6:44 pm
Whenever I try to explode the hatch, it disappears completely.
It is simply not rendered because such things may slow down QCAD to a crawl.
It seems indeed that a not rendered Hatch entity is exploded to nothing ...
... Kinda a bug. Not rendering is one thing, not exploding to line-art is another aspect.

See Application Preferences .. Graphics View .. Appearance .. Timeout for hatch rendering (Scroll down)
Increase the Timeout (ms)

QCAD(/CAM) may already become unstable or crash.
HJ Seef wrote:
Thu Sep 25, 2025 6:44 pm
Pocketing would be realy be nice, however .... QCAD/CAM does not support it (realy a missing feature!).
Parallel offsets are generated automatically but the result may have flaws.
The area to clean is the Hatch set as solid and then exploded to outer contours.
Your pocket might be too complex.

Also follow the links included under 'Pocketing with QCAD/CAM'?
My CNC driver has a CAM build in that mostly does a fine job. (Windows only)
The G-code of the pocket can be reloaded by QCAD for a profile 'on path'.
HJ Seef wrote:
Thu Sep 25, 2025 6:44 pm
Why can I create toolpath with the test-drawing and not on the PCB?
I think I may already answered that.
Divide an concur can be a solution if the Hatch is too large, too complex.

Regards,
CVH

CVH
Premier Member
Posts: 4920
Joined: Wed Sep 27, 2017 4:17 pm

Re: Creating Toolpath

Post by CVH » Sat Sep 27, 2025 7:18 am

HJ Seef wrote:
Thu Sep 25, 2025 6:44 pm
One could use a lot of offset-outside-toolpaths
Yes, about 90 parallel offsets may do the trick, see menu Draw .. Polyline .. Offset (OQ)
Select all boundary contours from the Hatch exploded as solid.
Opt for 0.075 apart + 90 offsets + mode 'Offset Whole Polyline' + 'Round Join' + Clipping in the Option Toolbar.
Then indicate near one of the contours at the inside of the required pocket and activate the tool.
Set a pot of coffee in the mean time :lol:

Not that difficult in itself :wink: ... Fixing the offset errors can indeed be an awful lot of work :roll:

QCAD may stall ... Then do only 5 offsets or so at once and restart with selecting the inner parallel paths.
The number of offsets can be increased in successive steps. :wink:

Attempted this with QCAD 3.32.4 just to check if QCAD offsets are flawless these days.
:arrow: They are not, had to correct many things even with successive steps. :(

250715_Triac_Module_B_Cu.Hatch.dxf
Merely the offsets, not a QCAD/CAM file
(3.45 MiB) Downloaded 82 times

Resulting in 1248 Polylines, by eliminating re-tracing 1215 are logically closed the rest are single strokes.
What is about 10% of the zigzag entity count and thus 89.66% less tool-paths to sequence for the pocket profile.
Total travel is a little shorter: 74.853 instead of 76.180 meters.
As said, your zigzag travels too near to the pocket edges.
HJ Seef wrote:
Thu Sep 25, 2025 6:44 pm
... it wil not remove all the in between copper.
It will clear the pockets completely if done correctly.
30% overlap with a cutter means that only about 1/3 of a cutter is engaged with virgin material.
0.075 apart with a 0.10 diameter tool is 75% engaged with virgin material.

That will indeed leave some spots 'uncut' at offsets with very acute angles.
(Turn off Screen-based Linetypes (NL) ... The offsets layer uses a 0.09mm pen ... 0.10mm is not an option)

Your zigzag approach has another draw-back.
A hatch origin is typically the drawing origin after creation, lines are evenly spaced in regards with that.
It can be set so that one of the horizontal lines is exactly 0.05 away from a pocket boundary.
In no way you can prevent that any other is much less than 0.05 away from another edge.

The best approach:
- First define a set of finishing paths as an 1/2 tool diameter or 0.05 offset to all the pockets boundaries at once.
Intended for the final pass.
- Then define a set of areas to clear with pocketing that is 1/3 tool diameter smaller than the finishing paths.
Preferable with a larger tool if that is an option.
- Pocket or hatch these areas what will not over-cut the boundaries.

When milling we would use a larger mill for the roughing what are less and shorter paths, in all it is faster :wink:

If I can spare the time I may attempt spiraling pocketing ...

Regards,
CVH

Post Reply

Return to “QCAD/CAM”