feat(view): 꺾인 코핑의 코핑 철근을 3D로 그린다
꺾인 코핑은 코핑 철근을 그리지 않았다. 다주형은 접힌 조각(pieces)을 각 구간 좌표로 그리고, T형은 같은 접기(coping-fold.ts)로 편 좌표 철근을 미터점에서 꺾어 그린다. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6a15a13fc7
commit
8f808f453e
2 files changed
+59
-25
No files matched your search
@@ -8,6 +8,7 @@ import type { PierInput } from '../src/core/types';
|
||||
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';
|
||||
|
||||
// 산외교 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));
|
||||
@@ -186,3 +187,23 @@ describe('꺾인 코핑 철근 접기 (B·C, 2026-11-10)', () => {
|
||||
expect(multicolCopingInfo(straight).bars.every((b) => b.pieces === undefined)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('꺾인 코핑 3D 철근 (E, 2026-11-10)', () => {
|
||||
const straightOf = (input: PierInput) => ({ ...input, ips: input.ips.map((q) => (q.name === 'IP4' ? { ...q, angleDeg: 0 } : q)) });
|
||||
const count = (rb: ReturnType<typeof buildRebar3D>, name: string) => rb.byName.get(name)?.length ?? 0;
|
||||
|
||||
it('a bent multi-column coping now draws its coping bars, runs across the kink in two pieces', () => {
|
||||
const bent = buildRebar3D(buildPier(p11()));
|
||||
for (const name of ['C1', 'C7', 'C9', 'C10', 'C12', 'C13', 'C15', 'C16']) expect(count(bent, name), name).toBeGreaterThan(0);
|
||||
const straight = buildRebar3D(buildPier(straightOf(p11())));
|
||||
expect(count(bent, 'C7')).toBeGreaterThan(count(straight, 'C7'));
|
||||
}, 60000);
|
||||
|
||||
it('a bent T형 coping draws its coping bars through the same fold', () => {
|
||||
const t = { ...p11(), type: 'T형' as const, columnCount: 1 };
|
||||
const bent = buildRebar3D(buildPier(t));
|
||||
const straight = buildRebar3D(buildPier(straightOf(t)));
|
||||
expect(count(bent, 'C1')).toBeGreaterThan(0);
|
||||
expect(count(bent, 'C1')).toBeGreaterThan(count(straight, 'C1'));
|
||||
}, 60000);
|
||||
});
|
||||
Reference in new issue
Block a user