From 83afed2fae6c9e24e2790082d7e35a17f32ccd46 Mon Sep 17 00:00:00 2001 From: Mert Yaylaci <151733368+mertyaylacigit@users.noreply.github.com> Date: Thu, 6 Jun 2024 14:41:17 +0200 Subject: [PATCH] updated json export and removed centerline in .lyt --- drawing_to_fsd_layout/export.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drawing_to_fsd_layout/export.py b/drawing_to_fsd_layout/export.py index bc1cc76..cbe6997 100644 --- a/drawing_to_fsd_layout/export.py +++ b/drawing_to_fsd_layout/export.py @@ -31,15 +31,11 @@ def export_json_string(edges_left: FloatArrayNx2, edges_right: FloatArrayNx2, ce + ["yellow"] * (len(edges_right) - 1) ) obj = { - "cones":{ - "x": cones_x, - "y": cones_y, - "color": cones_color, - }, - "centerline": { - "x": centerline_x, - "y": centerline_y - } + "x": cones_x, + "y": cones_y, + "color": cones_color, + "centerline_x": centerline_x, + "centerline_y": centerline_y } return json.dumps(obj) @@ -256,7 +252,6 @@ def cones_to_lyt( (cones_left[0], cones_right[0]) ) - cones_per_type.append(np.array(centerline)) bytes_to_write = _traces_to_lyt_bytes(cones_per_type, offset) return bytes_to_write