fix(rebar): pass the ③ material to C15/C16, coping bottom and column bars
The stair bars in the 철근표 and the 3D model, and the 3D bottom and column bars, were built with the default fck, so a changed fck did not reach them. buildRebar3D now takes the material, and a material change rebuilds the scene. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b35f5ff0ed
commit
d8fd6adcf0
4 files changed
+25
-7
No files matched your search
@@ -2,6 +2,7 @@ import { describe, expect, it } from 'vitest';
|
||||
import * as THREE from 'three';
|
||||
import { buildPier } from '../src/core/geometry';
|
||||
import { buildRebar3D } from '../src/view/rebar3d';
|
||||
import { DEFAULT_MATERIAL } from '../src/core/rebar/common';
|
||||
import { loadP1 } from './helpers';
|
||||
|
||||
const rb = buildRebar3D(buildPier(loadP1()));
|
||||
@@ -103,3 +104,18 @@ describe('확대기초 B9 · B10 · B11 · B12 in 3D (확대기초철근 (1).md
|
||||
expect(rb.byName.get('B12')!.length).toBe(47 * 3);
|
||||
});
|
||||
});
|
||||
|
||||
describe('3D 철근 모델은 ③ 공통 설정 fck를 따른다', () => {
|
||||
const model = buildPier(loadP1());
|
||||
const height = (scene: ReturnType<typeof buildRebar3D>, name: string) => {
|
||||
const b = new THREE.Box3();
|
||||
for (const mesh of scene.byName.get(name)!) b.expandByObject(mesh);
|
||||
return b.max.y - b.min.y;
|
||||
};
|
||||
|
||||
it('C15 stair bars are shorter with a higher fck, as in the 철근표 (stepDevLength)', () => {
|
||||
const base = height(buildRebar3D(model), 'C15');
|
||||
const high = height(buildRebar3D(model, { ...DEFAULT_MATERIAL, fck: 35 }), 'C15');
|
||||
expect(high).toBeLessThan(base - 0.05);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user