fix(rebar): 확대기초 철근 — 구간별 3D 위치, 기둥 소속, 길이별 행, 2조각 수량
- 3D: 확대기초 철근을 늘 구간 0에 그려, 꺾인 교각의 구간 1 기초(산외교 P11 ③)는 철근이 없고 구간 0 기초에 겹쳐 그려졌다 - 기초에 속한 기둥을 같은 구간 안에서만 찾는다 (B9 기둥 구역이 다른 구간 기둥으로 잘못 빠지던 것) - 길이가 다른 기초의 철근을 가장 긴 길이 하나로 합치지 않고 길이별 조각으로 둔다 - 정척 초과 2조각 이음 행이 철근 한 개당 한 조각만 중량에 넣던 것을 두 조각으로 (P1 B6 31개 → 62조각) Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
33aa2d9a61
commit
ed84761449
3 files changed
+71
-21
No files matched your search
@@ -9,6 +9,8 @@ import { rebarSummary } from '../src/core/rebar/summary';
|
||||
import { multicolCopingInfo } from '../src/core/rebar/multicol-coping';
|
||||
import { copingFold, inWedge, isTransverse } from '../src/core/rebar/coping-fold';
|
||||
import { buildRebar3D } from '../src/view/rebar3d';
|
||||
import { shearB9 } from '../src/core/rebar/footing';
|
||||
import { loadP1 } from './helpers';
|
||||
|
||||
// 산외교 P11 (샘플01) with the coping bent 8.767° at IP4 (2026-11-10 검토): back ⑥ g 11.64, ⑦ g 18.49, kink g 15.14.
|
||||
const SAMPLE = fileURLToPath(new URL('../project_data/01_엑셀/샘플01_산외교_교각입력데이터.xlsx', import.meta.url));
|
||||
@@ -207,3 +209,44 @@ describe('꺾인 코핑 3D 철근 (E, 2026-11-10)', () => {
|
||||
expect(count(bent, 'C1')).toBeGreaterThan(count(straight, 'C1'));
|
||||
}, 60000);
|
||||
});
|
||||
|
||||
describe('꺾인 교각의 확대기초 철근 (2026-11-10)', () => {
|
||||
// 3주형 as in the project (산외교 P11): columns ① ② share one 18.05 m footing in stretch 0, ③ has a 10.4 m footing in stretch 1.
|
||||
const m = buildPier({ ...p11(), type: '3주형', columnCount: 3 });
|
||||
|
||||
it('each footing draws its rebar in its own stretch', () => {
|
||||
const rb = buildRebar3D(m);
|
||||
const footingNames = /^B\d/;
|
||||
const ks = new Set(rb.records.filter((r) => footingNames.test(r.name)).map((r) => r.k));
|
||||
expect(m.footings.map((f) => f.k)).toEqual([0, 1]);
|
||||
expect(ks).toEqual(new Set([0, 1]));
|
||||
}, 60000);
|
||||
|
||||
it('B9 leaves out only the column zones of the same stretch', () => {
|
||||
const rows = rebarSummary(m).rows;
|
||||
const expected = m.footings.reduce((sum, f) => {
|
||||
const cols = m.columns.filter((c) => c.k === f.k && Math.abs(c.s - f.s) <= f.length / 2).map((c) => (c.s - f.s) * 1000);
|
||||
return sum + shearB9(f.length * 1000, f.width * 1000, (f.top - f.bottom) * 1000, cols, 2000, m.footingRebar).count;
|
||||
}, 0);
|
||||
expect(rows.find((r) => r.name === 'B9')!.count).toBe(expected);
|
||||
});
|
||||
|
||||
it('footings of different lengths keep each length (no longest-for-all), spliced bars count both pieces', () => {
|
||||
const rows = rebarSummary(m).rows.filter((r) => r.member === 'footing');
|
||||
expect(m.footings.map((f) => f.length)).toEqual([18.05, 10.4]);
|
||||
const b5 = rows.find((r) => r.name === 'B5')!;
|
||||
expect(b5.pieces!.length).toBe(2);
|
||||
const total = b5.pieces!.reduce((s, p) => s + p.count, 0);
|
||||
// The 18.05 m footing's bars are two pieces each; the 10.4 m footing's one piece.
|
||||
expect(total).toBeGreaterThan(b5.count);
|
||||
});
|
||||
});
|
||||
|
||||
describe('정척 초과 확대기초 철근의 2조각 (2026-11-10)', () => {
|
||||
it('P1 B6 (13646 > 12000): 31 bars of 2 pieces 7776 each, so the weight counts 62 pieces', () => {
|
||||
const b6 = rebarSummary(buildPier(loadP1())).rows.find((r) => r.name === 'B6')!;
|
||||
expect(b6.count).toBe(31);
|
||||
expect(b6.length!).toBeCloseTo(7776, 0);
|
||||
expect(b6.pieces).toEqual([{ length: b6.length, count: 62 }]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user