add cam inner first routing option. add engine sample persistence

This commit is contained in:
Stewart Allen 2025-08-10 23:48:10 -04:00
commit 01b1349127
7 changed files with 23 additions and 3 deletions

View file

@ -99,7 +99,11 @@
});
edit.session.setTabSize(4);
edit.session.setUseSoftTabs(true);
let FDMExample = loadExample(demoFDM)
if (localStorage.engineCode) {
edit.session.setValue(localStorage.engineCode);
} else {
loadExample(demoFDM);
}
}
function display_message(msg) {
$('gfoot').innerText = msg ? Object.keys(msg).join(' - ') : '';
@ -110,7 +114,7 @@
$('dfoot').style.display = 'block';
$('gfoot').style.display = '';
}
function loadExample(func){
function loadExample(func) {
let fnstr = func.toString().split("\n");
edit.session.setValue(
fnstr
@ -124,6 +128,7 @@
$('gfoot').style.display = 'block';
let code = edit.session.getValue();
eval(`(function(){${code}})()`);
localStorage.engineCode = code;
}
function demoFDM() {
new Engine()

View file

@ -790,6 +790,8 @@ self.lang['en-us'] = {
ou_conv_l: ["milling direction","uncheck for 'climb'"],
ou_depf_s: "depth first",
ou_depf_l: ["optimize pocket cuts","with depth priority"],
ou_inrf_s: "inner first",
ou_inrf_l: ["always cut inner to outer"],
ou_toin_s: "tool init",
ou_toin_l: "add tool change with first operation. when disabled, the gcode assumes the first tool is loaded and offset probed",
ou_forz_s: "force z max",