From 99f898caecf11861939946c3cf758bbaf751329c Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Tue, 25 Oct 2022 18:29:58 -0400 Subject: [PATCH] fix for gcode op before all others (no tool set) --- src/kiri-mode/cam/animate.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kiri-mode/cam/animate.js b/src/kiri-mode/cam/animate.js index d4ad7980..45983253 100644 --- a/src/kiri-mode/cam/animate.js +++ b/src/kiri-mode/cam/animate.js @@ -469,8 +469,10 @@ kiri.load(() => { renderMoves(id, moves, send); } else { last = next; - tool.pos = next.point; - toolUpdate = { mesh_move: { id, pos: next.point }}; + if (tool) { + tool.pos = next.point; + toolUpdate = { mesh_move: { id, pos: next.point }}; + } renderPath(send); } }