split dragknife out of laser and create new mode based on it. template for waterjet and wire-edm

This commit is contained in:
Stewart Allen 2024-06-09 11:00:53 -07:00
commit 85f48ef9b4
12 changed files with 137 additions and 56 deletions

View file

@ -27,6 +27,7 @@
// use: kiri-mode.fdm.prepare
// use: kiri-mode.fdm.export
// use: kiri-mode.laser.driver
// use: kiri-mode.drag.driver
gapp.register("kiri-run.worker", [], (root, exports) => {
const { base, kiri, moto } = root;
@ -40,7 +41,8 @@ let debug = self.debug === true,
concurrent = self.Worker && ccvalue > 3 ? ccvalue - 1 : 0,
current = self.worker = {
print: null,
snap: null
snap: null,
mode: null
},
wgroup = {},
wcache = {},
@ -401,13 +403,14 @@ kiri.worker = {
slice(data, send) {
send.data({update:0.001, updateStatus:"slicing"});
current.print = null;
let settings = data.settings,
widget = wcache[data.id],
last = time(),
now;
current.print = null;
current.mode = settings.mode.toUpperCase();
widget.anno = data.anno || widget.anno;
widget.slice(settings, function(error) {