From dfb598cb0e6264f27817942b068fbadc6ff35338 Mon Sep 17 00:00:00 2001 From: bukehu Date: Tue, 5 Mar 2024 03:11:13 +0000 Subject: [PATCH] Update temp.py --- temp.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/temp.py b/temp.py index e69de29..561e8fd 100644 --- a/temp.py +++ b/temp.py @@ -0,0 +1,22 @@ +dimension = 10 +spacing_between_rows = 10 +spacing_between_columns = 10 +cell_starting_point = (30, 30) + +limit_type = "guide" + +f = open("output.txt", "w") +# f.write(f"create_{limit_type} -name guts/link_upstream -area {cell_starting_point[0]} {cell_starting_point[0]} {cell_starting_point[0] + 150} {cell_starting_point[1] - 5} \\n\n") +# f.write(f"create_{limit_type} -name guts/link_downstream -area {cell_starting_point[0] + 160} {cell_starting_point[0]} {cell_starting_point[0] + 160 + 500} {cell_starting_point[1] - 5} \\n\n") +f.write("") +f.close() + +for i in range(32): + for j in range(32): + part_1 = f"create_{limit_type} -name guts/n[0].clnt.clnt/genblk1.cgol_inst/cell_array/gen_rows[{i}].gen_cols[{j}].life_cell -area " + lower_left = (cell_starting_point[0] + i * (dimension + spacing_between_rows), cell_starting_point[1] + j * (dimension + spacing_between_columns)) + upper_right = (lower_left[0] + dimension, lower_left[1] + dimension) + part_2 = f"{lower_left[0]} {lower_left[1]} {upper_right[0]} {upper_right[1]} \\n\n" + f = open("output.txt", "a") + f.write(part_1 + part_2) + f.close()