- Code\rebar_pipeline, review_pipeline, pier-program을 정션에서 실제 폴더로 전환 - Code\rhino_mcp 및 CLAUDE_rhino배경.md 추가, .mcp.json은 PYTHONPATH로 새 위치 사용 - pier-program 내부 .git 제거(이력은 backup\pier-program_20261028.bundle에 보관) - worktree 가이드 반영(CLAUDE.local.md, HANDOFF.md) - D:\Rhino-MCP 경로 참조를 새 위치로 치환 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
80 lines
4.7 KiB
Python
80 lines
4.7 KiB
Python
"""Okseong P1 footing rebar (G3: B1~B12) -> centreline polylines for the generic builder rebar_polylines.py (GATE G3).
|
|
|
|
Inputs: 판독/g3_values.json (front / side / plan reading) and decisions F1-F5 (2026-10-14). UM (assembly chairs) not
|
|
modelled (F5). Output: 판독/g3_bars.json. Model axes: X along the coping, Y across, Z = EL x 1000, footing centre = origin.
|
|
"""
|
|
import json
|
|
from pathlib import Path
|
|
|
|
HERE = Path(__file__).resolve().parent
|
|
V = json.loads((HERE / "판독" / "g3_values.json").read_text(encoding="utf-8"))
|
|
bars = []
|
|
H = 4700.0 # a 9,400 / 2
|
|
|
|
|
|
def rb(d):
|
|
return ((2 * d if d <= 16 else 3.5 * d) + d) / 2
|
|
|
|
|
|
def add(mark, occ, pts, dia, L, src, r=None):
|
|
bars.append({"mark": mark, "occ": occ, "pts": [[round(v, 2) for v in p] for p in pts], "r": rb(dia) if r is None else r,
|
|
"design_length": L, "src": src})
|
|
|
|
|
|
def u_y(x, z, leg): # bar along Y at x, legs (+up / -down) at both ends
|
|
return [(x, -H, z + leg), (x, -H, z), (x, H, z), (x, H, z + leg)]
|
|
|
|
|
|
def u_x(y, z, leg):
|
|
return [(-H, y, z + leg), (-H, y, z), (H, y, z), (H, y, z + leg)]
|
|
|
|
|
|
# bottom / top mats: two marks of the same shape alternate from the edge (F3); laps j not modelled
|
|
for key, marks, axis, leg, L, src in (
|
|
("y_bars_bottom", ("B2", "B4"), "Y", 1800, 14070, "정면 하면 점 EL 12.325, 측면 다리 1,800"),
|
|
("x_bars_bottom", ("B6", "B8"), "X", 1950, 14370, "측면 하면 점 EL 12.3475, 정면 다리 1,950"),
|
|
("y_bars_top", ("B1", "B3"), "Y", -900, 12730, "정면 상면 점 EL 14.275, 측면 다리 900"),
|
|
("x_bars_top", ("B5", "B7"), "X", -975, 12880, "측면 상면 점 EL 14.2525, 정면 다리 975")):
|
|
z = V[key]["z"]
|
|
pos = V[key]["x"] if axis == "Y" else V["x_bars_bottom"]["y"] # top X: chain positions (= bottom, 75)
|
|
for i, v in enumerate(pos):
|
|
add(marks[i % 2], f"{axis.lower()}{v:+.1f}", u_y(v, z, leg) if axis == "Y" else u_x(v, z, leg), 29, L,
|
|
src + f"; {marks[0]}/{marks[1]} 교번, 겹이음 j 미모델 (F3 [추론])")
|
|
# mid layers: B12 = Y bars (lifted 19, F4), B11 = X bars; legs 100 down
|
|
for zs, xs in V["mid_y_bars"].items():
|
|
for x in xs:
|
|
add("B12", f"z{zs}x{x:+.0f}", u_y(x, float(zs) + 19, -100), 19, 10160, f"정면 중간 점 EL {float(zs) / 1000:.3f} (+19, F4 [추론])")
|
|
for zs, ys in V["mid_x_bars"].items():
|
|
for y in ys:
|
|
add("B11", f"z{zs}y{y:+.0f}", u_x(y, float(zs), -100), 19, 10160, f"측면 중간 점 EL {float(zs) / 1000:.3f} (F4 [추론])")
|
|
# B10 closed loops (start at the -X mid side)
|
|
c = V["b10_corner"]
|
|
for zs in V["b10_levels"]:
|
|
add("B10", f"z{zs:.0f}", [(-c, 0, zs), (-c, -c, zs), (c, -c, zs), (c, c, zs), (-c, c, zs), (-c, 0, zs)], 19, 41152,
|
|
"정면·측면 모서리 점, 재료표 9,448 x 9,448, 겹이음 560 x 6 미모델")
|
|
# B9: plan grid (lower half drawn) mirrored; the mirrored point nearest the centre is dropped (F1); 'ㄷ' in the YZ
|
|
# plane: top a 567 (F2) at 14.299, legs b 1,998 to 12.301, inward feet c 100 (L = a + 2b + 2c = 4,763)
|
|
# full grid from the drawn rule: columns x0 + 500 k (k 0..18); even columns on the 5 'even' rows, odd columns on the
|
|
# 4 'odd' rows (lower half), mirrored. Some lower-right symbols are hidden under a dashed detail circle (78 drawn).
|
|
drawn = V["b9_lower_half_drawn"]["points"]
|
|
x0 = min(x for x, _ in drawn)
|
|
rows_even = sorted({round(y, 1) for x, y in drawn if round((x - x0) / 500) % 2 == 0})
|
|
rows_odd = sorted({round(y, 1) for x, y in drawn if round((x - x0) / 500) % 2 == 1})
|
|
lower = [(x0 + 500 * k, y) for k in range(19) for y in (rows_even if k % 2 == 0 else rows_odd)]
|
|
mirror = [(x, -y) for x, y in lower]
|
|
drop = min(mirror, key=lambda p: (p[0] ** 2 + p[1] ** 2, p[0]))
|
|
grid = lower + [p for p in mirror if p != drop]
|
|
missing_drawn = [p for p in lower if not any(abs(p[0] - x) < 1 and abs(p[1] - y) < 1 for x, y in drawn)]
|
|
zt, zb, a, cc = 14275 + 24, 12325 - 24, 567.0, 100.0
|
|
for x, y in grid:
|
|
add("B9", f"x{x:+.0f}y{y:+.0f}", [(x, y - a / 2 + cc, zb), (x, y - a / 2, zb), (x, y - a / 2, zt), (x, y + a / 2, zt),
|
|
(x, y + a / 2, zb), (x, y + a / 2 - cc, zb)], 19, a + 2 * (zt - zb) + 2 * cc,
|
|
"기초 평면 EREC 기호(아래 절반 작도, 위 절반 대칭); a 567 평균 (F2 [추론])")
|
|
count = {}
|
|
for b in bars:
|
|
count[b["mark"]] = count.get(b["mark"], 0) + 1
|
|
out = {"bars": bars, "summary": {"bars": len(bars), "per_mark": count, "b9_dropped": drop, "b9_rows": [rows_even, rows_odd],
|
|
"b9_not_drawn_lower": missing_drawn}}
|
|
(HERE / "판독" / "g3_bars.json").write_text(json.dumps(out, ensure_ascii=False), encoding="utf-8")
|
|
print(json.dumps(out["summary"], ensure_ascii=False))
|