fix phantom support generation off part or under bed

This commit is contained in:
Stewart Allen 2022-03-14 09:29:23 -04:00
commit 6d87325379
3 changed files with 6 additions and 1 deletions

View file

@ -386,7 +386,7 @@ FDM.init = function(kiri, api) {
removeWidgetSupport(lastPillar.widget, lastPillar);
return;
}
if (!iw) return;
if (!(iw && lastBox)) return;
let { point, dim } = lastBox;
p1.y = Math.max(0, p1.y);
p2.y = Math.max(0, p2.y);
@ -504,6 +504,8 @@ FDM.init = function(kiri, api) {
addbox({x:p1.x, y:hy, z:p1.z}, 0x0000dd, 'supp', {
x:dw, y:dw, z:dy, rz
});
} else {
lastBox = null;
}
if (event && event.altKey) {
return func.hoverup();