more intelligent sync. but clear/sync in belt mode. eliminate layer support gap in belt mode
This commit is contained in:
parent
2cc92dea6f
commit
f35ab73858
6 changed files with 20 additions and 4 deletions
1
notes.md
1
notes.md
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
## `C` cosmetic, `F` functional, `P` performance, `B` bug fix
|
## `C` cosmetic, `F` functional, `P` performance, `B` bug fix
|
||||||
|
|
||||||
* `B` client/worker cache invalidated by latest rotation work. revisit sync.
|
|
||||||
* `B` normals possibly inverted on faces in 2D to 3D conversion
|
* `B` normals possibly inverted on faces in 2D to 3D conversion
|
||||||
* `B` origin bug (Onshape?) when switching modes in 2.5 and 2.6
|
* `B` origin bug (Onshape?) when switching modes in 2.5 and 2.6
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,9 @@ KIRI.work = {
|
||||||
|
|
||||||
// widget sync
|
// widget sync
|
||||||
sync: function() {
|
sync: function() {
|
||||||
|
// send list of currently valid widgets
|
||||||
|
send("sync", { valid: KIRI.api.widgets.all().map(w => w.id) }, () => {});
|
||||||
|
// sync any widget that has changed
|
||||||
let widgets = KIRI.api.widgets.all();
|
let widgets = KIRI.api.widgets.all();
|
||||||
widgets.forEach(widget => {
|
widgets.forEach(widget => {
|
||||||
if (widget.modified || !syncd[widget.id]) {
|
if (widget.modified || !syncd[widget.id]) {
|
||||||
|
|
|
||||||
|
|
@ -1685,7 +1685,7 @@
|
||||||
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
|
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
|
||||||
sliceSupportSize: UC.newInput(LANG.sp_size_s, {title:LANG.sp_size_l, bound:UC.bound(1.0,200.0), convert:UC.toFloat, modes:FDM}),
|
sliceSupportSize: UC.newInput(LANG.sp_size_s, {title:LANG.sp_size_l, bound:UC.bound(1.0,200.0), convert:UC.toFloat, modes:FDM}),
|
||||||
sliceSupportOffset: UC.newInput(LANG.sp_offs_s, {title:LANG.sp_offs_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
|
sliceSupportOffset: UC.newInput(LANG.sp_offs_s, {title:LANG.sp_offs_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
|
||||||
sliceSupportGap: UC.newInput(LANG.sp_gaps_s, {title:LANG.sp_gaps_l, bound:UC.bound(0,5), convert:UC.toInt, modes:FDM}),
|
sliceSupportGap: UC.newInput(LANG.sp_gaps_s, {title:LANG.sp_gaps_l, bound:UC.bound(0,5), convert:UC.toInt, modes:FDM, show:isNotBelt}),
|
||||||
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
|
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
|
||||||
sliceSupportArea: UC.newInput(LANG.sp_area_s, {title:LANG.sp_area_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
|
sliceSupportArea: UC.newInput(LANG.sp_area_s, {title:LANG.sp_area_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
|
||||||
sliceSupportExtra: UC.newInput(LANG.sp_xpnd_s, {title:LANG.sp_xpnd_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
|
sliceSupportExtra: UC.newInput(LANG.sp_xpnd_s, {title:LANG.sp_xpnd_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
|
||||||
|
|
|
||||||
|
|
@ -871,7 +871,7 @@
|
||||||
setOpacity(color.slicing_opacity);
|
setOpacity(color.slicing_opacity);
|
||||||
|
|
||||||
STACKS.clear();
|
STACKS.clear();
|
||||||
if (mode === 'FDM') {
|
if (settings.device.bedBelt) {
|
||||||
KIRI.client.clear();
|
KIRI.client.clear();
|
||||||
}
|
}
|
||||||
KIRI.client.sync();
|
KIRI.client.sync();
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,20 @@ KIRI.worker = {
|
||||||
|
|
||||||
// widget sync
|
// widget sync
|
||||||
sync: function(data, send) {
|
sync: function(data, send) {
|
||||||
|
if (data.valid) {
|
||||||
|
// remove widgets not present in valid list
|
||||||
|
for (let key in wcache) {
|
||||||
|
if (data.valid.indexOf(key) < 0) {
|
||||||
|
delete wcache[key];
|
||||||
|
for (let [id,group] of Object.entries(wgroup)) {
|
||||||
|
wgroup[id] = group = group.filter(v => v.id !== key);
|
||||||
|
group.id = id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let group = wgroup[data.group];
|
let group = wgroup[data.group];
|
||||||
if (!group) {
|
if (!group) {
|
||||||
group = [];
|
group = [];
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@
|
||||||
slice.addTop(u);
|
slice.addTop(u);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let gap = sliceHeight * spro.sliceSupportGap
|
let gap = sliceHeight * (isBelt ? 0 : spro.sliceSupportGap);
|
||||||
// clip tops to other widgets in group
|
// clip tops to other widgets in group
|
||||||
tops = slice.topPolys();
|
tops = slice.topPolys();
|
||||||
for (let peer of widget.group) {
|
for (let peer of widget.group) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue