feat(rebar): piece lengths for C9–C13 and P1·P2 so the 재료표 has no missing bars

A row can now carry pieces (length, count). C9, C10, C11 and C9·C11 사이 have U and 삿갓 pieces per position (3 loops each);
C12 and C13 have 일자 and ㄷ pieces per bar; P1 and P2 have their splice pieces, each counting all the bars. The
재료표 totals from the pieces, so no bar is left out. 개수 stays the 철근표 count; the piece count is kept beside it. The
삿갓 length h − 100 is an assumption (Q-K5) and is noted on the ④ screen.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-23 10:27:17 +09:00
1 parent 99c71b7277
commit e999b11a21
6 files changed
+98 -23

No files matched your search

+12 -4
View File
@@ -14,7 +14,7 @@ import { rebarSummary, type RebarRow } from './core/rebar/summary';
import { shearSegments } from './core/rebar/coping';
import { buildRebar3D, type RebarColorMode, type RebarScene } from './view/rebar3d';
import { DEFAULT_MATERIAL, FCK_MEMBERS, fyOf, GRADE_CHOICES, isAssumedMaterial, materialFrom, type BendFactors, type FckByMember, type FckMember, type GradeKey, type Material } from './core/rebar/common';
import { buildQuantity, quantityRows, type Quantity } from './core/rebar/quantity';
import { buildQuantity, quantityRows, type Quantity, type QuantityLine } from './core/rebar/quantity';
import { allVisibleChecked, setVisibleChecked, type TypeFilter } from './core/selection';
import { choose, defaultSummary, isSelectable, SHAPE_GROUPS, UNDEFINED_REASON, type MemberId } from './core/shape-options';
import { parseProject, SCHEMA_VERSION, serializeProject, type ProjectFile, type ProjectInfo } from './core/project';
@@ -890,7 +890,7 @@ function renderRebar(): void {
el('td', r.position),
el('td', r.direction),
el('td', r.shape),
el('td', r.length === null ? '—' : String(Math.round(r.length * 10) / 10)),
el('td', r.length === null ? (r.pieces ? '여러 길이' : '—') : String(Math.round(r.length * 10) / 10), undefined),
el('td', String(r.count)),
basisCell(r.basis),
el('td', r.note),
@@ -980,6 +980,14 @@ function quantityTargets(): Pier[] {
return active?.model ? [active] : [];
}
/** Length cell of a 재료표 line: the length, or 여러 길이 with the pieces on hover. */
function lengthCell(l: QuantityLine): HTMLTableCellElement {
if (l.length !== null) return el('td', String(l.length));
const cell = el('td', `여러 길이 (${l.pieces.length}종)`);
cell.title = l.pieces.map((p) => `${Math.round(p.length)} × ${p.count}`).join(' · ');
return cell;
}
function quantityTable(q: Quantity): HTMLTableElement {
const table = el('table', undefined, 'grid-table rebar-table');
const head = el('thead');
@@ -993,7 +1001,7 @@ function quantityTable(q: Quantity): HTMLTableElement {
for (const l of d.lines) {
body.appendChild(el('tr')).append(
el('td', `SD${g.grade}`), el('td', l.name, 'bar-no'), el('td', l.shape), el('td', l.size), el('td', String(l.count)),
el('td', String(l.length)), el('td', l.totalM.toFixed(1)), el('td', l.kgPerM.toFixed(3)), el('td', l.kg.toFixed(1)),
lengthCell(l), el('td', l.totalM.toFixed(1)), el('td', l.kgPerM.toFixed(3)), el('td', l.kg.toFixed(1)),
);
}
body.appendChild(el('tr', undefined, 'subtotal')).append(el('td', ''), el('td', `${d.size} 소계`), el('td', ''), el('td', d.size), el('td', ''), el('td', ''), el('td', d.totalM.toFixed(1)), el('td', ''), el('td', d.kg.toFixed(1)));
@@ -1011,7 +1019,7 @@ function renderQuantityScreen(): void {
const targets = quantityTargets();
$('step4-status').textContent = targets.length ? `${targets.length}기` : '예정';
$('quantity-note').textContent = targets.length
? `${targets.length}기 · 할증 ${state.material.waste}% (기본 0%, 가정). 체크한 교각 기준이고, 체크가 없으면 현재 교각입니다.`
? `${targets.length}기 · 할증 ${state.material.waste}% (기본 0%, 가정). 삿갓 길이는 h − 100으로 가정(Q-K5). 체크한 교각 기준이고, 체크가 없으면 현재 교각입니다.`
: '계산된 교각이 없습니다. 교각을 생성하세요.';
let kg = 0;
let kgWithWaste = 0;