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>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-22 12:06:11 +09:00
1 parent 64d415f891
commit 9ba7b55eab
11 files changed
+123 -16

No files matched your search

+8 -5
View File
@@ -4,7 +4,7 @@ import { bottomPiece, topBarLength, widthLayout } from './coping-main';
import { shearBars, sideRows, C14_COUNTS, c14Total, STEP_BAR_COUNTS, shearULength, SIDE_LENGTHS, STEP_LENGTHS, capLength, PIECES_PER_POSITION } from './coping';
import { columnRebar, COLUMN_P1 } from './column';
import { bottomBars, crossBars, sideBars, assemblyBars, shearB9 } from './footing';
import { splitPieces } from './common';
import { DEFAULT_MATERIAL, isAssumedMaterial, Material, splitPieces } from './common';
/** One line of a 철근표. length is null where the document gives no length yet. */
export interface RebarRow {
@@ -28,9 +28,12 @@ export const STANDARD_BAR = 12000;
* 철근표 for one pier (③ screen v1): bearing blocks, coping, column, footing. Built from the generated model.
* Values come from the document rules in src/core/rebar/*. B9 (전단철근) is not computed yet.
*/
export function rebarSummary(model: PierModel): { rows: RebarRow[]; warnings: RebarWarning[] } {
export function rebarSummary(model: PierModel, m: Material = DEFAULT_MATERIAL): { rows: RebarRow[]; warnings: RebarWarning[] } {
const rows: RebarRow[] = [];
const warnings: RebarWarning[] = [];
if (isAssumedMaterial(m)) {
warnings.push({ code: 'I02', message: `fck ${m.fck} MPa · fy ${m.fyH} / ${m.fyS} MPa는 가정값입니다. 정착·이음 길이에 반영됩니다. 공통 설정에서 확인하세요.` });
}
const L = model.copingL * 1000;
const B = model.copingB * 1000;
@@ -46,7 +49,7 @@ export function rebarSummary(model: PierModel): { rows: RebarRow[]; warnings: Re
for (const [name, k] of [['C1', 1], ['C2', 2], ['C3', 3], ['C4', 1], ['C5', 2], ['C6', 3]] as const) {
rows.push({ member: 'coping', name, size: 'H29', count: perRow, length: topBarLength(L, k), note: '상면, 이음 무시' });
}
const bottom = bottomPiece();
const bottom = bottomPiece(m);
rows.push({ member: 'coping', name: 'C7', size: 'H29', count: perRow, length: bottom.piece, note: '하면, 2조각 겹침이음' });
rows.push({ member: 'coping', name: 'C8', size: 'H29', count: perRow, length: bottom.piece, note: '하면, 2조각 겹침이음' });
const shear = shearBars(L);
@@ -71,7 +74,7 @@ export function rebarSummary(model: PierModel): { rows: RebarRow[]; warnings: Re
rows.push({ member: 'coping', name: 'C16', size: 'H19', count: STEP_BAR_COUNTS.C16, length: STEP_LENGTHS.C16[0], note: `계단부, 3·4구간 (${STEP_LENGTHS.C16[0]} / ${STEP_LENGTHS.C16[1]})` });
// Column (기둥철근.md · plan C4), P1 defaults
const col = columnRebar(COLUMN_P1);
const col = columnRebar(COLUMN_P1, m);
rows.push({ member: 'column', name: 'P1', size: 'S32', count: col.mainP1, length: null, note: '외측 r 875, 마디 4697.5 + 갈고리 525 / 3000 ×3 / 3147 (코핑 밖 마디는 기둥철근.md §3.2)' });
rows.push({ member: 'column', name: 'P2', size: 'S32', count: col.mainP2, length: null, note: '내측 r 843.2, 마디 4847.5 / 3000 ×3 / 2389' });
rows.push({ member: 'column', name: '커플러', size: 'L150 Ø60', count: col.couplers, length: 150, note: '@3000, P2 +150' });
@@ -88,7 +91,7 @@ export function rebarSummary(model: PierModel): { rows: RebarRow[]; warnings: Re
const Hf = (f.top - f.bottom) * 1000;
// Bars longer than the standard length are split in two (추천안, Q-B6). The count is still the bar count.
const addBar = (b: { name: string; size: string; count: number; length: number }, note: string) => {
const split = splitPieces(b.length, 25.4, 500, 27, STANDARD_BAR);
const split = splitPieces(b.length, 25.4, m.fyS, m.fck, STANDARD_BAR);
if (split) {
rows.push({ member: 'footing', name: b.name, size: b.size, count: b.count, length: split.pieceLength, note: `${note}, 2조각 이음 (추천안, 겹침 ${Math.round(split.lap)})` });
warnings.push({ code: 'RB-F08', message: `${b.name} 길이 ${Math.round(b.length)} mm > 정척 ${STANDARD_BAR} mm: 2조각 이음을 추천안으로 적용 (Q-B6).` });