change default tool change methods for fdm
This commit is contained in:
parent
484d417058
commit
a7363732ac
43 changed files with 150 additions and 270 deletions
|
|
@ -139,8 +139,6 @@ function device_from_code(code,mode) {
|
|||
if (rec.filament) e.extFilament = rec.filament;
|
||||
if (rec.offset_x) e.extOffsetX = rec.offset_x;
|
||||
if (rec.offset_y) e.extOffsetY = rec.offset_y;
|
||||
if (rec.select) e.extSelect = rec.select;
|
||||
if (rec.deselect) e.extDeselect = rec.deselect;
|
||||
device.extruders.push(e);
|
||||
});
|
||||
} else {
|
||||
|
|
@ -248,6 +246,7 @@ const conf = exports({
|
|||
deviceZMax: 0,
|
||||
maxHeight: 150,
|
||||
gcodeTime: 1,
|
||||
gcodeChange: ["T{tool}"],
|
||||
gcodePre: [],
|
||||
gcodePost: [],
|
||||
gcodeProc: "",
|
||||
|
|
@ -259,8 +258,6 @@ const conf = exports({
|
|||
extruders:[{
|
||||
extFilament: 1.75,
|
||||
extNozzle: 0.4,
|
||||
extSelect: ["T0"],
|
||||
extDeselect: [],
|
||||
extOffsetX: 0,
|
||||
extOffsetY: 0
|
||||
}],
|
||||
|
|
@ -347,7 +344,6 @@ const conf = exports({
|
|||
outputAvoidGaps: true,
|
||||
outputAlternating: false,
|
||||
outputLayerRetract: false,
|
||||
outputNozzle: 0,
|
||||
outputLoops: 0,
|
||||
outputInvertX: false,
|
||||
outputInvertY: false,
|
||||
|
|
|
|||
|
|
@ -215,9 +215,7 @@ gapp.register("kiri.devices", (root, exports) => {
|
|||
ui.extAdd,
|
||||
ui.extDel,
|
||||
ui.extOffsetX,
|
||||
ui.extOffsetY,
|
||||
ui.extSelect,
|
||||
ui.extDeselect
|
||||
ui.extOffsetY
|
||||
].forEach(function(e) {
|
||||
e.disabled = !local;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -994,17 +994,14 @@ gapp.register("kiri.init", (root, exports) => {
|
|||
extNozzle: newInput(LANG.dv_nozl_s, {title:LANG.dv_nozl_l, convert:toFloat, modes:FDM}),
|
||||
extOffsetX: newInput(LANG.dv_exox_s, {title:LANG.dv_exox_l, convert:toFloat, modes:FDM}),
|
||||
extOffsetY: newInput(LANG.dv_exoy_s, {title:LANG.dv_exoy_l, convert:toFloat, modes:FDM}),
|
||||
_____: newDiv({ class: "f-col t-body t-inset", addto: $('dev-config'), set:true, modes:FDM_CAM }),
|
||||
_____: newGroup(LANG.dv_gr_too, null, {group:"dext", inline}),
|
||||
extSelect: newText(LANG.dv_exts_s, {title:LANG.dv_exts_l, size:14, height:3, area:gcode}),
|
||||
extDeselect: newText(LANG.dv_dext_s, {title:LANG.dv_dext_l, size:14, height:3, area:gcode}),
|
||||
extPad: newBlank({class:"grow", modes:FDM}),
|
||||
separator: newBlank({class:"pop-sep", modes:FDM, driven}),
|
||||
extActions: newRow([
|
||||
ui.extPrev = newButton(undefined, undefined, {icon:'<i class="fas fa-less-than"></i>'}),
|
||||
ui.extAdd = newButton(undefined, undefined, {icon:'<i class="fas fa-plus"></i>'}),
|
||||
ui.extDel = newButton(undefined, undefined, {icon:'<i class="fas fa-minus"></i>'}),
|
||||
ui.extNext = newButton(undefined, undefined, {icon:'<i class="fas fa-greater-than"></i>'})
|
||||
], {class:"dev-buttons ext-buttons", modes:FDM}),
|
||||
], {class:"dev-buttons ext-buttons var-row", modes:FDM}),
|
||||
_____: newDiv({ class: "f-col t-body t-inset", addto: $('dev-config'), set:true, modes:CAM_LZR }),
|
||||
_____: newGroup(LANG.dv_gr_out, null, {group:"dgco", inline}),
|
||||
gcodeStrip: newBoolean(LANG.dv_strc_s, onBooleanClick, {title:LANG.dv_strc_l, modes:CAM}),
|
||||
|
|
@ -1026,7 +1023,7 @@ gapp.register("kiri.init", (root, exports) => {
|
|||
(ui.gcodeWaterOff = newGCode(LANG.dv_waof_s, {title:LANG.dv_waof_l, modes:WJET, area:gcode})).button,
|
||||
(ui.gcodeKnifeDn = newGCode(LANG.dv_dkon_s, {title:LANG.dv_dkon_l, modes:DRAG, area:gcode})).button,
|
||||
(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:CAM, 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
|
||||
], {class:"ext-buttons f-row gcode-macros"}),
|
||||
|
|
@ -1172,9 +1169,8 @@ gapp.register("kiri.init", (root, exports) => {
|
|||
sliceLayerStart: newSelect(LANG.sl_strt_s, {title:LANG.sl_strt_l}, "start"),
|
||||
outputLayerRetract: newBoolean(LANG.ad_lret_s, onBooleanClick, {title:LANG.ad_lret_l}),
|
||||
outputAvoidGaps: newBoolean(LANG.ad_agap_s, onBooleanClick, {title:LANG.ad_agap_l}),
|
||||
separator: newBlank({ class:"set-sep", driven, show:isMultiHead }),
|
||||
outputBeltFirst: newBoolean(LANG.ad_lbir_s, onBooleanClick, {title:LANG.ad_lbir_l, show: isBelt}),
|
||||
outputNozzle: newSelect(LANG.sp_nozl_s, {title:LANG.sp_nozl_l, show:isMultiHead}, "extruders"),
|
||||
separator: newBlank({ class:"set-sep", driven, show:isBelt }),
|
||||
outputBeltFirst: newBoolean(LANG.ad_lbir_s, onBooleanClick, {title:LANG.ad_lbir_l, show:isBelt}),
|
||||
_____: newGroup(LANG.ad_menu, $('fdm-expert'), { modes:FDM, driven, hideable, separator, group:"fdm-xprt" }),
|
||||
sliceAngle: newInput(LANG.sl_angl_s, {title:LANG.sl_angl_l, convert:toFloat, show:isBelt}),
|
||||
outputRetractDwell: newInput(LANG.ad_rdwl_s, {title:LANG.ad_rdwl_l, convert:toInt}),
|
||||
|
|
|
|||
|
|
@ -284,7 +284,8 @@ function updateExtruderFields(device) {
|
|||
const { LANG } = api.const;
|
||||
if (device.extruders && device.extruders[device.internal]) {
|
||||
updateFieldsFromSettings(device.extruders[device.internal]);
|
||||
ui.extruder.firstChild.innerText = `${LANG.dv_gr_ext} [${device.internal+1}/${device.extruders.length}]`;
|
||||
ui.extruder.innerHTML =
|
||||
`${LANG.dv_gr_ext}<label class='grow'></label>${device.internal+1} of ${device.extruders.length}`;
|
||||
ui.extPrev.disabled = device.internal === 0;
|
||||
ui.extPrev.onclick = function() {
|
||||
device.internal--;
|
||||
|
|
@ -303,8 +304,6 @@ function updateExtruderFields(device) {
|
|||
};
|
||||
ui.extAdd.onclick = function() {
|
||||
let copy = clone(device.extruders[device.internal]);
|
||||
copy.extSelect = [`T${device.extruders.length}`];
|
||||
copy.extDeselect = [];
|
||||
device.extruders.push(copy);
|
||||
device.internal = device.extruders.length - 1;
|
||||
updateExtruderFields(device);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class Slice {
|
|||
*/
|
||||
clone(deep) {
|
||||
const from = this, slice = newSlice(from.z, from.view);
|
||||
from.tops.forEach(function(top) {
|
||||
from.tops?.forEach(function(top) {
|
||||
slice.addTop(top.poly.clone(deep));
|
||||
});
|
||||
return slice;
|
||||
|
|
|
|||
|
|
@ -546,7 +546,6 @@ gapp.register("kiri.ui", [], (root, exports) => {
|
|||
rows.forEach(row => {
|
||||
cols = Math.max(cols, row.length);
|
||||
});
|
||||
txt.setAttribute("cols", Math.max(30, cols + 1));
|
||||
|
||||
let showing = pop === lastPop;
|
||||
if (lastBtn) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue