Use concise dynamic rebar labels in beam section

Render bar-group callouts as (n) #size and stirrups as #size @ spacing,
driven entirely by the input values.
This commit is contained in:
smillmorel 2026-09-21 19:23:14 -04:00
commit e129c1e87c
3 changed files with 563 additions and 548 deletions

View file

@ -17,12 +17,12 @@
#place(dx: 0.5pt, dy: 82pt, text(size: 7pt)[$h = 12 " in"$]) #place(dx: 0.5pt, dy: 82pt, text(size: 7pt)[$h = 12 " in"$])
#place(line(start: (110.1pt, 41.88pt), end: (129pt, 42pt), stroke: 0.5pt + rgb("#626b73"))) #place(line(start: (110.1pt, 41.88pt), end: (129pt, 42pt), stroke: 0.5pt + rgb("#626b73")))
#place(dx: 108.6pt, dy: 40.38pt, circle(radius: 1.5pt, fill: black)) #place(dx: 108.6pt, dy: 40.38pt, circle(radius: 1.5pt, fill: black))
#place(dx: 132pt, dy: 37pt, text(size: 7pt)[2 No. 4 hanger \ bars]) #place(dx: 132pt, dy: 37pt, text(size: 7pt, "(2) #4"))
#place(line(start: (113.5pt, 85pt), end: (129pt, 82pt), stroke: 0.5pt + rgb("#626b73"))) #place(line(start: (113.5pt, 85pt), end: (129pt, 82pt), stroke: 0.5pt + rgb("#626b73")))
#place(dx: 112pt, dy: 83.5pt, circle(radius: 1.5pt, fill: black)) #place(dx: 112pt, dy: 83.5pt, circle(radius: 1.5pt, fill: black))
#place(dx: 132pt, dy: 77pt, text(size: 7pt)[No. 3 stirrup \ at 6 in o.c.]) #place(dx: 132pt, dy: 77pt, text(size: 7pt, "#3 @ 6″"))
#place(line(start: (109.5pt, 127.5pt), end: (129pt, 128pt), stroke: 0.5pt + rgb("#626b73"))) #place(line(start: (109.5pt, 127.5pt), end: (129pt, 128pt), stroke: 0.5pt + rgb("#626b73")))
#place(dx: 108pt, dy: 126pt, circle(radius: 1.5pt, fill: black)) #place(dx: 108pt, dy: 126pt, circle(radius: 1.5pt, fill: black))
#place(dx: 132pt, dy: 123pt, text(size: 7pt)[2 No. 5 bottom \ $A_s = 0.6136 " in"^2$]) #place(dx: 132pt, dy: 123pt, text(size: 7pt, "(2) #5"))
] ]
} }

View file

@ -44,7 +44,6 @@ def render(values: dict) -> str:
top_bar_size = int(values["top_bar_size"]) top_bar_size = int(values["top_bar_size"])
top_bar_db = float(values["top_bar_db"]) top_bar_db = float(values["top_bar_db"])
n_top_bars = int(values["n_top_bars"]) n_top_bars = int(values["n_top_bars"])
As = float(values["As"])
w_sec = bw * s w_sec = bw * s
h_sec = h * s h_sec = h * s
@ -138,19 +137,19 @@ def render(values: dict) -> str:
leader(sx(top[-1]), sy(top_y), lead_x, oy + 14.0) leader(sx(top[-1]), sy(top_y), lead_x, oy + 14.0)
add( add(
f" #place(dx: {_f(label_x)}pt, dy: {_f(oy + 9)}pt, " f" #place(dx: {_f(label_x)}pt, dy: {_f(oy + 9)}pt, "
f"text(size: 7pt)[{n_top_bars} No. {top_bar_size} hanger \\ bars])" f'text(size: 7pt, "({n_top_bars}) #{top_bar_size}"))'
) )
leader(sx(bw - inset), sy(h / 2.0), lead_x, oy + h_sec / 2.0 - 3.0) leader(sx(bw - inset), sy(h / 2.0), lead_x, oy + h_sec / 2.0 - 3.0)
add( add(
f" #place(dx: {_f(label_x)}pt, dy: {_f(oy + h_sec / 2.0 - 8)}pt, " f" #place(dx: {_f(label_x)}pt, dy: {_f(oy + h_sec / 2.0 - 8)}pt, "
f"text(size: 7pt)[No. {stirrup_size} stirrup \\ at {_f(stirrup_spacing)} in o.c.])" f'text(size: 7pt, "#{stirrup_size} @ {_f(stirrup_spacing)}″"))'
) )
leader(sx(bottom[-1]), sy(y_bottom), lead_x, oy + h_sec - 14.0) leader(sx(bottom[-1]), sy(y_bottom), lead_x, oy + h_sec - 14.0)
add( add(
f" #place(dx: {_f(label_x)}pt, dy: {_f(oy + h_sec - 19)}pt, " f" #place(dx: {_f(label_x)}pt, dy: {_f(oy + h_sec - 19)}pt, "
f'text(size: 7pt)[{n_bars} No. {bar_size} bottom \\ $A_s = {_f(As)} " in"^2$])' f'text(size: 7pt, "({n_bars}) #{bar_size}"))'
) )
add(" ]") add(" ]")

File diff suppressed because it is too large Load diff