Default safe Z for cam drill operations

Hi,

Yes, this should be possible in a custom postprocessor, typically based on the one you are currently using.

I think that the variable affected is this.zClearance.
A simple test shows that a preset is not loaded into the dialog.

That is probably because the dialog serves a dual purpose:
Configuring a new toolpath from defaults or for editing an existent one and then it loads parameters stored in the document.
Loading well established defaults for your setup falls under ‘Better safe than sorry’.

We can however also customize the initialization of the dialog.
See related topic … Then I read that you already managed that. :wink:


First you need to make a copy of the standard GrblMM.js postprocessor file.
Don’t modify the existent file because these script files might be overwritten on any update.

Rename every occurrence of the textual string ‘GrblMM’ in for example ‘MyGrblMM’.
Adapt the GrblMM.displayName to something you will recognize in the list of postprocessors.

Add the provided code as MyGrblMM.prototype.initDialog after GrblMM.prototype = new Grbl();
The dialog.objectName to act on is then “CamDrillToolpathDialog”.
That can be 2 separated if clauses in initDialog when you also customize the “CamProfileToolpathDialog”.
The widget to locate and alter for drilling is “CamZClearance”.

Save your custom postprocessor as MyGrblMM.js.
Restart QCAD/CAM and opt for your custom postprocessor.

PS, you never got back on the PM about ‘CAM export computing time’.

Regards,
CVH