Hi everyone @c.poupin @Mike.Buttery
In order to create a list of rebar containers of my model based on the rebar diameter, as shown in the first image below, I should check a condition related to my circular rebars to determine the correct length of my containers list, whether the remainder bar exists or not ( Let me explain: for either outer circular rebars and inner circular rebars, I should group rebars with a length of 12.00 m in a separate container for each. If there are remainder rebars less than 12.00 m, I should group them separately in other container for each. In my code, I named them "remaind_out_cir_rebar
" for the outer rebar remainders and "remaind_inner_cir_rebar
" for the inner rebar remainders.)
I’ve studied the case where the remaind_out_cir_rebar
and remaind_inner_cir_rebar
lists are not null, as shown in the 2nd image , but I’m struggling to achieve all other cases.
here the part of the code to get rebar container names:
if remaind_out_cir_rebar and remaind_inner_cir_rebar:
rebar_type = [V_rebar_type, V_rebar_type, cir_rebar_type, cir_rebar_type, cir_rebar_type, cir_rebar_type]
container_name = [i.ToDSType(False).Name for i in rebar_type]
else:
rebar_type = [V_rebar_type, V_rebar_type, cir_rebar_type, cir_rebar_type]
container_name = [i.ToDSType(False).Name for i in rebar_type]
OUT = [i.ToProtoType().Length for i in remaind_out_cir_rebar], [i.ToProtoType().Length for i in remaind_inner_cir_rebar], container_name
Any help would be apreciated.
Thanks.