Skip to content

Commit

Permalink
v2.3.0(a)
Browse files Browse the repository at this point in the history
v2.3.0(a)
  • Loading branch information
yuhsukeogawa authored Sep 2, 2024
1 parent 84276e0 commit ef5f448
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions ns_l1_master_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,11 @@ def __init__(self):
'''
Write <<POSITION_LINE>>
'''
numpy_shape_array = np.array(master_shape_array)

#remove folder shape at ver 2.3.0(a)
filtered_array = [item for item in master_shape_array if item[0] != item[1]]

numpy_shape_array = np.array(filtered_array)
numpy_line_array = np.array(line_array)
np.line_point = []

Expand All @@ -1058,9 +1062,13 @@ def __init__(self):
begin_near_x = abs(tmp_numpy_line[0] - (int(tmp_numpy_shape[2]) + int(tmp_numpy_shape[4])))

# add ver 2.3.1(a)
if int(tmp_numpy_shape[2]) < int(tmp_numpy_line[0]) and int(tmp_numpy_shape[2] + tmp_numpy_shape[4]) > int(tmp_numpy_line[0]):
if int(tmp_numpy_shape[2]) <= int(tmp_numpy_line[0]) and int(tmp_numpy_shape[2] + tmp_numpy_shape[4]) >= int(tmp_numpy_line[0]):
begin_near_x = int(begin_near_x * xy_ratio)

if int(tmp_numpy_shape[3]) <= int(tmp_numpy_line[1]) and int(tmp_numpy_shape[3] + tmp_numpy_shape[5]) >= int(tmp_numpy_line[1]):
begin_near_x = int(begin_near_x * xy_ratio)
begin_near_y = int(begin_near_y * xy_ratio)

if (begin_cal_x + begin_cal_y) > (begin_near_x + begin_near_y):
begin_cal_y = begin_near_y
begin_cal_x = begin_near_x
Expand All @@ -1080,9 +1088,13 @@ def __init__(self):
end_near_x = abs(tmp_numpy_line[2] - (int(tmp_numpy_shape[2]) + int(tmp_numpy_shape[4])))

# add ver 2.3.1(a)
if int(tmp_numpy_shape[2]) < int(tmp_numpy_line[2]) and int(tmp_numpy_shape[2] + tmp_numpy_shape[4]) > int(tmp_numpy_line[2]):
if int(tmp_numpy_shape[2]) <= int(tmp_numpy_line[2]) and int(tmp_numpy_shape[2] + tmp_numpy_shape[4]) >= int(tmp_numpy_line[2]):
end_near_x = int(end_near_x * xy_ratio)

if int(tmp_numpy_shape[3]) <= int(tmp_numpy_line[3]) and int(tmp_numpy_shape[3] + tmp_numpy_shape[5]) >= int(tmp_numpy_line[3]):
end_near_x = int(end_near_x * xy_ratio)
end_near_y = int(end_near_y * xy_ratio)

if (end_cal_x + end_cal_y) > (end_near_x + end_near_y) and begin_shape_name != tmp_numpy_shape[1]:
end_cal_y = end_near_y
end_cal_x = end_near_x
Expand Down

0 comments on commit ef5f448

Please sign in to comment.