diff --git a/notes.md b/notes.md index f9a4c506..4566de31 100644 --- a/notes.md +++ b/notes.md @@ -2,7 +2,7 @@ ## `C` cosmetic, `F` functional, `P` performance, `B` bug fix -* `B` client/worker cache invalidated by latest rotation work +* `B` client/worker cache invalidated by latest rotation work. revisit sync. * `B` normals possibly inverted on faces in 2D to 3D conversion * `B` origin bug (Onshape?) when switching modes in 2.5 and 2.6 @@ -19,13 +19,12 @@ # FDM -* `B` fix adaptive slicing with multi-extruder +* `B` infill densities are inaccurate * `B` fix support projection/end with grouped parts * `B` multi-extruder rendering of raft fails to offset the rest of the print * `B` multi-extruder purge blocks fail to generate properly for rafts -* `B` first layer support speed should be same as shell speed -* `F` test outlining solid projected areas +* `F` test outlining solid projected areas (internally) * `F` slicing controls per user-defined z-region * `F` control for size of purge block (with 0=disabled) * `F` polishing and other non-planar work diff --git a/src/kiri/client.js b/src/kiri/client.js index 7f6a660b..c54dca80 100644 --- a/src/kiri/client.js +++ b/src/kiri/client.js @@ -110,9 +110,9 @@ KIRI.work = { send("config", obj, function(reply) { }); }, - clear: function(widget) { + clear: function() { syncd = {}; - send("clear", widget ? {id:widget.id} : {}, function(reply) { }); + send("clear", {}, function(reply) { }); }, snap: function(data) { diff --git a/src/kiri/main.js b/src/kiri/main.js index 57bd1554..b397942f 100644 --- a/src/kiri/main.js +++ b/src/kiri/main.js @@ -871,9 +871,6 @@ setOpacity(color.slicing_opacity); STACKS.clear(); - if (mode === 'FDM') { - KIRI.client.clear(); - } KIRI.client.sync(); KIRI.client.rotate(settings); diff --git a/src/kiri/worker.js b/src/kiri/worker.js index 77c363d8..3e4711e9 100644 --- a/src/kiri/worker.js +++ b/src/kiri/worker.js @@ -44,19 +44,9 @@ KIRI.worker = { clear: function(data, send) { current.snap = null; current.print = null; - if (!data.id) { - dispatch.group = wgroup = {}; - dispatch.cache = wcache = {}; - send.done({ clear: true }); - return; - } - let had = wcache[data.id] !== undefined; - delete wcache[data.id]; - send.done({ - id: data.id, - had: had, - has: wcache[data.id] !== undefined - }); + dispatch.group = wgroup = {}; + dispatch.cache = wcache = {}; + send.done({ clear: true }); }, // widget sync diff --git a/src/mode/fdm/client.js b/src/mode/fdm/client.js index 432399ca..e575e243 100644 --- a/src/mode/fdm/client.js +++ b/src/mode/fdm/client.js @@ -23,13 +23,18 @@ function filterSynth() { // remove synth widgets + let clear = false; api.widgets.filter((widget) => { if (widget.track.synth) { api.const.SPACE.platform.remove(widget.mesh); kiri.Widget.Groups.remove(widget); + clear = true; } return !widget.track.synth }); + if (clear) { + kiri.client.clear(); + } } api.event.on("mode.set", mode => {