fix worker cache reference bug in cam driver

This commit is contained in:
Stewart Allen 2022-03-05 10:58:07 -05:00
commit 032bb0c626
2 changed files with 3 additions and 1 deletions

View file

@ -73,6 +73,7 @@
* `B` need to force cut line at synthetic z bottom (midlines, etc)
* `B` contour does not honor clip to stock
* `F` add `plunge max` to contouring that can override z feed limit
* `F` roughing flats should be constrained to flat region
* `F` limit cut depth to flute length of selected tool (or warn)
* `F` add ease-down support to trace op

View file

@ -3,6 +3,7 @@
"use strict";
// dep: main.kiri
// use: kiri.codec
gapp.register("kiri-mode.cam.driver", [], (root, exports) => {
const { kiri } = root;
@ -40,7 +41,7 @@ kiri.load(api => {
if (kiri.worker)
kiri.worker.cam_traces = function(data, send) {
const { settings, single } = data;
const widgets = Object.values(wcache);
const widgets = Object.values(kiri.worker.cache);
const fresh = widgets.filter(widget => CAM.traces(settings, widget, single));
send.done(kiri.codec.encode(fresh.map(widget => { return {
id: widget.id,