clear traces on widget modified

This commit is contained in:
Stewart Allen 2020-12-01 20:56:10 -05:00
commit dfd2dacac7
3 changed files with 9 additions and 4 deletions

View file

@ -2,8 +2,6 @@
## 2.4 roadmap
* `cnc`
* - tracing (chamfer, engrave)
* - auto feature detection (slicing)
* - compute tolerance from animesh when set to 0
* `laser`
* - drag knife support

View file

@ -237,11 +237,16 @@
func.tabDone();
alert = api.show.alert("analyzing parts...");
traceOn = true;
KIRI.client.traces(() => {
KIRI.client.traces((ids) => {
api.hide.alert(alert);
alert = api.show.alert("[esc] key cancels trace editing");
KIRI.api.widgets.opacity(0.5);
KIRI.api.widgets.for(widget => {
if (ids.indexOf(widget.id) >= 0) {
console.log('clear_traces', widget.id);
clearTraces(widget);
widget.trace_stack = null;
}
if (widget.trace_stack) {
widget.adds.appendAll(widget.trace_stack.meshes);
widget.trace_stack.show();

View file

@ -30,11 +30,13 @@
let settings = API.conf.get();
let widgets = API.widgets.map();
send("traces", { settings }, output => {
let ids = [];
KIRI.codec.decode(output).forEach(rec => {
ids.push(rec.id);
widgets[rec.id].traces = rec.traces;
// widgets[rec.id].sindex = rec.sindex;
});
ondone(true);
ondone(ids);
});
};