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
Docs for CAM?
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.
Always indicate your operating system and QCAD version.
Indicate the post processor used.
Attach drawing files and screenshots.
Post one question per topic.
Re: Docs for CAM?
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
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
Re: Docs for CAM?
This is not recommended (see your other post).
You can use the mill tool for the laser (QCAD/CAM doesn't really care about the tooltype):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.
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;
}
};
Have a look at LaserBase.js, LaserBase.prototype.postInitDialog to hide certain elements.mechatronic wrote: ↑Wed Nov 15, 2023 10:14 am- CAM Profile Toolpath: suppress Safe Z, Start Depth, Cut Depth and Plunge Rate.
The widget names of the profile toolpath dialog are: And for the CAM config dialog:
-
- Junior Member
- Posts: 22
- Joined: Wed Nov 08, 2023 11:24 am
Re: Docs for CAM?
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
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