Is it possible to turn off line numbering? This is not needed with LinuxCNC.
Thanks
JT
Line Numbers (Solved)
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.
Line Numbers (Solved)
Last edited by jthornton on Sat Oct 26, 2013 3:24 pm, edited 1 time in total.
Re: Line Numbers
I've managed to turn off line numbers for all the lines except the header and footer with:
I'll keep looking for the other one...
JT
Code: Select all
Lcnc_Mill.prototype.writeLine = function(custom, append) {
var line = "";
if (!isNull(custom)) {
line = this.getLineNumberCode();
line = this.append(line, custom);
CamExporter.prototype.writeLine.call(this, line);
return;
}
var gotModeChange = this.gotModeChange(this.g);
var gotXMove = this.gotXMove(this.x);
var gotYMove = this.gotYMove(this.y);
var gotZMove = this.gotZMove(this.z);
var gotFeedrateChange = this.gotFeedrateChange(this.f);
// nothing to do:
if (this.g!==GCode.Mode.CircularCW && this.g!==GCode.Mode.CircularCCW &&
!gotXMove && !gotYMove && !gotZMove && !gotFeedrateChange) {
return;
}
// line = this.getLineNumberCode();
switch (this.g) {
case GCode.Mode.Rapid:
if (gotModeChange) {
line = this.append(line, this.getRapidMoveCode());
}
break;
case GCode.Mode.Normal:
if (gotModeChange) {
line = this.append(line, this.getLinearMoveCode());
}
break;
case GCode.Mode.CircularCW:
line = this.append(line, this.getCircularCWMoveCode());
break;
case GCode.Mode.CircularCCW:
line = this.append(line, this.getCircularCCWMoveCode());
break;
}
JT
Re: Line Numbers
Ok, I got that figured out with this:
Thanks
JT
Code: Select all
Lcnc_Mill.prototype.writeLine = function(custom, append) {
var line = "";
if (!isNull(custom)) {
// line = this.getLineNumberCode();
line = this.append(line, custom);
CamExporter.prototype.writeLine.call(this, line);
return;
}
var gotModeChange = this.gotModeChange(this.g);
var gotXMove = this.gotXMove(this.x);
var gotYMove = this.gotYMove(this.y);
var gotZMove = this.gotZMove(this.z);
var gotFeedrateChange = this.gotFeedrateChange(this.f);
// nothing to do:
if (this.g!==GCode.Mode.CircularCW && this.g!==GCode.Mode.CircularCCW &&
!gotXMove && !gotYMove && !gotZMove && !gotFeedrateChange) {
return;
}
// line = this.getLineNumberCode();
switch (this.g) {
case GCode.Mode.Rapid:
if (gotModeChange) {
line = this.append(line, this.getRapidMoveCode());
}
break;
case GCode.Mode.Normal:
if (gotModeChange) {
line = this.append(line, this.getLinearMoveCode());
}
break;
case GCode.Mode.CircularCW:
line = this.append(line, this.getCircularCWMoveCode());
break;
case GCode.Mode.CircularCCW:
line = this.append(line, this.getCircularCCWMoveCode());
break;
}
if (gotXMove || this.g===GCode.Mode.CircularCW || this.g===GCode.Mode.CircularCCW) {
line = this.append(line, this.getXCode(this.x));
}
if (gotYMove || this.g===GCode.Mode.CircularCW || this.g===GCode.Mode.CircularCCW) {
line = this.append(line, this.getYCode(this.y));
}
if (gotZMove) {
line = this.append(line, this.getZCode(this.z));
}
if (gotFeedrateChange) {
line = this.append(line, this.getFCode(this.f));
}
if (this.g===GCode.Mode.CircularCW || this.g===GCode.Mode.CircularCCW) {
line = this.append(line, this.getICode(this.i));
line = this.append(line, this.getJCode(this.j));
}
if (!isNull(append)) {
line = this.append(line, append);
}
CamExporter.prototype.writeLine.call(this, line);
//this.lineNumber += 10;
this.xPrev = this.x;
this.yPrev = this.y;
this.zPrev = this.z;
this.fPrev = this.f;
this.gPrev = this.g;
};
JT
Re: Line Numbers (Solved)
OK, great. Just for future reference: the preferred way to disable line numbers would be:
Lcnc_Mill.prototype.getLineNumberCode = function() { return ""; };
Re: Line Numbers (Solved)
Thanks
JT
JT
Re: Line Numbers (Solved)
Just undefine lineNumber in your constructor
this.lineNumber = undefined; // No line numbers
this.lineNumber = undefined; // No line numbers
My dream: to see QCAD integrated to FREECAD in place of SKETCHER