From 2052a9c8a139ff032ccda8579c3677d53480a346 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 19 Jul 2021 03:23:20 +0100 Subject: [PATCH] lowering: Only do clashing Z heavy when needed If there are no pieces Q to insert, we con't need to worry about this, because it'll just be an empty ignored plan entry. Signed-off-by: Ian Jackson --- templates/script.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/script.ts b/templates/script.ts index 6f070409..1a069962 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -738,6 +738,7 @@ function lower_pieces(targets_todo: LowerTodoList): } while (nomove_heavy.length && + (tomove_light.length || tomove_misstacked.length) && nomove_heavy[nomove_heavy.length-1].p.z == q_z_top) { // Yowzer. We have to reset the Z coordinates on these heavy // pieces, whose Z coordinate is the same as the stuff we are not -- 2.30.2