Docs for CAM?

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
mechatronic
Junior Member
Posts: 22
Joined: Wed Nov 08, 2023 11:24 am

Docs for CAM?

Post by mechatronic » Wed Nov 15, 2023 10:14 am

Hi,

I'm trying to build a post-processor that properly fits the machine (a laser cutter), but it means changing some of the UI, which I'm struggling with as can't find any CAM documentation (including CamExportV2).

Some of the things I need to do (not globally, just when the post-processor is in use):

- add two options to CAM menu and toolbar widget
- CAM Tools: add a new tool type, suppress Mill & Drill, and ideally change the displayed variable names (diameter, spindle speed) and suppress plunge rate when its selected.
- CAM Profile Toolpath: suppress Safe Z, Start Depth, Cut Depth and Plunge Rate.

Not sure if possible, but would like to add some additional options for profile tool paths, not needed now, but if there's a way to do this would be good.

I've figured out how to modify the CAM Configuration dialogue, and able to get/set the variables, but I'm in the dark with names and methods etc for the other stuff.

Thanks

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

Re: Docs for CAM?

Post by CVH » Wed Nov 15, 2023 11:48 am

Hi,

The problem you are facing is that QCAD/CAM is proprietary code and further not or not well documented.
Compared to the QCAD CE part what is open source and is well documented:
https://github.com/qcad/qcad
https://qcad.org/doc/qcad/3.0/developer/annotated.html

There is some information scattered around in the CAM forum but you need to search for it.
https://www.qcad.org/rsforum/viewtopic. ... 89&#p33659
And a similar source for the CamDrillToolpathDialog.ui widget names: https://www.qcad.org/rsforum/viewtopic. ... 032#p39032

More extensive change of the CAM Configuration dialog:
https://www.qcad.org/rsforum/viewtopic.php?f=74&t=2646
But the given info is usually all bits and bites.
Probably you need to make a comprehensive overview yourself.

Adding things to the CAM menu and toolbar is fairly covered by CE tool implementations as on GitHub.
In the init section of your add-on:
action.setGroupSortOrder(*); in the 20k order
action.setWidgetNames(*); where * is an array with for example "CamMenu", "CamToolBar" and/or "CamToolsPanel"

Regards,
CVH

User avatar
andrew
Site Admin
Posts: 9063
Joined: Fri Mar 30, 2007 6:07 am

Re: Docs for CAM?

Post by andrew » Wed Nov 15, 2023 2:36 pm

mechatronic wrote:
Wed Nov 15, 2023 10:14 am
- add two options to CAM menu and toolbar widget
This is not recommended (see your other post).
mechatronic wrote:
Wed Nov 15, 2023 10:14 am
- CAM Tools: add a new tool type, suppress Mill & Drill, and ideally change the displayed variable names (diameter, spindle speed) and suppress plunge rate when its selected.
You can use the mill tool for the laser (QCAD/CAM doesn't really care about the tooltype):

Code: Select all

MyPostProcessor.prototype.getToolTypeTitle = function(toolType) {
    if (isString(toolType)) {
        toolType = parseInt(toolType);
    }

    switch (toolType) {
    case Cam.ToolType.Mill:
        return qsTr("Laser");
    default:
        return undefined;
    }
};
mechatronic wrote:
Wed Nov 15, 2023 10:14 am
- CAM Profile Toolpath: suppress Safe Z, Start Depth, Cut Depth and Plunge Rate.
Have a look at LaserBase.js, LaserBase.prototype.postInitDialog to hide certain elements.

The widget names of the profile toolpath dialog are:
CamProfileToolpathDialog.png
CamProfileToolpathDialog.png (305.83 KiB) Viewed 4269 times
And for the CAM config dialog:
CamConfigDialog.png
CamConfigDialog.png (268.84 KiB) Viewed 4269 times

mechatronic
Junior Member
Posts: 22
Joined: Wed Nov 08, 2023 11:24 am

Re: Docs for CAM?

Post by mechatronic » Wed Nov 15, 2023 4:25 pm

Perfect, thanks for the diagrams!!

In regards to the workflow, it just feels better to have a button to upload, and one for opening in an external editor, rather than every time the write button is used, showing up a dialogue box.

I've made substantial progress today with other things I'm fixing in the post-processor, so will see how I fair with this additional info now.

Thanks

Post Reply

Return to “QCAD/CAM”