From 72896c76a13716de869311e6a0f7595c25dbf420 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Sat, 9 May 2020 15:58:32 +0800 Subject: [PATCH] add cmds: "forward", "turn", "roll", "pitch" --- src/turtle/_impl/_turtle3d_impl.scad | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/turtle/_impl/_turtle3d_impl.scad b/src/turtle/_impl/_turtle3d_impl.scad index 50f6ea88..cffe27e0 100644 --- a/src/turtle/_impl/_turtle3d_impl.scad +++ b/src/turtle/_impl/_turtle3d_impl.scad @@ -116,14 +116,14 @@ function _turtle3d_create_cmd(arg1, arg2) = !is_undef(arg1) && !is_undef(arg2) ? _turtle3d_create(arg1, arg2) : undef; function _turtle3d_chain_move(cmd, arg1, arg2) = - cmd == "xu_move" ? _turtle3d_xu_move(arg1, arg2) : + cmd == "xu_move" || cmd == "forward" ? _turtle3d_xu_move(arg1, arg2) : cmd == "yu_move" ? _turtle3d_yu_move(arg1, arg2) : cmd == "zu_move" ? _turtle3d_zu_move(arg1, arg2) : _turtle3d_chain_turn(cmd, arg1, arg2); function _turtle3d_chain_turn(cmd, arg1, arg2) = - cmd == "xu_turn" ? _turtle3d_xu_turn(arg1, arg2) : - cmd == "yu_turn" ? _turtle3d_yu_turn(arg1, arg2) : - cmd == "zu_turn" ? _turtle3d_zu_turn(arg1, arg2) : _turtle3d_chain_one_arg(cmd, arg1); + cmd == "xu_turn" || cmd == "roll" ? _turtle3d_xu_turn(arg1, arg2) : + cmd == "yu_turn" || cmd == "pitch" ? _turtle3d_yu_turn(arg1, arg2) : + cmd == "zu_turn" || cmd == "turn" ? _turtle3d_zu_turn(arg1, arg2) : _turtle3d_chain_one_arg(cmd, arg1); function _turtle3d_chain_one_arg(cmd, arg) = cmd == "pt" ? _turtle3d_pt(arg) :