fix export weight bug. add units option in CAM mode (highly experimental for inches)
This commit is contained in:
parent
6dbff53922
commit
af66c2e8e9
3 changed files with 86 additions and 65 deletions
|
|
@ -692,9 +692,11 @@ var gs_kiri_cam = exports;
|
||||||
proc = conf.process,
|
proc = conf.process,
|
||||||
outp = conf.process,
|
outp = conf.process,
|
||||||
sliceAll = widget.slices = [],
|
sliceAll = widget.slices = [],
|
||||||
roughToolDiam = getToolDiameter(conf, proc.roughingTool),
|
unitsName = settings.controller.units,
|
||||||
finishToolDiam = getToolDiameter(conf, proc.finishingTool),
|
units = unitsName === 'in' ? (1/25.4) : 1,
|
||||||
drillToolDiam = getToolDiameter(conf, proc.drillTool),
|
roughToolDiam = getToolDiameter(conf, proc.roughingTool) * units,
|
||||||
|
finishToolDiam = getToolDiameter(conf, proc.finishingTool) * units,
|
||||||
|
drillToolDiam = getToolDiameter(conf, proc.drillTool) * units,
|
||||||
procRough = proc.roughingOn && proc.roughingDown && roughToolDiam,
|
procRough = proc.roughingOn && proc.roughingDown && roughToolDiam,
|
||||||
procFinish = proc.finishingOn && proc.finishingDown && finishToolDiam,
|
procFinish = proc.finishingOn && proc.finishingDown && finishToolDiam,
|
||||||
procFinishX = proc.finishingXOn && proc.finishingPlunge && finishToolDiam,
|
procFinishX = proc.finishingXOn && proc.finishingPlunge && finishToolDiam,
|
||||||
|
|
@ -702,24 +704,24 @@ var gs_kiri_cam = exports;
|
||||||
anyFinish = procFinish || procFinishX || procFinishY,
|
anyFinish = procFinish || procFinishX || procFinishY,
|
||||||
procFacing = proc.roughingOn && proc.camZTopOffset,
|
procFacing = proc.roughingOn && proc.camZTopOffset,
|
||||||
procDrill = proc.drillingOn && proc.drillDown && proc.drillDownSpeed,
|
procDrill = proc.drillingOn && proc.drillDown && proc.drillDownSpeed,
|
||||||
sliceDepth = MAX(0.1, MIN(proc.roughingDown, proc.finishingDown) / 3),
|
sliceDepth = MAX(0.1, MIN(proc.roughingDown, proc.finishingDown) / 3) * units,
|
||||||
// pocketOnly = outp.camPocketOnly,
|
// pocketOnly = outp.camPocketOnly,
|
||||||
pocketOnlyRough = outp.camPocketOnlyRough,
|
pocketOnlyRough = outp.camPocketOnlyRough,
|
||||||
pocketOnlyFinish = outp.camPocketOnlyFinish,
|
pocketOnlyFinish = outp.camPocketOnlyFinish,
|
||||||
// addTabs = proc.camTabsOn && !pocketOnly,
|
// addTabs = proc.camTabsOn && !pocketOnly,
|
||||||
addTabsRough = procRough && proc.camTabsOn && !pocketOnlyRough,
|
addTabsRough = procRough && proc.camTabsOn && !pocketOnlyRough,
|
||||||
addTabsFinish = anyFinish && proc.camTabsOn && !pocketOnlyFinish,
|
addTabsFinish = anyFinish && proc.camTabsOn && !pocketOnlyFinish,
|
||||||
tabWidth = proc.camTabsWidth,
|
tabWidth = proc.camTabsWidth * units,
|
||||||
tabHeight = proc.camTabsHeight,
|
tabHeight = proc.camTabsHeight * units,
|
||||||
mesh = widget.mesh,
|
mesh = widget.mesh,
|
||||||
bounds = widget.getBoundingBox(),
|
bounds = widget.getBoundingBox(),
|
||||||
zMin = MAX(bounds.min.z, outp.camZBottom),
|
zMin = MAX(bounds.min.z, outp.camZBottom) * units,
|
||||||
shellRough,
|
shellRough,
|
||||||
shellFinish,
|
shellFinish,
|
||||||
facePolys;
|
facePolys;
|
||||||
|
|
||||||
if (sliceDepth <= 0.05) {
|
if (sliceDepth <= 0.05) {
|
||||||
return ondone("invalid slice depth");
|
return ondone(`invalid slice depth (${sliceDepth.toFixed(2)} ${unitsName})`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(procRough || anyFinish || procFacing || procDrill)) {
|
if (!(procRough || anyFinish || procFacing || procDrill)) {
|
||||||
|
|
@ -806,8 +808,8 @@ var gs_kiri_cam = exports;
|
||||||
// hollow area from top of stock to top of part
|
// hollow area from top of stock to top of part
|
||||||
if (procFacing) {
|
if (procFacing) {
|
||||||
var ztop = bounds.max.z,
|
var ztop = bounds.max.z,
|
||||||
zpos = ztop + outp.camZTopOffset,
|
zpos = ztop + (outp.camZTopOffset * units),
|
||||||
zstep = proc.roughingDown;
|
zstep = proc.roughingDown * units;
|
||||||
|
|
||||||
while (zpos >= ztop) {
|
while (zpos >= ztop) {
|
||||||
zpos = zpos - MIN(zstep, zpos - ztop);
|
zpos = zpos - MIN(zstep, zpos - ztop);
|
||||||
|
|
@ -826,13 +828,13 @@ var gs_kiri_cam = exports;
|
||||||
|
|
||||||
if (procRough) {
|
if (procRough) {
|
||||||
var selected = [];
|
var selected = [];
|
||||||
selectSlices(slices, proc.roughingDown, CPRO.ROUGH, selected);
|
selectSlices(slices, proc.roughingDown * units, CPRO.ROUGH, selected);
|
||||||
sliceAll.appendAll(selected);
|
sliceAll.appendAll(selected);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (anyFinish) {
|
if (anyFinish) {
|
||||||
var selected = [];
|
var selected = [];
|
||||||
selectSlices(slices, proc.finishingDown, CPRO.FINISH, selected);
|
selectSlices(slices, proc.finishingDown * units, CPRO.FINISH, selected);
|
||||||
sliceAll.appendAll(selected);
|
sliceAll.appendAll(selected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -845,7 +847,7 @@ var gs_kiri_cam = exports;
|
||||||
slices.forEach(function(slice) {
|
slices.forEach(function(slice) {
|
||||||
var inner = slice.gatherTopPolyInners([]);
|
var inner = slice.gatherTopPolyInners([]);
|
||||||
inner.forEach(function(poly) {
|
inner.forEach(function(poly) {
|
||||||
if (poly.circularity() >= 0.99 && Math.abs(poly.area() - area) <= areaDelta) {
|
if (poly.circularity() >= 0.985 && Math.abs(poly.area() - area) <= areaDelta) {
|
||||||
var center = poly.circleCenter(),
|
var center = poly.circleCenter(),
|
||||||
merged = false,
|
merged = false,
|
||||||
closest = Infinity,
|
closest = Infinity,
|
||||||
|
|
@ -893,10 +895,10 @@ var gs_kiri_cam = exports;
|
||||||
slice.index = index;
|
slice.index = index;
|
||||||
switch (slice.camMode) {
|
switch (slice.camMode) {
|
||||||
case CPRO.FACING:
|
case CPRO.FACING:
|
||||||
createFacingSlices(slice, facePolys, roughToolDiam, proc.roughingOver, pocketOnlyRough);
|
createFacingSlices(slice, facePolys, roughToolDiam, proc.roughingOver * units, pocketOnlyRough);
|
||||||
break;
|
break;
|
||||||
case CPRO.ROUGH:
|
case CPRO.ROUGH:
|
||||||
createRoughingSlices(slice, shellRough, roughToolDiam, proc.roughingStock, proc.roughingOver, pocketOnlyRough);
|
createRoughingSlices(slice, shellRough, roughToolDiam, proc.roughingStock * units, proc.roughingOver * units, pocketOnlyRough);
|
||||||
if (addTabsRough) addCutoutTabs(slice, roughToolDiam);
|
if (addTabsRough) addCutoutTabs(slice, roughToolDiam);
|
||||||
break;
|
break;
|
||||||
case CPRO.FINISH:
|
case CPRO.FINISH:
|
||||||
|
|
@ -942,9 +944,10 @@ var gs_kiri_cam = exports;
|
||||||
if (widgetIndex >= widgetCount || !widget) return;
|
if (widgetIndex >= widgetCount || !widget) return;
|
||||||
var slices = widget.slices,
|
var slices = widget.slices,
|
||||||
bounds = widget.getCamBounds(settings),
|
bounds = widget.getCamBounds(settings),
|
||||||
|
units = settings.controller.units === 'in' ? (1/25.4) : 1,
|
||||||
hasStock = process.camStockZ && process.camStockX && process.camStockY,
|
hasStock = process.camStockZ && process.camStockX && process.camStockY,
|
||||||
startCenter = process.outputOriginCenter,
|
startCenter = process.outputOriginCenter,
|
||||||
zclear = process.camZClearance || 1,
|
zclear = (process.camZClearance || 1) * units,
|
||||||
zadd = hasStock ? stock.z - bounds.max.z : 0,
|
zadd = hasStock ? stock.z - bounds.max.z : 0,
|
||||||
zmax = hasStock ? stock.z + zclear : bounds.max.z + zclear,
|
zmax = hasStock ? stock.z + zclear : bounds.max.z + zclear,
|
||||||
originx = startCenter ? 0 : hasStock ? -stock.x / 2 : bounds.min.x,
|
originx = startCenter ? 0 : hasStock ? -stock.x / 2 : bounds.min.x,
|
||||||
|
|
@ -954,9 +957,9 @@ var gs_kiri_cam = exports;
|
||||||
modes = CPRO,
|
modes = CPRO,
|
||||||
depthFirst = process.camDepthFirst,
|
depthFirst = process.camDepthFirst,
|
||||||
easeDown = process.camEaseDown,
|
easeDown = process.camEaseDown,
|
||||||
tolerance = process.camTolerance,
|
tolerance = process.camTolerance * units,
|
||||||
drillDown = process.drillDown,
|
drillDown = process.drillDown * units,
|
||||||
drillLift = process.drillLift,
|
drillLift = process.drillLift * units,
|
||||||
drillDwell = process.drillDwell,
|
drillDwell = process.drillDwell,
|
||||||
newOutput = widgetIndex === 0 ? [] : print.output,
|
newOutput = widgetIndex === 0 ? [] : print.output,
|
||||||
layerOut = [],
|
layerOut = [],
|
||||||
|
|
@ -1407,6 +1410,7 @@ var gs_kiri_cam = exports;
|
||||||
cmdSpindle = gcodes.gcodeSpindle || [ "M3 S{speed}" ],
|
cmdSpindle = gcodes.gcodeSpindle || [ "M3 S{speed}" ],
|
||||||
cmdDwell = gcodes.gcodeDwell || [ "G4 P{time}" ],
|
cmdDwell = gcodes.gcodeDwell || [ "G4 P{time}" ],
|
||||||
bounds = widget.getCamBounds(settings),
|
bounds = widget.getCamBounds(settings),
|
||||||
|
units = settings.controller.units === 'in' ? (1/25.4) : 1,
|
||||||
spro = settings.process,
|
spro = settings.process,
|
||||||
dev = settings.device,
|
dev = settings.device,
|
||||||
decimals = 4,
|
decimals = 4,
|
||||||
|
|
@ -1429,10 +1433,10 @@ var gs_kiri_cam = exports;
|
||||||
consts = {
|
consts = {
|
||||||
tool: 0,
|
tool: 0,
|
||||||
tool_name: "unknown",
|
tool_name: "unknown",
|
||||||
top: offset ? dev.bedDepth : dev.bedDepth/2,
|
top: (offset ? dev.bedDepth : dev.bedDepth/2) * units,
|
||||||
left: offset ? 0 : -dev.bedWidth/2,
|
left: (offset ? 0 : -dev.bedWidth/2) * units,
|
||||||
right: offset ? dev.bedWidth : dev.bedWidth/2,
|
right: (offset ? dev.bedWidth : dev.bedWidth/2) * units,
|
||||||
bottom: offset ? 0 : -dev.bedDepth/2,
|
bottom: (offset ? 0 : -dev.bedDepth/2) * units,
|
||||||
time_sec: 0,
|
time_sec: 0,
|
||||||
time_ms: 0,
|
time_ms: 0,
|
||||||
time: 0
|
time: 0
|
||||||
|
|
@ -1532,23 +1536,23 @@ var gs_kiri_cam = exports;
|
||||||
pos.x = newpos.x;
|
pos.x = newpos.x;
|
||||||
runbox.min.x = Math.min(runbox.min.x, pos.x);
|
runbox.min.x = Math.min(runbox.min.x, pos.x);
|
||||||
runbox.max.x = Math.max(runbox.max.x, pos.x);
|
runbox.max.x = Math.max(runbox.max.x, pos.x);
|
||||||
nl.append(space).append("X").append(add0(pos.x));
|
nl.append(space).append("X").append(add0(pos.x * units));
|
||||||
}
|
}
|
||||||
if (newpos.y !== pos.y) {
|
if (newpos.y !== pos.y) {
|
||||||
pos.y = newpos.y;
|
pos.y = newpos.y;
|
||||||
runbox.min.y = Math.min(runbox.min.y, pos.y);
|
runbox.min.y = Math.min(runbox.min.y, pos.y);
|
||||||
runbox.max.y = Math.max(runbox.max.y, pos.y);
|
runbox.max.y = Math.max(runbox.max.y, pos.y);
|
||||||
nl.append(space).append("Y").append(add0(pos.y));
|
nl.append(space).append("Y").append(add0(pos.y * units));
|
||||||
}
|
}
|
||||||
if (newpos.z !== pos.z) {
|
if (newpos.z !== pos.z) {
|
||||||
pos.z = newpos.z;
|
pos.z = newpos.z;
|
||||||
runbox.min.z = Math.min(runbox.min.z, pos.z);
|
runbox.min.z = Math.min(runbox.min.z, pos.z);
|
||||||
runbox.max.z = Math.max(runbox.max.z, pos.z);
|
runbox.max.z = Math.max(runbox.max.z, pos.z);
|
||||||
nl.append(space).append("Z").append(add0(pos.z));
|
nl.append(space).append("Z").append(add0(pos.z * units));
|
||||||
}
|
}
|
||||||
if (feed && feed !== pos.f) {
|
if (feed && feed !== pos.f) {
|
||||||
pos.f = feed;
|
pos.f = feed;
|
||||||
nl.append(space).append("F").append(feed);
|
nl.append(space).append("F").append(feed * units);
|
||||||
}
|
}
|
||||||
|
|
||||||
// update time calculation
|
// update time calculation
|
||||||
|
|
|
||||||
91
js/kiri.js
91
js/kiri.js
|
|
@ -218,6 +218,10 @@ self.kiri.license = exports.LICENSE;
|
||||||
{ name: "gyroid" },
|
{ name: "gyroid" },
|
||||||
{ name: "triangle" }
|
{ name: "triangle" }
|
||||||
],
|
],
|
||||||
|
units:[
|
||||||
|
{ name: "mm" },
|
||||||
|
{ name: "in" }
|
||||||
|
],
|
||||||
// CAM only
|
// CAM only
|
||||||
origin: {},
|
origin: {},
|
||||||
stock: {},
|
stock: {},
|
||||||
|
|
@ -478,7 +482,9 @@ self.kiri.license = exports.LICENSE;
|
||||||
reverseZoom: true,
|
reverseZoom: true,
|
||||||
showOrigin: false,
|
showOrigin: false,
|
||||||
freeLayout: true,
|
freeLayout: true,
|
||||||
autoLayout: true
|
autoLayout: true,
|
||||||
|
alignTop: false,
|
||||||
|
units: "mm"
|
||||||
},
|
},
|
||||||
mode: 'FDM',
|
mode: 'FDM',
|
||||||
id: genID(),
|
id: genID(),
|
||||||
|
|
@ -1370,10 +1376,11 @@ self.kiri.license = exports.LICENSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
function calcWeight() {
|
function calcWeight() {
|
||||||
|
try {
|
||||||
$('print-weight').value = (
|
$('print-weight').value = (
|
||||||
UTIL.round(
|
UTIL.round((Math.PI * UTIL.sqr(currentPrint.settings.device.filamentSize/2)) * currentPrint.distance * 1.25 / 1000, 2)
|
||||||
(Math.PI * UTIL.sqr(currentPrint.settings.device.filamentSize/2)) * currentPrint.distance * parseFloat($('weight').value || 1.25) / 1000, 2)
|
|
||||||
);
|
);
|
||||||
|
} catch (e) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
function calcTime() {
|
function calcTime() {
|
||||||
|
|
@ -1403,7 +1410,7 @@ self.kiri.license = exports.LICENSE;
|
||||||
$('grid-host').onkeyup = gridhost_probe;
|
$('grid-host').onkeyup = gridhost_probe;
|
||||||
$('grid-apik').onkeyup = gridhost_probe;
|
$('grid-apik').onkeyup = gridhost_probe;
|
||||||
calcTime();
|
calcTime();
|
||||||
calcWeight();
|
if (MODE === MODES.FDM) calcWeight();
|
||||||
octo_host = $('octo-host');
|
octo_host = $('octo-host');
|
||||||
octo_apik = $('octo-apik');
|
octo_apik = $('octo-apik');
|
||||||
if (MODE === MODES.CAM) {
|
if (MODE === MODES.CAM) {
|
||||||
|
|
@ -1846,6 +1853,7 @@ self.kiri.license = exports.LICENSE;
|
||||||
|
|
||||||
fillMissingSettings(settingsDefault, settings);
|
fillMissingSettings(settingsDefault, settings);
|
||||||
settings.infill = settingsDefault.infill;
|
settings.infill = settingsDefault.infill;
|
||||||
|
settings.units = settingsDefault.units;
|
||||||
|
|
||||||
for (key in scope) {
|
for (key in scope) {
|
||||||
if (!scope.hasOwnProperty(key)) continue;
|
if (!scope.hasOwnProperty(key)) continue;
|
||||||
|
|
@ -1923,7 +1931,7 @@ self.kiri.license = exports.LICENSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateWidgetsTopZ() {
|
function updateWidgetsTopZ() {
|
||||||
let camz = MODE === MODES.CAM && settings.stock.z;
|
let camz = MODE === MODES.CAM && (settings.stock.z || settings.controller.alignTop);
|
||||||
let ztop = camz ? camTopZ - settings.process.camZTopOffset : 0;
|
let ztop = camz ? camTopZ - settings.process.camZTopOffset : 0;
|
||||||
forAllWidgets(function(widget) {
|
forAllWidgets(function(widget) {
|
||||||
widget.setTopZ(ztop);
|
widget.setTopZ(ztop);
|
||||||
|
|
@ -1999,6 +2007,8 @@ self.kiri.license = exports.LICENSE;
|
||||||
camStock = null;
|
camStock = null;
|
||||||
camTopZ = topZ;
|
camTopZ = topZ;
|
||||||
updateWidgetsTopZ();
|
updateWidgetsTopZ();
|
||||||
|
} else if (settings.controller.alignTop) {
|
||||||
|
updateWidgetsTopZ();
|
||||||
}
|
}
|
||||||
updateOrigin();
|
updateOrigin();
|
||||||
}
|
}
|
||||||
|
|
@ -2007,12 +2017,14 @@ self.kiri.license = exports.LICENSE;
|
||||||
updateFieldsFromSettings(settings.device);
|
updateFieldsFromSettings(settings.device);
|
||||||
updateFieldsFromSettings(settings.process);
|
updateFieldsFromSettings(settings.process);
|
||||||
updateFieldsFromSettings(settings.layers);
|
updateFieldsFromSettings(settings.layers);
|
||||||
|
updateFieldsFromSettings(settings.controller);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateSettings() {
|
function updateSettings() {
|
||||||
updateSettingsFromFields(settings.device);
|
updateSettingsFromFields(settings.device);
|
||||||
updateSettingsFromFields(settings.process);
|
updateSettingsFromFields(settings.process);
|
||||||
updateSettingsFromFields(settings.layers, true);
|
updateSettingsFromFields(settings.layers);
|
||||||
|
updateSettingsFromFields(settings.controller);
|
||||||
saveSettings();
|
saveSettings();
|
||||||
updateCamStock();
|
updateCamStock();
|
||||||
}
|
}
|
||||||
|
|
@ -2202,12 +2214,12 @@ self.kiri.license = exports.LICENSE;
|
||||||
widgetDeselect();
|
widgetDeselect();
|
||||||
if (ondone) {
|
if (ondone) {
|
||||||
ondone();
|
ondone();
|
||||||
if ((newset || settings).mode != 'CAM') {
|
// if ((newset || settings).mode != 'CAM') {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
updateWidgetsTopZ();
|
updateWidgetsTopZ();
|
||||||
SPACE.update();
|
SPACE.update();
|
||||||
}, 1);
|
}, 1);
|
||||||
};
|
// };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, position);
|
}, position);
|
||||||
|
|
@ -2720,15 +2732,6 @@ self.kiri.license = exports.LICENSE;
|
||||||
UC.newButton("Export", exportPrint)
|
UC.newButton("Export", exportPrint)
|
||||||
]
|
]
|
||||||
]),
|
]),
|
||||||
workspace: UC.newGroup('platform'),
|
|
||||||
wsTable: UC.newTableRow([
|
|
||||||
[
|
|
||||||
UI.saveButton =
|
|
||||||
UC.newButton("Save", saveWorkspace),
|
|
||||||
],[
|
|
||||||
UC.newButton("Clear", clearWorkspace)
|
|
||||||
]
|
|
||||||
]),
|
|
||||||
camera: UC.newGroup('view'),
|
camera: UC.newGroup('view'),
|
||||||
camTable: UC.newTableRow([
|
camTable: UC.newTableRow([
|
||||||
[
|
[
|
||||||
|
|
@ -2743,11 +2746,23 @@ self.kiri.license = exports.LICENSE;
|
||||||
]
|
]
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
workspace: UC.newGroup('workspace'),
|
||||||
|
wsTable: UC.newTableRow([
|
||||||
|
[
|
||||||
|
UI.saveButton =
|
||||||
|
UC.newButton("Save", saveWorkspace),
|
||||||
|
],[
|
||||||
|
UC.newButton("Clear", clearWorkspace)
|
||||||
|
]
|
||||||
|
]),
|
||||||
|
|
||||||
layout: UC.newGroup('options'),
|
layout: UC.newGroup('options'),
|
||||||
showOrigin: UC.newBoolean("show origin", booleanSave, {title:"show device or process origin"}),
|
showOrigin: UC.newBoolean("show origin", booleanSave, {title:"show device or process origin"}),
|
||||||
|
alignTop: UC.newBoolean("align top", booleanSave, {title:"align parts to the\ntallest part when\nno stock is set", modes:[42]}),
|
||||||
autoLayout: UC.newBoolean("auto layout", booleanSave, {title:"automatically layout platform\nwhen new items added\nor when arrange clicked\nmore than once"}),
|
autoLayout: UC.newBoolean("auto layout", booleanSave, {title:"automatically layout platform\nwhen new items added\nor when arrange clicked\nmore than once"}),
|
||||||
freeLayout: UC.newBoolean("free layout", booleanSave, {title:"permit dragable layout"}),
|
freeLayout: UC.newBoolean("free layout", booleanSave, {title:"permit dragable layout"}),
|
||||||
reverseZoom: UC.newBoolean("invert zoom", booleanSave, {title:"invert mouse wheel\nscroll zoom"}),
|
reverseZoom: UC.newBoolean("invert zoom", booleanSave, {title:"invert mouse wheel\nscroll zoom"}),
|
||||||
|
units: UC.newSelectField("units", {modes:CAM}, "units"),
|
||||||
|
|
||||||
appendLeft: UC.checkpoint(),
|
appendLeft: UC.checkpoint(),
|
||||||
|
|
||||||
|
|
@ -2825,16 +2840,16 @@ self.kiri.license = exports.LICENSE;
|
||||||
laserSliceSingle: UC.newBoolean("single", onBooleanClick, {title:"perform one slice\nat specified height", modes:LASER}),
|
laserSliceSingle: UC.newBoolean("single", onBooleanClick, {title:"perform one slice\nat specified height", modes:LASER}),
|
||||||
|
|
||||||
camCommon: UC.newGroup("common", null, {modes:CAM}),
|
camCommon: UC.newGroup("common", null, {modes:CAM}),
|
||||||
camFastFeed: UC.newInput("rapid feed", {title:"rapid moves feedrate\nin millimeters / minute", convert:UC.toInt, modes:CAM}),
|
camFastFeed: UC.newInput("rapid feed", {title:"rapid moves feedrate\nin workspace units / minute", convert:UC.toInt, modes:CAM}),
|
||||||
|
|
||||||
roughing: UC.newGroup("roughing", null, {modes:CAM}),
|
roughing: UC.newGroup("roughing", null, {modes:CAM}),
|
||||||
roughingTool: UC.newSelectField("tool", {modes:CAM}),
|
roughingTool: UC.newSelectField("tool", {modes:CAM}),
|
||||||
roughingSpindle: UC.newInput("spindle rpm", {title:"spindle speed rpm", convert:UC.toInt, modes:CAM}),
|
roughingSpindle: UC.newInput("spindle rpm", {title:"spindle speed rpm", convert:UC.toInt, modes:CAM}),
|
||||||
roughingOver: UC.newInput("step over", {title:"0.1 - 1.0\npercentage of\ntool diameter", convert:UC.toFloat, bound:UC.bound(0.1,1.0), modes:CAM}),
|
roughingOver: UC.newInput("step over", {title:"0.1 - 1.0\npercentage of\ntool diameter", convert:UC.toFloat, bound:UC.bound(0.1,1.0), modes:CAM}),
|
||||||
roughingDown: UC.newInput("step down", {title:"step down depth\nfor each pass\nin millimeters\n0 to disable", convert:UC.toFloat, modes:CAM}),
|
roughingDown: UC.newInput("step down", {title:"step down depth\nfor each pass\nin workspace units\n0 to disable", convert:UC.toFloat, modes:CAM}),
|
||||||
roughingSpeed: UC.newInput("feed rate", {title:"max speed while cutting\nmillimeters / minute", convert:UC.toInt, modes:CAM}),
|
roughingSpeed: UC.newInput("feed rate", {title:"max speed while cutting\workspace units / minute", convert:UC.toInt, modes:CAM}),
|
||||||
roughingPlunge: UC.newInput("plunge rate", {title:"max speed on z axis\nmillimeters / minute", convert:UC.toInt, modes:CAM}),
|
roughingPlunge: UC.newInput("plunge rate", {title:"max speed on z axis\workspace units / minute", convert:UC.toInt, modes:CAM}),
|
||||||
roughingStock: UC.newInput("leave stock", {title:"horizontal offset from vertical faces\nstock to leave for finishing pass\nin millimeters", convert:UC.toFloat, modes:CAM}),
|
roughingStock: UC.newInput("leave stock", {title:"horizontal offset from vertical faces\nstock to leave for finishing pass\nin workspace units", convert:UC.toFloat, modes:CAM}),
|
||||||
camPocketOnlyRough: UC.newBoolean("pocket only", onBooleanClick, {title:"constrain to\npart boundaries", modes:CAM}),
|
camPocketOnlyRough: UC.newBoolean("pocket only", onBooleanClick, {title:"constrain to\npart boundaries", modes:CAM}),
|
||||||
camEaseDown: UC.newBoolean("ease down", onBooleanClick, {title:"plunge cuts will\nspiral down or ease\nalong a linear path\nas they cut downward", modes:CAM}),
|
camEaseDown: UC.newBoolean("ease down", onBooleanClick, {title:"plunge cuts will\nspiral down or ease\nalong a linear path\nas they cut downward", modes:CAM}),
|
||||||
roughingOn: UC.newBoolean("enable", onBooleanClick, {modes:CAM}),
|
roughingOn: UC.newBoolean("enable", onBooleanClick, {modes:CAM}),
|
||||||
|
|
@ -2843,10 +2858,10 @@ self.kiri.license = exports.LICENSE;
|
||||||
finishingTool: UC.newSelectField("tool", {modes:CAM}),
|
finishingTool: UC.newSelectField("tool", {modes:CAM}),
|
||||||
finishingSpindle: UC.newInput("spindle rpm", {title:"spindle speed rpm", convert:UC.toInt, modes:CAM}),
|
finishingSpindle: UC.newInput("spindle rpm", {title:"spindle speed rpm", convert:UC.toInt, modes:CAM}),
|
||||||
finishingOver: UC.newInput("step over", {title:"0.05 - 1.0\npercentage of\ntool diameter\nfor linear XY", convert:UC.toFloat, bound:UC.bound(0.05,1.0), modes:CAM}),
|
finishingOver: UC.newInput("step over", {title:"0.05 - 1.0\npercentage of\ntool diameter\nfor linear XY", convert:UC.toFloat, bound:UC.bound(0.05,1.0), modes:CAM}),
|
||||||
finishingDown: UC.newInput("step down", {title:"step down depth\nfor each pass\nin millimeters\n0 to disable", convert:UC.toFloat, modes:CAM}),
|
finishingDown: UC.newInput("step down", {title:"step down depth\nfor each pass\nin workspace units\n0 to disable", convert:UC.toFloat, modes:CAM}),
|
||||||
finishingAngle: UC.newInput("max angle", {title:"angles greater than this\nare considered vertical", convert:UC.toFloat, bound:UC.bound(45,90), modes:CAM}),
|
finishingAngle: UC.newInput("max angle", {title:"angles greater than this\nare considered vertical", convert:UC.toFloat, bound:UC.bound(45,90), modes:CAM}),
|
||||||
finishingSpeed: UC.newInput("feed rate", {title:"max speed while cutting\nmillimeters / minute", convert:UC.toInt, modes:CAM}),
|
finishingSpeed: UC.newInput("feed rate", {title:"max speed while cutting\workspace units / minute", convert:UC.toInt, modes:CAM}),
|
||||||
finishingPlunge: UC.newInput("plunge rate", {title:"max speed on z axis\nmillimeters / minute", convert:UC.toInt, modes:CAM}),
|
finishingPlunge: UC.newInput("plunge rate", {title:"max speed on z axis\workspace units / minute", convert:UC.toInt, modes:CAM}),
|
||||||
camPocketOnlyFinish: UC.newBoolean("pocket only", onBooleanClick, {title:"constrain to\npart boundaries", modes:CAM}),
|
camPocketOnlyFinish: UC.newBoolean("pocket only", onBooleanClick, {title:"constrain to\npart boundaries", modes:CAM}),
|
||||||
finishingOn: UC.newBoolean("waterline", onBooleanClick, {title:"contour finishing\ndisabled when pocketing", modes:CAM}),
|
finishingOn: UC.newBoolean("waterline", onBooleanClick, {title:"contour finishing\ndisabled when pocketing", modes:CAM}),
|
||||||
finishingXOn: UC.newBoolean("linear x", onBooleanClick, {title:"linear x-axis finishing", modes:CAM}),
|
finishingXOn: UC.newBoolean("linear x", onBooleanClick, {title:"linear x-axis finishing", modes:CAM}),
|
||||||
|
|
@ -2856,17 +2871,17 @@ self.kiri.license = exports.LICENSE;
|
||||||
drilling: UC.newGroup("drilling", null, {modes:CAM}),
|
drilling: UC.newGroup("drilling", null, {modes:CAM}),
|
||||||
drillTool: UC.newSelectField("tool", {modes:CAM}),
|
drillTool: UC.newSelectField("tool", {modes:CAM}),
|
||||||
drillSpindle: UC.newInput("spindle rpm", {title:"spindle speed rpm", convert:UC.toInt, modes:CAM}),
|
drillSpindle: UC.newInput("spindle rpm", {title:"spindle speed rpm", convert:UC.toInt, modes:CAM}),
|
||||||
drillDown: UC.newInput("plunge per", {title:"max plunge between\ndwell periods\nin millimeters\n0 to disable", convert:UC.toFloat, modes:CAM}),
|
drillDown: UC.newInput("plunge per", {title:"max plunge between\ndwell periods\nin workspace units\n0 to disable", convert:UC.toFloat, modes:CAM}),
|
||||||
drillDownSpeed: UC.newInput("plunge rate", {title:"plunge rate\nin millimeters / minute\n0 to disable", convert:UC.toFloat, modes:CAM}),
|
drillDownSpeed: UC.newInput("plunge rate", {title:"plunge rate\nin workspace units / minute\n0 to disable", convert:UC.toFloat, modes:CAM}),
|
||||||
drillDwell: UC.newInput("dwell time", {title:"dwell time\nbetween plunges in\nin milliseconds", convert:UC.toFloat, modes:CAM}),
|
drillDwell: UC.newInput("dwell time", {title:"dwell time\nbetween plunges in\nin milliseconds", convert:UC.toFloat, modes:CAM}),
|
||||||
drillLift: UC.newInput("drill lift", {title:"lift between plunges\nafter dwell period\nin millimeters\n0 to disable", convert:UC.toFloat, modes:CAM}),
|
drillLift: UC.newInput("drill lift", {title:"lift between plunges\nafter dwell period\nin workspace units\n0 to disable", convert:UC.toFloat, modes:CAM}),
|
||||||
drillingOn: UC.newBoolean("enable", onBooleanClick, {modes:CAM}),
|
drillingOn: UC.newBoolean("enable", onBooleanClick, {modes:CAM}),
|
||||||
|
|
||||||
camTabs: UC.newGroup("cutout tabs", null, {modes:CAM}),
|
camTabs: UC.newGroup("cutout tabs", null, {modes:CAM}),
|
||||||
camTabsAngle: UC.newInput("angle", {title:"starting angle for tab spacing\nin degrees", convert:UC.toInt, bound:UC.bound(0,360), modes:CAM}),
|
camTabsAngle: UC.newInput("angle", {title:"starting angle for tab spacing\nin degrees", convert:UC.toInt, bound:UC.bound(0,360), modes:CAM}),
|
||||||
camTabsCount: UC.newInput("count", {title:"number of tabs to use\nwill be spaced evenly\naround the part", convert:UC.toInt, bound:UC.bound(1,20), modes:CAM}),
|
camTabsCount: UC.newInput("count", {title:"number of tabs to use\nwill be spaced evenly\naround the part", convert:UC.toInt, bound:UC.bound(1,20), modes:CAM}),
|
||||||
camTabsWidth: UC.newInput("width", {title:"width in millimeters\nperpendicular to part", convert:UC.toFloat, bound:UC.bound(1,100), modes:CAM}),
|
camTabsWidth: UC.newInput("width", {title:"width in workspace units\nperpendicular to part", convert:UC.toFloat, bound:UC.bound(1,100), modes:CAM}),
|
||||||
camTabsHeight: UC.newInput("height", {title:"height in millimeters\nfrom part bottom", convert:UC.toFloat, bound:UC.bound(1,100), modes:CAM}),
|
camTabsHeight: UC.newInput("height", {title:"height in workspace units\nfrom part bottom", convert:UC.toFloat, bound:UC.bound(1,100), modes:CAM}),
|
||||||
camTabsOn: UC.newBoolean("enable", onBooleanClick, {title:"enable or disable tabs\ntab generation skipped when\npocket only mode enabled", modes:CAM}),
|
camTabsOn: UC.newBoolean("enable", onBooleanClick, {title:"enable or disable tabs\ntab generation skipped when\npocket only mode enabled", modes:CAM}),
|
||||||
|
|
||||||
output: UC.newGroup("raft", null, {modes:FDM}),
|
output: UC.newGroup("raft", null, {modes:FDM}),
|
||||||
|
|
@ -2890,18 +2905,18 @@ self.kiri.license = exports.LICENSE;
|
||||||
outputSparseMult: UC.newInput("infill factor", {title:"extrusion multiplier\n0.0 - 2.0", convert:UC.toFloat, bound:UC.bound(0.0,2.0), modes:FDM}),
|
outputSparseMult: UC.newInput("infill factor", {title:"extrusion multiplier\n0.0 - 2.0", convert:UC.toFloat, bound:UC.bound(0.0,2.0), modes:FDM}),
|
||||||
outputFanLayer: UC.newInput("fan layer", {title:"layer to enable fan", convert:UC.toInt, bound:UC.bound(0,100), modes:FDM, expert: true}),
|
outputFanLayer: UC.newInput("fan layer", {title:"layer to enable fan", convert:UC.toInt, bound:UC.bound(0,100), modes:FDM, expert: true}),
|
||||||
|
|
||||||
camTolerance: UC.newInput("tolerance", {title:"surface precision\nin millimeters", convert:UC.toFloat, bound:UC.bound(0.05,1.0), modes:CAM}),
|
camTolerance: UC.newInput("tolerance", {title:"surface precision\nin workspace units", convert:UC.toFloat, bound:UC.bound(0.05,1.0), modes:CAM}),
|
||||||
camZTopOffset: UC.newInput("z top offset", {title:"offset from stock surface\nto top face of part\nin millimeters", convert:UC.toFloat, modes:CAM}),
|
camZTopOffset: UC.newInput("z top offset", {title:"offset from stock surface\nto top face of part\nin workspace units", convert:UC.toFloat, modes:CAM}),
|
||||||
camZBottom: UC.newInput("z bottom", {title:"offset from part bottom\nto limit cutting depth\nin millimeters", convert:UC.toFloat, modes:CAM}),
|
camZBottom: UC.newInput("z bottom", {title:"offset from part bottom\nto limit cutting depth\nin workspace units", convert:UC.toFloat, modes:CAM}),
|
||||||
camZClearance: UC.newInput("z clearance", {title:"travel offset from z top\nin millimeters", convert:UC.toFloat, bound:UC.bound(1,100), modes:CAM}),
|
camZClearance: UC.newInput("z clearance", {title:"travel offset from z top\nin workspace units", convert:UC.toFloat, bound:UC.bound(1,100), modes:CAM}),
|
||||||
// camPocketOnly: UC.newBoolean("pocket only", onBooleanClick, {title:"constrain to\npart boundaries", modes:CAM}),
|
// camPocketOnly: UC.newBoolean("pocket only", onBooleanClick, {title:"constrain to\npart boundaries", modes:CAM}),
|
||||||
camDepthFirst: UC.newBoolean("depth first", onBooleanClick, {title:"optimize pocket cuts\nwith depth priority", modes:CAM}),
|
camDepthFirst: UC.newBoolean("depth first", onBooleanClick, {title:"optimize pocket cuts\nwith depth priority", modes:CAM}),
|
||||||
outputClockwise: UC.newBoolean("clockwise", onBooleanClick, {title:"waterline milling direction", modes:CAM}),
|
outputClockwise: UC.newBoolean("clockwise", onBooleanClick, {title:"waterline milling direction", modes:CAM}),
|
||||||
|
|
||||||
camStock: UC.newGroup("stock", null, {modes:CAM}),
|
camStock: UC.newGroup("stock", null, {modes:CAM}),
|
||||||
camStockX: UC.newInput("width", {title:"width (x) in millimeters\n0 defaults to part size", convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}),
|
camStockX: UC.newInput("width", {title:"width (x) in workspace units\n0 defaults to part size", convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}),
|
||||||
camStockY: UC.newInput("depth", {title:"depth (y) in millimeters\n0 defaults to part size", convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}),
|
camStockY: UC.newInput("depth", {title:"depth (y) in workspace units\n0 defaults to part size", convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}),
|
||||||
camStockZ: UC.newInput("height", {title:"height (z) in millimeters\n0 defaults to part size", convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}),
|
camStockZ: UC.newInput("height", {title:"height (z) in workspace units\n0 defaults to part size", convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}),
|
||||||
camStockOffset: UC.newBoolean("offset", onBooleanClick, {title: "use width, depth, height\nas offsets from max\npart size on platform", modes:CAM}),
|
camStockOffset: UC.newBoolean("offset", onBooleanClick, {title: "use width, depth, height\nas offsets from max\npart size on platform", modes:CAM}),
|
||||||
outputOriginCenter: UC.newBoolean("origin center", onBooleanClick, {modes:CAM_LASER}),
|
outputOriginCenter: UC.newBoolean("origin center", onBooleanClick, {modes:CAM_LASER}),
|
||||||
camOriginTop: UC.newBoolean("origin top", onBooleanClick, {modes:CAM}),
|
camOriginTop: UC.newBoolean("origin top", onBooleanClick, {modes:CAM}),
|
||||||
|
|
@ -2936,6 +2951,7 @@ self.kiri.license = exports.LICENSE;
|
||||||
settings.controller.showOrigin = UI.showOrigin.checked;
|
settings.controller.showOrigin = UI.showOrigin.checked;
|
||||||
settings.controller.autoLayout = UI.autoLayout.checked;
|
settings.controller.autoLayout = UI.autoLayout.checked;
|
||||||
settings.controller.freeLayout = UI.freeLayout.checked;
|
settings.controller.freeLayout = UI.freeLayout.checked;
|
||||||
|
settings.controller.alignTop = UI.alignTop.checked;
|
||||||
settings.controller.reverseZoom = UI.reverseZoom.checked;
|
settings.controller.reverseZoom = UI.reverseZoom.checked;
|
||||||
SPACE.view.setZoom(settings.controller.reverseZoom, settings.controller.zoomSpeed);
|
SPACE.view.setZoom(settings.controller.reverseZoom, settings.controller.zoomSpeed);
|
||||||
updateOrigin();
|
updateOrigin();
|
||||||
|
|
@ -3968,6 +3984,7 @@ self.kiri.license = exports.LICENSE;
|
||||||
UI.showOrigin.checked = settings.controller.showOrigin;
|
UI.showOrigin.checked = settings.controller.showOrigin;
|
||||||
UI.freeLayout.checked = settings.controller.freeLayout;
|
UI.freeLayout.checked = settings.controller.freeLayout;
|
||||||
UI.autoLayout.checked = settings.controller.autoLayout;
|
UI.autoLayout.checked = settings.controller.autoLayout;
|
||||||
|
UI.alignTop.checked = settings.controller.alignTop;
|
||||||
|
|
||||||
if (SETUP.s) SETUP.s.forEach(function(lib) {
|
if (SETUP.s) SETUP.s.forEach(function(lib) {
|
||||||
var scr = DOC.createElement('script');
|
var scr = DOC.createElement('script');
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
var exports = {
|
var exports = {
|
||||||
COPYRIGHT:"Copyright (C) 2014-2019 Stewart Allen <sa@grid.space> - All Rights Reserved",
|
COPYRIGHT:"Copyright (C) 2014-2019 Stewart Allen <sa@grid.space> - All Rights Reserved",
|
||||||
LICENSE:"See the license.md file included with the source distribution",
|
LICENSE:"See the license.md file included with the source distribution",
|
||||||
VERSION:"1.6.9"
|
VERSION:"1.7.0"
|
||||||
};
|
};
|
||||||
if (!module) var module = {};
|
if (!module) var module = {};
|
||||||
module.exports = exports;
|
module.exports = exports;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue