fixes #201 implicit beltAnchor when using engine

This commit is contained in:
Stewart Allen 2022-02-12 10:44:50 -05:00
commit 770a671ea9
2 changed files with 5 additions and 3 deletions

View file

@ -409,7 +409,7 @@
}
// array of added top.fill_sparse arrays
let adds = [];
let anchorlen = process.beltAnchor * beltfact;
let anchorlen = (process.beltAnchor || process.firstLayerBeltLead) * beltfact;
while (anchorlen && start && anchorlen >= sliceHeight) {
let addto = start.down;
if (!addto) {

View file

@ -318,8 +318,9 @@ KIRI.worker = {
let xpos = track.pos.x;
let ypos = settings.device.bedDepth / 2 + track.pos.y + miny;
let rotation = (Math.PI / 180) * 45;
let proc = settings.process;
// move to accomodate anchor
ypos += (settings.process.beltAnchor || 0);
ypos += (proc.beltAnchor || proc.firstLayerBeltLead || 0);
for (let w of group) {
w.moveMesh(0, miny, 0);
}
@ -345,8 +346,9 @@ KIRI.worker = {
let widget = group[0];
let { xpos, ypos } = widget.belt;
let { dy, dz } = widget.belt;
let proc = settings.process;
// move to accomodate anchor
dy -= (settings.process.beltAnchor || 0) ;
dy -= (proc.beltAnchor || proc.firstLayerBeltLead || 0) ;
widget.rotinfo = { angle: 45, dy, dz, xpos, ypos };
for (let others of group.slice(1)) {
others.rotinfo = widget.rotinfo;