a new take on workspace units
This commit is contained in:
parent
7ad9559521
commit
7db47ca185
4 changed files with 101 additions and 60 deletions
|
|
@ -1281,8 +1281,8 @@
|
|||
|
||||
device: UC.newGroup(LANG.dv_gr_dev, $('device'), {group:"ddev", inline:true}),
|
||||
deviceName: UC.newInput(LANG.dv_name_s, {title:LANG.dv_name_l, size:"60%", text:true, action:updateDeviceName}),
|
||||
bedWidth: UC.newInput(LANG.dv_bedw_s, {title:LANG.dv_bedw_l, convert:UC.toFloat, size:6}),
|
||||
bedDepth: UC.newInput(LANG.dv_bedd_s, {title:LANG.dv_bedd_l, convert:UC.toFloat, size:6}),
|
||||
bedWidth: UC.newInput(LANG.dv_bedw_s, {title:LANG.dv_bedw_l, convert:UC.toFloat, size:6, units:true}),
|
||||
bedDepth: UC.newInput(LANG.dv_bedd_s, {title:LANG.dv_bedd_l, convert:UC.toFloat, size:6, units:true}),
|
||||
maxHeight: UC.newInput(LANG.dv_bedh_s, {title:LANG.dv_bedh_l, convert:UC.toFloat, size:6, modes:FDM_SLA}),
|
||||
spindleMax: UC.newInput(LANG.dv_spmx_s, {title:LANG.dv_spmx_l, convert:UC.toInt, size: 6, modes:CAM}),
|
||||
deviceOrigin: UC.newBoolean(LANG.dv_orgc_s, onBooleanClick, {title:LANG.dv_orgc_l, modes:GCODE}),
|
||||
|
|
@ -1398,20 +1398,20 @@
|
|||
camRough: UC.newGroup(LANG.cr_menu, null, {modes:CAM, marker:true}),
|
||||
camRoughTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||
camRoughSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM, visible:spindleShow}),
|
||||
camRoughOver: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.1,1.0), modes:CAM}),
|
||||
camRoughDown: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, modes:CAM}),
|
||||
camRoughSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM}),
|
||||
camRoughPlunge: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toInt, modes:CAM}),
|
||||
camRoughStock: UC.newInput(LANG.cr_lsto_s, {title:LANG.cr_lsto_l, convert:UC.toFloat, modes:CAM}),
|
||||
camRoughOver: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.1,1.0), modes:CAM, units:true}),
|
||||
camRoughDown: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
camRoughSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM, units:true}),
|
||||
camRoughPlunge: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toInt, modes:CAM, units:true}),
|
||||
camRoughStock: UC.newInput(LANG.cr_lsto_s, {title:LANG.cr_lsto_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
camRoughVoid: UC.newBoolean(LANG.cr_clrp_s, onBooleanClick, {title:LANG.cr_clrp_l, modes:CAM}),
|
||||
camRoughSep: UC.newBlank({class:"pop-sep"}),
|
||||
camRoughOn: UC.newBoolean(LANG.enable, onBooleanClick, {modes:CAM}),
|
||||
camOutline: UC.newGroup(LANG.co_menu, null, {modes:CAM, marker:true}),
|
||||
camOutlineTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||
camOutlineSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM, visible:spindleShow}),
|
||||
camOutlineDown: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, modes:CAM}),
|
||||
camOutlineSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM}),
|
||||
camOutlinePlunge: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toInt, modes:CAM}),
|
||||
camOutlineDown: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
camOutlineSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM, units:true}),
|
||||
camOutlinePlunge: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toInt, modes:CAM, units:true}),
|
||||
camOutlineWide: UC.newBoolean(LANG.co_wide_s, onBooleanClick, {title:LANG.co_wide_l, modes:CAM, show:() => { return !UI.camOutlineIn.checked }}),
|
||||
camOutlineIn: UC.newBoolean(LANG.co_olin_s, onBooleanClick, {title:LANG.co_olin_l, modes:CAM}),
|
||||
camOutlineSep: UC.newBlank({class:"pop-sep"}),
|
||||
|
|
@ -1419,8 +1419,8 @@
|
|||
camContour: UC.newGroup(LANG.cn_menu, null, {modes:CAM, marker:true}),
|
||||
camContourTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||
camContourSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM, visible:spindleShow}),
|
||||
camContourOver: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.05,1.0), modes:CAM}),
|
||||
camContourSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM}),
|
||||
camContourOver: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.05,1.0), modes:CAM, units:true}),
|
||||
camContourSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM, units:true}),
|
||||
camContourAngle: UC.newInput(LANG.cf_angl_s, {title:LANG.cf_angl_l, convert:UC.toFloat, bound:UC.bound(45,90), modes:CAM}),
|
||||
camContourCurves: UC.newBoolean(LANG.cf_curv_s, onBooleanClick, {title:LANG.cf_curv_l, modes:CAM}),
|
||||
camContourSep: UC.newBlank({class:"pop-sep"}),
|
||||
|
|
@ -1434,10 +1434,10 @@
|
|||
camDrill: UC.newGroup(LANG.cd_menu, null, {modes:CAM, marker:true}),
|
||||
camDrillTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||
camDrillSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM, visible:spindleShow}),
|
||||
camDrillDown: UC.newInput(LANG.cd_plpr_s, {title:LANG.cd_plpr_l, convert:UC.toFloat, modes:CAM}),
|
||||
camDrillDownSpeed: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toFloat, modes:CAM}),
|
||||
camDrillDown: UC.newInput(LANG.cd_plpr_s, {title:LANG.cd_plpr_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
camDrillDownSpeed: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
camDrillDwell: UC.newInput(LANG.cd_dwll_s, {title:LANG.cd_dwll_l, convert:UC.toFloat, modes:CAM}),
|
||||
camDrillLift: UC.newInput(LANG.cd_lift_s, {title:LANG.cd_lift_l, convert:UC.toFloat, modes:CAM}),
|
||||
camDrillLift: UC.newInput(LANG.cd_lift_s, {title:LANG.cd_lift_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
camDrillSep: UC.newBlank({class:"pop-sep"}),
|
||||
camDrillingOn: UC.newBoolean(LANG.enable, onBooleanClick, {modes:CAM}),
|
||||
camDrillSep: UC.newBlank({class:"pop-sep"}),
|
||||
|
|
@ -1445,26 +1445,26 @@
|
|||
camTabs: UC.newGroup(LANG.ct_menu, null, {modes:CAM, marker:true, show:() => { return UI.camOutlineOn.checked }}),
|
||||
camTabsAngle: UC.newInput(LANG.ct_angl_s, {title:LANG.ct_angl_l, convert:UC.toInt, bound:UC.bound(0,360), modes:CAM}),
|
||||
camTabsCount: UC.newInput(LANG.ct_numb_s, {title:LANG.ct_numb_l, convert:UC.toInt, bound:UC.bound(1,20), modes:CAM}),
|
||||
camTabsWidth: UC.newInput(LANG.ct_wdth_s, {title:LANG.ct_wdth_l, convert:UC.toFloat, bound:UC.bound(0.1,100), modes:CAM}),
|
||||
camTabsHeight: UC.newInput(LANG.ct_hght_s, {title:LANG.ct_hght_l, convert:UC.toFloat, bound:UC.bound(0.1,100), modes:CAM}),
|
||||
camTabsWidth: UC.newInput(LANG.ct_wdth_s, {title:LANG.ct_wdth_l, convert:UC.toFloat, bound:UC.bound(0.1,100), modes:CAM, units:true}),
|
||||
camTabsHeight: UC.newInput(LANG.ct_hght_s, {title:LANG.ct_hght_l, convert:UC.toFloat, bound:UC.bound(0.1,100), modes:CAM, units:true}),
|
||||
camTabSep: UC.newBlank({class:"pop-sep"}),
|
||||
camTabsOn: UC.newBoolean(LANG.enable, onBooleanClick, {title:LANG.ct_nabl_l, modes:CAM}),
|
||||
|
||||
camSep1: UC.newGroup(null, null, {modes:CAM, class:"set-sep"}),
|
||||
camStock: UC.newGroup(LANG.cs_menu, null, {modes:CAM}),
|
||||
camStockX: UC.newInput(LANG.cs_wdth_s, {title:LANG.cs_wdth_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}),
|
||||
camStockY: UC.newInput(LANG.cs_dpth_s, {title:LANG.cs_dpth_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}),
|
||||
camStockZ: UC.newInput(LANG.cs_hght_s, {title:LANG.cs_hght_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}),
|
||||
camStockX: UC.newInput(LANG.cs_wdth_s, {title:LANG.cs_wdth_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM, units:true}),
|
||||
camStockY: UC.newInput(LANG.cs_dpth_s, {title:LANG.cs_dpth_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM, units:true}),
|
||||
camStockZ: UC.newInput(LANG.cs_hght_s, {title:LANG.cs_hght_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM, units:true}),
|
||||
camStockOffset: UC.newBoolean(LANG.cs_offs_s, onBooleanClick, {title:LANG.cs_offs_l, modes:CAM}),
|
||||
|
||||
camCommon: UC.newGroup(LANG.cc_menu, null, {modes:CAM}),
|
||||
camZTopOffset: UC.newInput(LANG.ou_ztof_s, {title:LANG.ou_ztof_l, convert:UC.toFloat, modes:CAM}),
|
||||
camZBottom: UC.newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:UC.toFloat, modes:CAM, trigger: true}),
|
||||
camZClearance: UC.newInput(LANG.ou_zclr_s, {title:LANG.ou_zclr_l, convert:UC.toFloat, bound:UC.bound(0.01,100), modes:CAM}),
|
||||
camZThru: UC.newInput(LANG.ou_ztru_s, {title:LANG.ou_ztru_l, convert:UC.toFloat, bound:UC.bound(0.0,100), modes:CAM, show:() => { return UI.camZBottom.value == 0 }}),
|
||||
camFastFeedZ: UC.newInput(LANG.cc_rzpd_s, {title:LANG.cc_rzpd_l, convert:UC.toInt, modes:CAM}),
|
||||
camFastFeed: UC.newInput(LANG.cc_rapd_s, {title:LANG.cc_rapd_l, convert:UC.toInt, modes:CAM}),
|
||||
camTolerance: UC.newInput(LANG.ou_toll_s, {title:LANG.ou_toll_l, convert:UC.toFloat, bound:UC.bound(0.001,1.0), modes:CAM}),
|
||||
camZTopOffset: UC.newInput(LANG.ou_ztof_s, {title:LANG.ou_ztof_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
camZBottom: UC.newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:UC.toFloat, modes:CAM, units:true, trigger: true}),
|
||||
camZClearance: UC.newInput(LANG.ou_zclr_s, {title:LANG.ou_zclr_l, convert:UC.toFloat, bound:UC.bound(0.01,100), modes:CAM, units:true}),
|
||||
camZThru: UC.newInput(LANG.ou_ztru_s, {title:LANG.ou_ztru_l, convert:UC.toFloat, bound:UC.bound(0.0,100), modes:CAM, units:true, show:() => { return UI.camZBottom.value == 0 }}),
|
||||
camFastFeedZ: UC.newInput(LANG.cc_rzpd_s, {title:LANG.cc_rzpd_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
camFastFeed: UC.newInput(LANG.cc_rapd_s, {title:LANG.cc_rapd_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
camTolerance: UC.newInput(LANG.ou_toll_s, {title:LANG.ou_toll_l, convert:UC.toFloat, bound:UC.bound(0.001,1.0), modes:CAM, units:true}),
|
||||
|
||||
laserLayout: UC.newGroup(LANG.lo_menu, null, {modes:LASER, group:"lz-lo"}),
|
||||
outputTileSpacing: UC.newInput(LANG.ou_spac_s, {title:LANG.ou_spac_l, convert:UC.toInt, modes:LASER}),
|
||||
|
|
|
|||
|
|
@ -1432,7 +1432,11 @@
|
|||
if (UI.hasOwnProperty(key)) {
|
||||
let uie = UI[key], typ = uie ? uie.type : null;
|
||||
if (typ === 'text') {
|
||||
uie.value = val;
|
||||
if (uie.setv) {
|
||||
uie.setv(val);
|
||||
} else {
|
||||
uie.value = val;
|
||||
}
|
||||
} else if (typ === 'checkbox') {
|
||||
uie.checked = val;
|
||||
} else if (typ === 'select-one') {
|
||||
|
|
@ -1549,6 +1553,10 @@
|
|||
|
||||
function updateSettings() {
|
||||
updateSettingsFromFields(settings.controller);
|
||||
switch (settings.controller.units) {
|
||||
case 'mm': UC.setUnits(1); break;
|
||||
case 'in': UC.setUnits(25.4); break;
|
||||
}
|
||||
updateSettingsFromFields(settings.device);
|
||||
updateSettingsFromFields(settings.process);
|
||||
updateSettingsFromFields(settings.layers);
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
poppable = {},
|
||||
hasModes = [],
|
||||
isExpert = [],
|
||||
setters = [],
|
||||
letMode = null,
|
||||
letExpert = false,
|
||||
letHoverPop = true,
|
||||
|
|
@ -27,7 +28,8 @@
|
|||
state = {},
|
||||
prefix = "tab",
|
||||
NOMODE = "nomode",
|
||||
exitimer = undefined;
|
||||
exitimer = undefined,
|
||||
units = 1;
|
||||
|
||||
SELF.$ = (SELF.$ || function (id) { return DOC.getElementById(id) } );
|
||||
|
||||
|
|
@ -58,6 +60,8 @@
|
|||
newBlank: newBlank,
|
||||
newGroup: newGroup,
|
||||
setGroup: setGroup,
|
||||
setUnits: setUnits,
|
||||
addUnits: addUnits,
|
||||
hidePoppers: hidePoppers,
|
||||
confirm: confirm,
|
||||
prompt: prompt,
|
||||
|
|
@ -128,6 +132,11 @@
|
|||
|
||||
function refresh() {
|
||||
setMode(letMode, true);
|
||||
setters.forEach(input => {
|
||||
if (input.setv) {
|
||||
input.setv(input.real);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function setMode(mode, nohide) {
|
||||
|
|
@ -295,21 +304,6 @@
|
|||
});
|
||||
}
|
||||
|
||||
function toInt() {
|
||||
let nv = this.value !== '' ? parseInt(this.value) : null;
|
||||
if (isNaN(nv)) nv = 0;
|
||||
if (nv !== null && this.bound) nv = this.bound(nv);
|
||||
this.value = nv;
|
||||
return nv;
|
||||
}
|
||||
|
||||
function toFloat() {
|
||||
let nv = this.value !== '' ? parseFloat(this.value) : null;
|
||||
if (nv !== null && this.bound) nv = this.bound(nv);
|
||||
this.value = nv;
|
||||
return nv;
|
||||
}
|
||||
|
||||
function bound(low,high) {
|
||||
return function(v) {
|
||||
if (isNaN(v)) return low;
|
||||
|
|
@ -317,10 +311,38 @@
|
|||
};
|
||||
}
|
||||
|
||||
function toInt() {
|
||||
let nv = this.value !== '' ? parseInt(this.value) : null;
|
||||
if (isNaN(nv)) nv = 0;
|
||||
if (nv !== null && this.bound) nv = this.bound(nv);
|
||||
this.value = nv;
|
||||
if (this.setv) {
|
||||
return this.real = Math.round(nv * units);
|
||||
};
|
||||
return nv;
|
||||
}
|
||||
|
||||
function toFloat() {
|
||||
let nv = this.value !== '' ? parseFloat(this.value) : null;
|
||||
if (nv !== null && this.bound) nv = this.bound(nv);
|
||||
this.value = nv;
|
||||
if (this.setv) {
|
||||
return this.real = nv * units;
|
||||
};
|
||||
return nv;
|
||||
}
|
||||
|
||||
function raw() {
|
||||
return this.value !== '' ? this.value : null;
|
||||
}
|
||||
|
||||
function setUnits(v) {
|
||||
if (v !== units) {
|
||||
units = v;
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
|
||||
function newLabel(text) {
|
||||
let label = DOC.createElement('label');
|
||||
label.appendChild(DOC.createTextNode(text));
|
||||
|
|
@ -596,7 +618,6 @@
|
|||
});
|
||||
ip.addEventListener('keyup', function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
// action(event);
|
||||
ip.blur();
|
||||
}
|
||||
});
|
||||
|
|
@ -606,6 +627,9 @@
|
|||
refresh();
|
||||
}
|
||||
});
|
||||
if (opt.units) {
|
||||
addUnits(ip);
|
||||
}
|
||||
}
|
||||
if (!ip.convert) ip.convert = raw.bind(ip);
|
||||
ip.setVisible = row.setVisible;
|
||||
|
|
@ -613,6 +637,19 @@
|
|||
return ip;
|
||||
}
|
||||
|
||||
function addUnits(input) {
|
||||
setters.push(input);
|
||||
input.setv = function(value) {
|
||||
if (typeof(value) === 'number') {
|
||||
input.real = value;
|
||||
input.value = value / units;
|
||||
} else {
|
||||
input.value = value;
|
||||
}
|
||||
};
|
||||
return input;
|
||||
}
|
||||
|
||||
function newRange(label, options) {
|
||||
let row = newDiv(options),
|
||||
ip = DOC.createElement('input'),
|
||||
|
|
|
|||
|
|
@ -299,8 +299,7 @@
|
|||
let mesh = widget.mesh,
|
||||
proc = settings.process,
|
||||
outp = settings.process,
|
||||
units = settings.controller.units === 'in' ? 25.4 : 1,
|
||||
resolution = outp.camTolerance * units,
|
||||
resolution = outp.camTolerance,
|
||||
diameter = getToolDiameter(settings, proc.camContourTool),
|
||||
tool = getToolById(settings, proc.camContourTool),
|
||||
toolStep = diameter * proc.camContourOver,
|
||||
|
|
@ -311,7 +310,7 @@
|
|||
maxX = bounds.max.x,// + diameter,
|
||||
minY = bounds.min.y,// - diameter,
|
||||
maxY = bounds.max.y,// + diameter,
|
||||
zBottom = outp.camZBottom * units,
|
||||
zBottom = outp.camZBottom,
|
||||
boundsX = maxX - minX,
|
||||
boundsY = maxY - minY,
|
||||
maxangle = proc.camContourAngle,
|
||||
|
|
@ -697,7 +696,6 @@
|
|||
proc = conf.process,
|
||||
sliceAll = widget.slices = [],
|
||||
unitsName = settings.controller.units,
|
||||
units = unitsName === 'in' ? 25.4 : 1,
|
||||
roughToolDiam = getToolDiameter(conf, proc.camRoughTool),
|
||||
outlineToolDiam = getToolDiameter(conf, proc.camOutlineTool),
|
||||
contourToolDiam = getToolDiameter(conf, proc.camContourTool),
|
||||
|
|
@ -716,19 +714,19 @@
|
|||
procTrace = proc.camTraceOn,
|
||||
roughDown = procRough ? proc.camRoughDown : Infinity,
|
||||
outlineDown = procOutline ? proc.camOutlineDown : Infinity,
|
||||
sliceDepth = Math.max(0.1, Math.min(roughDown, outlineDown) / 3 * units),
|
||||
sliceDepth = Math.max(0.1, Math.min(roughDown, outlineDown) / 3),
|
||||
addTabsOutline = procOutlineOn && proc.camTabsOn,
|
||||
tabWidth = proc.camTabsWidth * units,
|
||||
tabHeight = proc.camTabsHeight * units,
|
||||
tabWidth = proc.camTabsWidth,
|
||||
tabHeight = proc.camTabsHeight,
|
||||
bounds = widget.getBoundingBox(),
|
||||
mesh = widget.mesh,
|
||||
zBottom = proc.camZBottom * units,
|
||||
zBottom = proc.camZBottom,
|
||||
zMin = Math.max(bounds.min.z, zBottom),
|
||||
zMax = bounds.max.z,
|
||||
zThru = zBottom === 0 ? (proc.camZThru || 0) * units : 0,
|
||||
ztOff = proc.camZTopOffset * units,
|
||||
camRoughStock = proc.camRoughStock * units,
|
||||
camRoughDown = proc.camRoughDown * units,
|
||||
zThru = zBottom === 0 ? (proc.camZThru || 0) : 0,
|
||||
ztOff = proc.camZTopOffset,
|
||||
camRoughStock = proc.camRoughStock,
|
||||
camRoughDown = proc.camRoughDown,
|
||||
minStepDown = Math.min(1, roughDown, outlineDown),
|
||||
maxToolDiam = 0,
|
||||
sliceIndex = 0,
|
||||
|
|
@ -1154,13 +1152,12 @@
|
|||
slices = widget.slices,
|
||||
bounds = widget.getCamBounds(settings),
|
||||
boundsz = bounds.max.z,
|
||||
units = settings.controller.units === 'in' ? 25.4 : 1,
|
||||
hasStock = process.camStockOffset || (process.camStockZ && process.camStockX && process.camStockY),
|
||||
startCenter = process.outputOriginCenter,
|
||||
alignTop = settings.controller.alignTop,
|
||||
zclear = (process.camZClearance || 1) * units,
|
||||
zclear = (process.camZClearance || 1),
|
||||
zmax_outer = hasStock ? stock.z + zclear : outerz + zclear,
|
||||
ztOff = process.camZTopOffset * units,
|
||||
ztOff = process.camZTopOffset,
|
||||
zadd = hasStock ? stock.z - boundsz : alignTop ? outerz - boundsz : 0,
|
||||
zmax = outerz + zclear,
|
||||
wmpos = widget.mesh.position,
|
||||
|
|
@ -1173,9 +1170,9 @@
|
|||
modes = CPRO,
|
||||
easeDown = process.camEaseDown,
|
||||
depthFirst = process.camDepthFirst,
|
||||
tolerance = process.camTolerance * units,
|
||||
drillDown = process.camDrillDown * units,
|
||||
drillLift = process.camDrillLift * units,
|
||||
tolerance = process.camTolerance,
|
||||
drillDown = process.camDrillDown,
|
||||
drillLift = process.camDrillLift,
|
||||
drillDwell = process.camDrillDwell,
|
||||
newOutput = widgetIndex === 0 ? [] : print.output,
|
||||
layerOut = [],
|
||||
|
|
@ -1224,8 +1221,8 @@
|
|||
}
|
||||
lastTool = toolID;
|
||||
}
|
||||
feedRate = feed * units;
|
||||
plungeRate = plunge * units;
|
||||
feedRate = feed;
|
||||
plungeRate = plunge;
|
||||
}
|
||||
|
||||
function emitDrills(polys) {
|
||||
|
|
@ -1694,9 +1691,8 @@
|
|||
bounds = widget.getCamBounds(settings),
|
||||
dev = settings.device,
|
||||
spro = settings.process,
|
||||
units = settings.controller.units === 'in' ? 25.4 : 1,
|
||||
maxZd = spro.camFastFeedZ * units,
|
||||
maxXYd = spro.camFastFeed * units,
|
||||
maxZd = spro.camFastFeedZ,
|
||||
maxXYd = spro.camFastFeed,
|
||||
decimals = BASE.config.gcode_decimals || 4,
|
||||
pos = { x:null, y:null, z:null, f:null, t:null },
|
||||
line,
|
||||
|
|
|
|||
Loading…
Reference in a new issue