Cut Direction

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
jthornton
Full Member
Posts: 66
Joined: Fri Oct 25, 2013 1:31 pm

Cut Direction

Post by jthornton » Sat Oct 26, 2013 2:32 pm

When I select Forced Orientation: Clockwise or Counterclockwise it does not change the cut direction for my profile. Both G codes cut in the Clockwise direction as viewed from the Z axis.

Thanks
JT

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

Re: Cut Direction

Post by andrew » Sat Oct 26, 2013 5:10 pm

I cannot reproduce that problem here at the moment. Could you please attach or mail the DXF file?
Is the contour closed (i.e. each element connects to exactly one end point of another element)?

jthornton
Full Member
Posts: 66
Joined: Fri Oct 25, 2013 1:31 pm

Re: Cut Direction

Post by jthornton » Sun Oct 27, 2013 1:29 pm

It is just a square drawn with the rectangle tool.

JT
Attachments
test.dxf
(80.07 KiB) Downloaded 652 times

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

Re: Cut Direction

Post by andrew » Sun Oct 27, 2013 1:41 pm

Thanks. I still cannot reproduce though.
Could you attach your latest version of your machine configuration file?
Attachments
test_ccw.ngc
test.dxf converted with 'JThornton', counter-clockwise.
(108 Bytes) Downloaded 1256 times
test_cw.ngc
test.dxf converted with 'JThornton', clockwise.
(108 Bytes) Downloaded 639 times

jthornton
Full Member
Posts: 66
Joined: Fri Oct 25, 2013 1:31 pm

Re: Cut Direction

Post by jthornton » Sun Oct 27, 2013 1:48 pm

Here is what I have so far for a LinuxCNC mill.

Code: Select all

include("GCode.js");

// Machine Configuration for LinuxCNC Mill type machines in Inch

function Lcnc_Mill(documentInterface, newDocumentInterface) {
    GCode.call(this, documentInterface, newDocumentInterface);

    // set output unit:
    this.unit = RS.Inch;
}

Lcnc_Mill.prototype = new GCode();

// change file extension from nc to ngc
Lcnc_Mill.prototype.getFileExtensions = function() {
    // set output file extension:
    return ["ngc"];
};

// change default to inch
Lcnc_Mill.prototype.initGlobalOptionWidget = function(w) {
    switch (w.objectName) {
    case "ZSafety":
        w.addItems(["2", "1", "0.5"]);         // available options in combo box
        w.setEditText("0.5");                    // 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;
    }
};

// change default to inch
Lcnc_Mill.prototype.initLayerOptionWidget = function(w) {
    switch (w.objectName) {
    case "ZCutting":
        w.addItems(["default", "-0.125", "-0.250", "-0.375"]);
        w.currentText = "default";
        break;
    }
};

// change G00 to G0
Lcnc_Mill.prototype.getRapidMoveCode = function() {
    return "G0";
};

// change G01 to G1
Lcnc_Mill.prototype.getLinearMoveCode = function() {
    return "G1";
};

// change G02 to G2
Lcnc_Mill.prototype.getCircularCWMoveCode = function() {
    return "G2";
};

// change G03 to G3
Lcnc_Mill.prototype.getCircularCCWMoveCode = function() {
    return "G3";
};

// add preamble
GCode.prototype.writeHeader = function() {
    this.writeLine("G20 G17 G40 G49 G54 G64 P0.005 G80 G90 G94");
    this.writeRapidZMove(this.getSafetyZLevel());
    this.toolPosition = GCode.ToolPosition.Clear;
};

// change M30 to M2
Lcnc_Mill.prototype.writeFooter = function() {
    this.writeToolUp();
    this.writeRapidZMove(this.getSafetyZLevel());
    this.toolPosition = GCode.ToolPosition.Clear;
    this.writeLine("M2");
};

// turn off line numbers
Lcnc_Mill.prototype.getLineNumberCode = function() {
    return "";
};
Attachments
Lcnc_Mill.js.zip
(897 Bytes) Downloaded 743 times

jthornton
Full Member
Posts: 66
Joined: Fri Oct 25, 2013 1:31 pm

Re: Cut Direction

Post by jthornton » Sun Oct 27, 2013 2:09 pm

Here is a test circle with both outputs using G3 even though I selected CW for one the CCW for the second one. I also attached the log files for each one if that helps.

JT
Attachments
circle test CW.log
(23.52 KiB) Downloaded 645 times
circle test CCW.log
(23.52 KiB) Downloaded 677 times
circle test CW.ngc
(112 Bytes) Downloaded 721 times
circle test CCW.ngc
(112 Bytes) Downloaded 694 times
circle test.dxf
(79.68 KiB) Downloaded 657 times

jthornton
Full Member
Posts: 66
Joined: Fri Oct 25, 2013 1:31 pm

Re: Cut Direction

Post by jthornton » Sun Oct 27, 2013 2:32 pm

Is it possible my hack to remove the line numbers caused the direction not to work? Changing from my hack to your fix and now the direction is correct in a test with a square object. The circle still uses G3 for both CW and CCW.

JT

jthornton
Full Member
Posts: 66
Joined: Fri Oct 25, 2013 1:31 pm

Re: Cut Direction

Post by jthornton » Sun Oct 27, 2013 2:53 pm

I just tested a rectangle object with radius corners and the CW CCW works fine. Seems like a circle is the only one that does not work.

JT

Post Reply

Return to “QCAD/CAM”