parent
462599b41d
commit
0dc1f3e153
29
PWFile.py
29
PWFile.py
|
|
@ -174,7 +174,7 @@ class StringImpactExcel:
|
|||
|
||||
def set_true_color(object, r_or_rgb_list, g=0, b=0):
|
||||
true_color = object.TrueColor
|
||||
if type(r_or_rgb_list) == List or type(r_or_rgb_list)==list:
|
||||
if type(r_or_rgb_list) == List or type(r_or_rgb_list) == list:
|
||||
true_color.SetRGB(*r_or_rgb_list)
|
||||
else:
|
||||
true_color.SetRGB(r_or_rgb_list, g, b)
|
||||
|
|
@ -254,12 +254,18 @@ class StringImpactPlate:
|
|||
forth_reprtv_span = first_tower_info.forth_representive_span
|
||||
continouse_sheet.range("B69").value = forth_reprtv_span
|
||||
high_temperature_tension = continouse_sheet.range("L69").value
|
||||
forth_tower_info = tower_dict[tower_key_list[draw_tower_index[0] + 1]]
|
||||
forth_tower_info: SEntry = tower_dict[tower_key_list[draw_tower_index[0] + 1]]
|
||||
if forth_tower_info.is_tension_tower:
|
||||
forth_tower_fitting_length = 0
|
||||
else:
|
||||
forth_tower_fitting_length = fitting.fitting_length_dic[
|
||||
forth_tower_info.fitting
|
||||
]
|
||||
gaocha_of_first_tower = (
|
||||
(
|
||||
forth_tower_info.tower_height
|
||||
- forth_tower_info.foundation_low
|
||||
- fitting.fitting_length_dic[forth_tower_info.fitting]
|
||||
- forth_tower_fitting_length
|
||||
)
|
||||
- (first_tower_info.tower_height - first_tower_info.foundation_low)
|
||||
+ forth_tower_info.altitude_off
|
||||
|
|
@ -293,12 +299,18 @@ class StringImpactPlate:
|
|||
draw_last_tower_key = tower_key_list[draw_tower_index[-1]]
|
||||
last_tower_info = tower_dict[draw_last_tower_key] # 最后一个塔位
|
||||
back_reprtv_span = last_tower_info.back_representive_span
|
||||
back_tower_info = tower_dict[tower_key_list[draw_tower_index[-1] - 1]]
|
||||
back_tower_info: SEntry = tower_dict[tower_key_list[draw_tower_index[-1] - 1]]
|
||||
if back_tower_info.is_tension_tower:
|
||||
back_tower_fitting_length = 0
|
||||
else:
|
||||
back_tower_fitting_length = fitting.fitting_length_dic[
|
||||
back_tower_info.fitting
|
||||
]
|
||||
gaocha_of_last_tower = (
|
||||
(
|
||||
back_tower_info.tower_height
|
||||
- back_tower_info.foundation_low
|
||||
- fitting.fitting_length_dic[back_tower_info.fitting]
|
||||
- back_tower_fitting_length
|
||||
)
|
||||
- (last_tower_info.tower_height - last_tower_info.foundation_low)
|
||||
- last_tower_info.altitude_off
|
||||
|
|
@ -397,7 +409,7 @@ class ContinuousPlate:
|
|||
continue
|
||||
if not last_tower_info:
|
||||
last_tower_info = tower_info
|
||||
if draw_count == draw_count_limit:
|
||||
if draw_count == draw_count_limit - 1:
|
||||
# 画代表档距
|
||||
representive_span_text = f"{tower_info.back_representive_span:.0f}"
|
||||
representive_span_text_point = np.array(
|
||||
|
|
@ -408,7 +420,10 @@ class ContinuousPlate:
|
|||
APoint(*representive_span_text_point.tolist()),
|
||||
3,
|
||||
)
|
||||
set_true_color(added_representive_span_text,ColorEnume.representive_span_text_color_rgb)
|
||||
set_true_color(
|
||||
added_representive_span_text,
|
||||
ColorEnume.representive_span_text_color_rgb,
|
||||
)
|
||||
if draw_count > draw_count_limit - 1:
|
||||
break
|
||||
foundation_low = tower_info.foundation_low
|
||||
|
|
|
|||
Loading…
Reference in New Issue