move axis reset macro to device
This commit is contained in:
parent
b5a2402a9a
commit
cc8dbbc908
8 changed files with 21 additions and 11 deletions
|
|
@ -114,6 +114,7 @@ function device_from_code(code,mode) {
|
|||
gcodeProc: valueOf(code.proc, ''),
|
||||
gcodeDwell: valueOf(code.dwell, []),
|
||||
gcodeSpindle: valueOf(code.spindle || cmd.spindle, []),
|
||||
gcodeResetA: valueOf(code.reseta || cmd.reseta, []),
|
||||
gcodeChange: valueOf(code['tool-change'], []),
|
||||
gcodeFExt: valueOf(code['file-ext'], 'gcode'),
|
||||
gcodeSpace: valueOf(code['token-space'], true),
|
||||
|
|
@ -406,6 +407,7 @@ export const conf = {
|
|||
bedHeight: 2.5,
|
||||
maxHeight: 300,
|
||||
useLaser: false,
|
||||
useIndexed: false,
|
||||
originCenter: false,
|
||||
spindleMax: 0,
|
||||
gcodePre: [],
|
||||
|
|
@ -415,7 +417,8 @@ export const conf = {
|
|||
gcodeStrip: true,
|
||||
gcodeDwell: ["G4 P{time}"],
|
||||
gcodeChange: ["M6 T{tool}"],
|
||||
gcodeSpindle: ["M3 S{speed}"]
|
||||
gcodeSpindle: ["M3 S{speed}"],
|
||||
gcodeResetA: ["G92.4 A0 R0"]
|
||||
},
|
||||
// process defaults CAM:Process
|
||||
p:{
|
||||
|
|
@ -511,7 +514,6 @@ export const conf = {
|
|||
camLaserZMax: 0,
|
||||
camLaserZMin: 0,
|
||||
camLatheAngle: 1,
|
||||
camLatheAxisReset: ["G92.4 A0 R0"],
|
||||
camLatheLinear: true,
|
||||
camLatheOver: 0.1,
|
||||
camLatheSpeed: 500,
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ function setDeviceCode(code, devicename) {
|
|||
ui.deviceRound.checked = dev.bedRound;
|
||||
ui.deviceOrigin.checked = dev.ctOriginCenter || dev.originCenter || dev.bedRound;
|
||||
ui.fwRetract.checked = dev.fwRetract;
|
||||
ui.useIndexed.checked = dev.useIndexed;
|
||||
|
||||
// add extruder selection buttons
|
||||
if (dev.extruders) {
|
||||
|
|
@ -176,6 +177,7 @@ function setDeviceCode(code, devicename) {
|
|||
ui.bedWidth,
|
||||
ui.maxHeight,
|
||||
ui.useLaser,
|
||||
ui.useIndexed,
|
||||
ui.resolutionX,
|
||||
ui.resolutionY,
|
||||
ui.deviceOrigin,
|
||||
|
|
|
|||
|
|
@ -992,6 +992,7 @@ function init_one() {
|
|||
gcodeSpace: newBoolean(LANG.dv_tksp_s, onBooleanClick, {title:LANG.dv_tksp_l, modes:CAM_LZR}),
|
||||
laserMaxPower: newInput(LANG.ou_maxp_s, {title:LANG.ou_maxp_l, modes:LASER, size:7, text:true}),
|
||||
useLaser: newBoolean(LANG.dv_lazr_s, onBooleanClick, {title:LANG.dv_lazr_l, modes:CAM}),
|
||||
useIndexed: newBoolean(LANG.dv_4tha_s, onBooleanClick, {title:LANG.dv_4tha_l, modes:CAM}),
|
||||
gcodeFExt: newInput(LANG.dv_fext_s, {title:LANG.dv_fext_l, modes:CAM_LZR, size:7, text:true}),
|
||||
gcodeEd: newGroup(LANG.dv_gr_gco, $('dg'), {group:"dgcp", inline, modes:GCODE}),
|
||||
gcodeMacros: newRow([
|
||||
|
|
@ -1009,7 +1010,8 @@ function init_one() {
|
|||
(ui.gcodeKnifeUp = newGCode(LANG.dv_dkof_s, {title:LANG.dv_dkof_l, modes:DRAG, area:gcode})).button,
|
||||
(ui.gcodeChange = newGCode(LANG.dv_tool_s, {title:LANG.dv_tool_l, modes:FDM_CAM, area:gcode})).button,
|
||||
(ui.gcodeDwell = newGCode(LANG.dv_dwll_s, {title:LANG.dv_dwll_l, modes:CAM, area:gcode})).button,
|
||||
(ui.gcodeSpindle = newGCode(LANG.dv_sspd_s, {title:LANG.dv_sspd_l, modes:CAM, area:gcode, show:() => ui.spindleMax.value > 0})).button
|
||||
(ui.gcodeSpindle = newGCode(LANG.dv_sspd_s, {title:LANG.dv_sspd_l, modes:CAM, area:gcode, show:() => ui.spindleMax.value > 0})).button,
|
||||
(ui.gcodeResetA = newGCode(LANG.dv_resa_s, {title:LANG.dv_resa_l, modes:CAM, area:gcode, show:() => ui.useIndexed.checked})).button
|
||||
], {class:"ext-buttons f-row gcode-macros"}),
|
||||
|
||||
/** Preferences Menu */
|
||||
|
|
|
|||
|
|
@ -30,10 +30,12 @@
|
|||
"gcodeFExt": "nc",
|
||||
"gcodeSpace": true,
|
||||
"gcodeStrip": false,
|
||||
"gcodeResetA": ["G92.4 A0 R0"],
|
||||
"new": false,
|
||||
"deviceName": "My Makera Carvera",
|
||||
"maxHeight": 150,
|
||||
"useLaser": true,
|
||||
"useIndexed": true,
|
||||
"imageURL": "",
|
||||
"bedBelt": false,
|
||||
"bedRound": false,
|
||||
|
|
@ -176,4 +178,4 @@
|
|||
"X": "X"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -350,7 +350,6 @@ export function createPopOps() {
|
|||
linear: 'camLatheLinear',
|
||||
offStart: 'camLatheOffStart',
|
||||
offEnd: 'camLatheOffEnd',
|
||||
axisreset: 'camLatheAxisReset'
|
||||
}).inputs = {
|
||||
tool: UC.newSelect(LANG.cc_tool, {}, "tools"),
|
||||
sep: UC.newBlank({ class: "pop-sep" }),
|
||||
|
|
@ -367,7 +366,6 @@ export function createPopOps() {
|
|||
leave: UC.newInput(LANG.cf_leav_s, { title: LANG.cf_leav_l, convert: toFloat, bound: UC.bound(0, 100) }),
|
||||
sep: UC.newBlank({ class: "pop-sep" }),
|
||||
linear: UC.newBoolean(LANG.ci_line_s, undefined, { title: LANG.ci_line_l }),
|
||||
axisreset: UC.newRow([ UC.newButton("axis reset", gcodeEditor('Rotary (A) Axis Reset Macro', 'axisreset')) ], { class: "ext-buttons f-row" })
|
||||
};
|
||||
|
||||
function canDogBones() {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ const ptyp = clib.PolyType;
|
|||
const cfil = clib.PolyFillType;
|
||||
const ts_off = 0.01;
|
||||
|
||||
// todo: review tool_shadow. offset both directions for travel inside and outside / between?
|
||||
|
||||
class OpArea extends CamOp {
|
||||
constructor(state, op) {
|
||||
super(state, op);
|
||||
|
|
|
|||
|
|
@ -53,11 +53,9 @@ class OpLathe extends CamOp {
|
|||
}
|
||||
|
||||
prepare(ops, progress) {
|
||||
let { op, slices, topo } = this;
|
||||
let { axisreset } = op;
|
||||
let { slices, state, topo } = this;
|
||||
let { camOut, newLayer, setContouring, setNextIsMove, zSafe } = ops;
|
||||
|
||||
let rez = topo.resolution;
|
||||
let { gcodeResetA } = state.settings.device;
|
||||
|
||||
// start top center, X = 0, Y = 0 closest to 4th axis chuck
|
||||
camOut(newPoint(0, 0, zSafe).setA(0), 0);
|
||||
|
|
@ -81,7 +79,7 @@ class OpLathe extends CamOp {
|
|||
|
||||
// move to safe height and reset A axis
|
||||
newLayer();
|
||||
ops.addGCode([`G0 Z${zSafe.round(2)}`, axisreset.join('\n') ?? "G92.4 A0 R0"]);
|
||||
ops.addGCode([`G0 Z${zSafe.round(2)}`, gcodeResetA.join('\n') ?? "G92.4 A0 R0"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -162,6 +162,8 @@ self.lang['en-us'] = {
|
|||
dv_fext_l: "file name extension",
|
||||
dv_lazr_s: "enable laser",
|
||||
dv_lazr_l: ["enable laser operations"],
|
||||
dv_4tha_s: "enable 4th axis",
|
||||
dv_4tha_l: ["enable 4th axis operations","aka indexed mode"],
|
||||
|
||||
dv_dwll_s: "dwell",
|
||||
dv_dwll_l: "gcode dwell script",
|
||||
|
|
@ -169,6 +171,8 @@ self.lang['en-us'] = {
|
|||
dv_tool_l: "tool change script",
|
||||
dv_sspd_s: "spindle",
|
||||
dv_sspd_l: "set spindle speed",
|
||||
dv_resa_s: "reset a",
|
||||
dv_resa_l: "reset a axis",
|
||||
dv_paus_s: "pause",
|
||||
dv_paus_l: "gcode pause script",
|
||||
dv_head_s: "header",
|
||||
|
|
|
|||
Loading…
Reference in a new issue