From fe20f7a39a96019369cfa7b9d29feadb9e98af72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rostislav=20L=C3=A1n?= Date: Fri, 28 Apr 2023 20:03:27 +0200 Subject: [PATCH] Updated stl parser to reflect changes to mapped mode. --- src/stl_parser.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/stl_parser.py b/src/stl_parser.py index 21839c1..e171ca9 100644 --- a/src/stl_parser.py +++ b/src/stl_parser.py @@ -76,8 +76,12 @@ def stl_parser(): elif len(header_arr) == 3: mode = "m" height_line = header_arr[0] - # TODO: mapped mode arguments - pass + iter = header_arr[1] + finger_x = header_arr[2] + finger_y = header_arr[3] + finger_z = header_arr[4] + arg_string += mode + " " + height_line + \ + " " + iter + " " + finger_x + " " + finger_y + " " + finger_z else: # Print unfinished command print(arg_string, file=sys.stdout) @@ -99,6 +103,12 @@ def stl_parser(): " " + curv_rate_x + " " + curv_rate_y elif mode == "m": height_line = header_arr[0] + iter = header_arr[1] + finger_x = header_arr[2] + finger_y = header_arr[3] + finger_z = header_arr[4] + arg_string += height_line + " " + iter + \ + " " + finger_x + " " + finger_y + " " + finger_z pass else: # Print unfinished command