Files
Pier_v1/src/core/rebar/coping-main.ts
T
ypshimandClaude Haiku 5.5 9ba7b55eab feat(core,view): ③ 공통 설정 — fck and fy as inputs (spec §6.2)
- Material {fck, fyH, fyS}, defaults 27 / 400 / 500 as assumed values (I02).
  The rebar calculations take the material: the C7/C8 splice, the P2 development
  length, the P3 lap, and the B2 split use it instead of fixed numbers.
- ③ screen: 공통 설정 inputs with a note that the defaults are assumed (I02).
- Project file stores the material as an optional field; older files open with
  the defaults.
- Tests: fck 27 → 35 shortens the laps by √(27/35); the C7 piece follows fck;
  a non-default fy drops I02; the file round trip.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-22 12:06:11 +09:00

81 lines
2.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { DEFAULT_MATERIAL, hookLength, Material, NOMINAL_DIAMETER, spliceLength } from './common';
/**
* C1–C8 상·하면 주철근 (plan C3 continued). Source: RAG/코핑철근.md §5, 2026-10-22 최종 정리.
* Lengths in mm, heights in m (EL).
*/
export const MAIN = {
/** 피복 (최외측 철근 중심까지). */
cover: 100,
/** 기본 간격 s_m and minimum end gap g_min. */
spacing: 125,
endGapMin: 80,
/** 상면 단 간격 s_lay (EL, m) and its horizontal step (mm). */
layEl: 0.057,
layHorizontal: 57.2,
/** 90° 갈고리 l_h (mm, as in the document). */
hook: 472,
/** 하면 경사 구간 수평 길이 (mm, each side) and Level width. */
slopeEach: 5067.8,
level: 2100,
} as const;
export interface WidthLayout {
/** Edge bar centre from the coping side face: c + (d_st + d_m)/2. */
yE: number;
/** Clear length between the two edge bars: B − 2·y_e. */
S: number;
/** Bars inside the edge bars: n (so n + 3 in all, including the two edges and the two 110.5 ends). */
n: number;
/** Equal end gap g = (S − n·s_m)/2. */
g: number;
/** Bars in all: n + 3. */
count: number;
/** Bars per cycle (alternating): 12 / 12 for 24. */
cyclePerKind: number;
/** Dimension string, e.g. "127 · 110.5 · 21@125 · 110.5 · 127". */
text: string;
}
/** 폭 방향 배치 (코핑철근.md §5.1). d_st = H25 stirrup, d_m = H29 main. */
export function widthLayout(B: number, dSt = NOMINAL_DIAMETER.H25, dM = NOMINAL_DIAMETER.H29): WidthLayout {
const yE = MAIN.cover + (dSt + dM) / 2;
const S = B - 2 * yE;
const n = Math.floor((S - 2 * MAIN.endGapMin) / MAIN.spacing);
const g = (S - n * MAIN.spacing) / 2;
const count = n + 3;
const r = (v: number) => Math.round(v * 10) / 10;
return {
yE: r(yE),
S: r(S),
n,
g: r(g),
count,
cyclePerKind: count / 2,
text: `${r(yE)} · ${r(g)} · ${n}@${MAIN.spacing} · ${r(g)} · ${r(yE)}`,
};
}
/** Top-layer EL of the k-th row (k = 1, 2, 3): z_k = z_1 − (k − 1)·s_lay (m). */
export function topRowEl(z1: number, k: number): number {
return Math.round((z1 - (k - 1) * MAIN.layEl) * 1000) / 1000;
}
/** Length of one top bar on row k: path L − 2·(c + (k−1)·step), plus two 90° hooks. */
export function topBarLength(L: number, k: number): number {
const path = L - 2 * (MAIN.cover + (k - 1) * MAIN.layHorizontal);
return path + 2 * MAIN.hook;
}
/**
* Bottom bar C7·C8 (spliced at the column centre, 하면 겹침이음). Each piece:
* path/2 + l_s/2 + l_h, with path = 2·slope + Level and l_s = 1.3·l_d for H29 (nominal 28.6, with the material inputs).
*/
export function bottomPiece(m: Material = DEFAULT_MATERIAL): { path: number; ls: number; piece: number } {
const path = 2 * MAIN.slopeEach + MAIN.level;
const ls = spliceLength(NOMINAL_DIAMETER.H29, m.fyH, m.fck);
const lh = hookLength('main90', NOMINAL_DIAMETER.H29);
return { path, ls, piece: path / 2 + ls / 2 + lh };
}