another sometimes-works case for multiple widgets

This commit is contained in:
Stewart Allen 2021-01-25 00:48:19 -05:00
commit 5765c2c6a2
3 changed files with 12 additions and 10 deletions

View file

@ -2,6 +2,7 @@
## `C` cosmetic, `F` functional, `P` performance, `B` bug fix
* `B` client/worker cache invalidated by latest rotation work
* `B` saved profile should be restored / defaulted when switching devices?
* `B` normals possibly inverted on faces in 2D to 3D conversion
* `B` normalize left, bottom, right pop menu time/click and value persistence
@ -11,13 +12,12 @@
* `P` allow selection to me decimated on demand (context menu?)
* `P` improve decimation speed: omit point conversion or use wasm
* `P` client/worker interface normalization
* `P` explore widget vertex reloading / replacing
* `P` explore widget vertex reloading / replacing (Onshape primarily)
* `F` SVG import to 3D part like images
# FDM
* `B` client/worker cache invalidated by latest rotation work
* `B` fix adaptive slicing with multi-extruder
* `B` fix support projection/end with grouped parts
* `B` multi-extruder rendering of raft fails to offset the rest of the print
@ -51,10 +51,7 @@
# FDM - BELT
* `B` when resize causes a part to move off-bed, move it back on
* `B` grouped widgets get placed off in space
* `B` layer retract broken?
* `B` infill / thin-fill is generating tons of small linear segments
* `B` multiple parts with one angled against origin "floats" in preview
* `B` finish supports for belt printing. add progress.
# CAM

View file

@ -100,12 +100,16 @@ KIRI.worker = {
return { miny, maxy };
}
for (let group of Object.values(wgroup)) {
function gmin(group) {
let minv = {};
for (let w of group) {
minv = mins(w.vertices, minv);
}
let { miny, maxy } = minv;
return minv;
}
for (let group of Object.values(wgroup)) {
let { miny, maxy } = gmin(group);
let widget = group[0];
let track = widget.track;
@ -113,8 +117,9 @@ KIRI.worker = {
let ypos = settings.device.bedDepth / 2 + track.pos.y + miny;
let rotation = (Math.PI / 180) * 45;
widget.belt = { xpos, ypos };
widget.rotate(rotation,0,0,true);
let minr = gmin(group);
widget.belt = { xpos, ypos, yadd: minr.maxy - minr.miny };
for (let others of group.slice(1)) {
others.belt = widget.belt;
}

View file

@ -295,7 +295,7 @@
let o = rotinfo.ypos * beltfact;
offset = {
x: rotinfo.xpos,
y: o - belt.midy,// - belt.miny,
y: o - belt.midy - belt.yadd/2,
z: o,
};
// offset = { x:0, y:0, z:0 };