Cam Export
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.
Cam Export
When I press the Cam Export button I see "Command: camexport" on the command line but nothing happens. I looked at GCode.js and it has an include for CamExporter.js but that file is not found.
JT
JT
Re: Cam Export
Thanks for your report. This has been fixed in the latest release (3.4.2):
http://www.qcad.org/en/qcad-downloads-trial
http://www.qcad.org/en/qcad-downloads-trial
Re: Cam Export
Thank you very much for that rapid fix.
First thing I see when trying this is the units are wrong, camexport converts the drawing units (inch) to mm.
Next I don't see a way to specify the starting point when cutting an arc.
I have a lot of experience with CAD CAM and CNC machining and I'm willing to help this project as much as I can.
JT
First thing I see when trying this is the units are wrong, camexport converts the drawing units (inch) to mm.
Next I don't see a way to specify the starting point when cutting an arc.
I have a lot of experience with CAD CAM and CNC machining and I'm willing to help this project as much as I can.
JT
Re: Cam Export
CAM export is defined through machine configurations. Machine configurations are JavaScript files which are stored in scripts/Cam/CamConfigurationsjthornton wrote:First thing I see when trying this is the units are wrong, camexport converts the drawing units (inch) to mm.
You can choose which configuration to use in the CAM export dialog (top left).
The default configuration is "GCode" which indeed converts to millimeters. "GCodeInch" is based on "GCode" but generates output in inches.
In other words, the output unit does not depend on your drawing but is defined in the machine configuration file.
QCAD/CAM is at this point meant to fully automatically create GCode from drawings. This makes sense for example if you are LASER cutting 5000 tiny contours and specifying any kind of additional information for each contour is not feasible.jthornton wrote:Next I don't see a way to specify the starting point when cutting an arc.
For use cases with only one or two contours, it might make sense to define additional parameters (tool radius correction, cutting direction, starting point, etc). This is generally already possible with custom properties assigned to entities in QCAD which are then interpreted by a machine configuration, but this process will be refined in future versions.
Re: Cam Export
The files I have in scripts/Cam/CamConfigurations are:
ADT_HC4500.js
GCode.js
GCode.ui
GCodeLayer.ui
I don't have GCodeInch.js. Can I just copy GCode.js and make changes? I've all ready tried to copy GCode.js and rename it and it shows up but I don't get any output.
I've figured out how to start a new machine configuration file... now to figure out how to make it not convert to mm.
Thanks
JT
ADT_HC4500.js
GCode.js
GCode.ui
GCodeLayer.ui
I don't have GCodeInch.js. Can I just copy GCode.js and make changes? I've all ready tried to copy GCode.js and rename it and it shows up but I don't get any output.
I've figured out how to start a new machine configuration file... now to figure out how to make it not convert to mm.
Thanks
JT
Re: Cam Export
Please accept my apologies, I didn't realize that this was not included in the package. I've attached GCodeInch.js - simply save it to your directory scripts/Cam/CamConfigurations.
- Attachments
-
- GCodeInch.js
- (211 Bytes) Downloaded 804 times
Re: Cam Export
Thanks, but the global options are still in mm. I see GCodeInch.js includes GCode.js can I override the global options in GCodeInch.js?
A couple of notes, you need to be able to specify the file extension for example I use LinuxCNC and the extension is ngc. Can you override the getFileExtesions in the GCodeInch.js? What is the strategy for changing things for different machine configurations?
Thanks
JT
A couple of notes, you need to be able to specify the file extension for example I use LinuxCNC and the extension is ngc. Can you override the getFileExtesions in the GCodeInch.js? What is the strategy for changing things for different machine configurations?
Thanks
JT
Re: Cam Export
Please explain what you mean by 'global options' - is that something in the QCAD preferences, in the G-Code output file or in your machine configuration?jthornton wrote:Thanks, but the global options are still in mm.
The idea is to base your own configuration on an existing one by deriving your own class from an existing class in object oriented programming terms.jthornton wrote:I see GCodeInch.js includes GCode.js can I override the global options in GCodeInch.js?
I've attached an example configuration called 'JThornton' which is derived from 'GCode' and flips the output (invert Y axis) which I understand is necessary for your machine.
Yes, better even in your own configuration 'JThornton.js'. I've also added that setting to your configuration.jthornton wrote:A couple of notes, you need to be able to specify the file extension for example I use LinuxCNC and the extension is ngc. Can you override the getFileExtesions in the GCodeInch.js?
If you have multiple, similar machines, you might want to create a base configuration for all of them with common settings, and then derive from that for the other machines.jthornton wrote:What is the strategy for changing things for different machine configurations?
- Attachments
-
- JThornton.js
- (613 Bytes) Downloaded 852 times
Re: Cam Export
Thanks so much for the example file that helps me out a lot with the syntax, I'll study that for a while. I program in Python so I have to brush up on JS a bit.
What I mean by global options is in the GCode.js file and shows up on the GCode.ui when you pick cam export.
Thanks
JT
What I mean by global options is in the GCode.js file and shows up on the GCode.ui when you pick cam export.
Code: Select all
GCode.prototype.initGlobalOptionWidget = function(w) {
switch (w.objectName) {
case "ZSafety":
w.addItems(["200", "150", "100", "50"]);
w.setEditText("100");
break;
case "ZClear":
w.addItems(["1", "2", "3"]);
w.setEditText("2");
break;
case "ZCutting":
w.addItems(["-1", "-2", "-3"]);
w.setEditText("-2");
break;
}
};
JT
Re: Cam Export
I understand now, thanks.jthornton wrote:What I mean by global options is in the GCode.js file and shows up on the GCode.ui when you pick cam export.
To change those, you could overwrite the function initGlobalOptionWidget in your configuration, for example:
Code: Select all
JThornton.prototype.initGlobalOptionWidget = function(w) {
switch (w.objectName) {
case "ZSafety":
w.addItems(["2", "5", "10"]); // available options in combo box
w.setEditText("10"); // preselected default option
break;
case "ZClear":
w.addItems(["0.25", "0.5", "1"]);
w.setEditText("0.25");
break;
case "ZCutting":
w.addItems(["-0.125", "-0.25", "-0.5"]);
w.setEditText("-0.125");
break;
}
};
Re: Cam Export
Andrew,
Thanks so much for the example.
JT
Thanks so much for the example.
JT
Re: Cam Export
Jim: I've split the question you've added to this topic into a new topic at:
http://qcad.org/rsforum/viewtopic.php?f=74&t=2741
http://qcad.org/rsforum/viewtopic.php?f=74&t=2741