Good morning
I'm not sure where to post this request. Attached is a screen shot of the toolpath dialog. Under Tool:. Would it be possible to add the description . Currently it only shows tool number and diameter. I use tools with the same diameter with different function. I do have the cam tools dialog open to view on a second screen but it would be more convenient to see it in the toolpath menus.
Request
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.
-
- Premier Member
- Posts: 4879
- Joined: Wed Sep 27, 2017 4:17 pm
Re: Request
Yes it would be and it can be done in your custom postprocessor.
You will need some knowledge of Qt and JS scripting.
The basic layout of the CamProfileToolpathDialog can be found on the forum.
https://www.qcad.org/rsforum/viewtopic. ... 659#p33659
For example: LinuxCNCEvanCNC2.prototype.initDialog adds a G-Code group to the CamProfileToolpathDialog widget.
Then the next question is then how and where to synchronize that with what.
Instead of looking at the cam tools dialog ...
The tool description is included in the Edit CAM tool dialog.
This is displayed when hitting the pencil button besides the tool field.
Cancel will simply close that.
Regards,
CVH
-
- Active Member
- Posts: 37
- Joined: Sat Oct 09, 2021 9:54 pm
Re: Request
Thanks, I will have a look at the scripting. That's above my paygrade but I know someone who may be able to help.
-
- Active Member
- Posts: 37
- Joined: Sat Oct 09, 2021 9:54 pm
Re: Request
Hi CVH
I just looked at the link. Very interesting. I tried searching for suggestions on my question topic but had no luck. I need to improve my search skills!
I just looked at the link. Very interesting. I tried searching for suggestions on my question topic but had no luck. I need to improve my search skills!
-
- Junior Member
- Posts: 15
- Joined: Mon Dec 30, 2024 10:25 am
Re: Request
Hi,
I had the same thoughts and it seems that I found a way to change the shown values on the combo box.
Add the following lines to your postprocessor file and adapt it according to your needs.
It shows the following in the combo box: <tool name> [<tool diameter>, <tool type>, <tool description>].
If tool type cannot be determined or if tool description is empty, these values are left out.
Below I attached a screenshot how it looks like for me (in german language).
The two lines commented out at the bottom are for the tool tip. For me, this is no longer necessary since all information is shown in the combo box itself.
Further, I changed the default behaviour of the description text field in the "CAM Edit Tool" dialog. Normally, this field is automatically generated each time you change the tool name or the diameter and contains "<toolname> <diameter of tool>". I want to use my own (useful) descriptions.
This can be achieved by overwrite the following function in your postprocessor file:
Perhaps this helps.
Regards,
Deejay
I had the same thoughts and it seems that I found a way to change the shown values on the combo box.
Add the following lines to your postprocessor file and adapt it according to your needs.
It shows the following in the combo box: <tool name> [<tool diameter>, <tool type>, <tool description>].
If tool type cannot be determined or if tool description is empty, these values are left out.
Below I attached a screenshot how it looks like for me (in german language).
Code: Select all
<Name of your Postprocessor>.prototype.initToolComboItem = function(toolCombo, toolName, toolBlock) {
var toolDiameter = toolBlock.getCustomProperty("QCAD", "CamDiameter", undefined);
var toolDescription = toolBlock.getCustomProperty("QCAD", "CamDescription", undefined);
var toolType = toolBlock.getCustomProperty("QCAD", "CamToolType");
var itemText = toolName + " [\u00F8" + toolDiameter;
if (!isNull(toolType) && !isNaN(toolType))
{
switch (parseInt(toolType))
{
case Cam.ToolType.Mill:
toolType = "mill";
break;
case Cam.ToolType.Drill:
toolType = "drill";
break;
}
itemText += ", " + toolType;
}
if (!isNull(toolDescription))
itemText += ", " + toolDescription;
itemText += "]";
toolCombo.addItem(itemText, toolName);
//if (!isNull(toolDescription))
// toolCombo.setItemData(toolCombo.count-1, toolDescription, Qt.ToolTipRole);
};
Further, I changed the default behaviour of the description text field in the "CAM Edit Tool" dialog. Normally, this field is automatically generated each time you change the tool name or the diameter and contains "<toolname> <diameter of tool>". I want to use my own (useful) descriptions.
This can be achieved by overwrite the following function in your postprocessor file:
Code: Select all
<Name of your Postprocessor>.prototype.getToolTypeTitleTemplate = function(toolType) {
return null;
}
Regards,
Deejay
- Attachments
-
- camtoolpathdialog.png (8.67 KiB) Viewed 49917 times