From c00c216822e077e5907196144ac6d09fecadb7e3 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Tue, 21 Apr 2020 09:08:33 -0400 Subject: [PATCH] fix align top bug with single widget in CAM mode --- js/kiri.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/kiri.js b/js/kiri.js index b1450107..a95a6efd 100644 --- a/js/kiri.js +++ b/js/kiri.js @@ -950,7 +950,8 @@ self.kiri.copyright = exports.COPYRIGHT; } function platformUpdateTopZ() { - let camz = (MODE === MODES.CAM) && (settings.stock.z || settings.controller.alignTop); + let alignTopOk = WIDGETS.length > 1 && settings.controller.alignTop; + let camz = (MODE === MODES.CAM) && (settings.stock.z || alignTopOk); let ztop = camz ? camTopZ - settings.process.camZTopOffset : 0; forAllWidgets(function(widget) { widget.setTopZ(ztop); @@ -969,7 +970,7 @@ self.kiri.copyright = exports.COPYRIGHT; height = parseFloat(dev.bedHeight) ); SPACE.platform.setGZOff(height/2 - 0.1); - SPACE.platform.setHidden(width > 500 || depth > 500); + // SPACE.platform.setHidden(width > 500 || depth > 500); platform.update_origin(); SPACE.scene.freeze(frozen); } @@ -979,7 +980,6 @@ self.kiri.copyright = exports.COPYRIGHT; forAllWidgets(function(widget) { let wp = widget.track.pos; let wb = widget.mesh.getBoundingBox().clone(); - // wb.translate(widget.track.pos); bounds.union(wb); }); return settings.bounds = bounds;