Code: Select all
// set up Layer Options for Plasma
Plasma.prototype.initLayerOptionWidget = function(w) {
switch (w.objectName) {
case "PierceHeight":
w.addItems(["0.125", "0.150", "0.175"]);
w.setEditText("0.125");
break;
case "PierceDelay":
w.addItems(["0.5", "1.0", "1.5"]);
w.setEditText("0.5");
break;
case "CutHeight":
w.addItems(["0.125", "0.150", "0.175"]);
w.setEditText("0.125");
break;
case "TorchNozzle":
w.addItems(["manual", "FC", "40a", "60a", "80a"]);
w.setEditText("FC");
break;
case "MaterialThickness":
w.addItems(["manual", "16ga", "14ga", "12ga", "11ga", "3/16", "1/4", "3/8"]);
w.setEditText("11ga");
break;
}
};
// get the nozzle type
Plasma.prototype.getTorchNozzle = function() {
//You can get the current layer as follows:
var entity = this.getEntity();
var layerId = entity.getLayerId();
var layer = this.document.queryLayer(layerId);
return layer.getCustomProperty("QCADCAM", "Cam/TorchNozzle", "manual");
};
// get the material thickness
Plasma.prototype.getMaterialThickness = function() {
//You can get the current layer as follows:
var entity = this.getEntity();
var layerId = entity.getLayerId();
var layer = this.document.queryLayer(layerId);
return layer.getCustomProperty("QCADCAM", "Cam/MaterialThickness", "manual");
};
Plasma.prototype.writeToolDown = function() {
this.g = GCode.Mode.Normal;
this.z = this.getToolDownLevel();
this.torchNozzle = this.getTorchNozzle();
this.materialThickness = this.getMaterialThickness();
switch (this.torchNozzle)
{
case "manual":
qDebug("Manual");
break;
case "FC":
qDebug("Fine cut");
break;
case "40a":
qDebug("40 amp");
break;
case "60a":
qDebug("60 amp");
break;
case "80a":
qDebug("80 amp");
break;
default:
qDebug("No Match");
}
qDebug("torch " + this.torchNozzle);
qDebug("thickness " + this.materialThickness);
this.toolPosition = GCode.ToolPosition.Down;
this.writeLine();
this.toolIsDown();
};
JT