feat(abut): ③ 교대 반투명 보기 · 교대 저판 전용 fck
- ③ 철근배근에서 교대 부재·지반도 교각처럼 반투명(0.5, 깊이 쓰기 끔). setRebarViewOn으로 공통화, 끄면 원래 불투명도 복원(지반 0.35 유지) - 교대 저판 fck(abutFooting, 기본 27)를 교각 기초 fck와 분리. ② 확대기초·말뚝 카드에 입력, ③ 저판 배근·이음 길이에 반영 - 테스트 713개 통과 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b06bf368b6
commit
603066f370
6 files changed
+89
-24
No files matched your search
@@ -8,6 +8,7 @@ import { parseAbutments, toAbutInput } from '../src/core/abut/parse';
|
||||
import { buildMembers } from '../src/core/abut/members';
|
||||
import { buildWings } from '../src/core/abut/wings';
|
||||
import { abutPlacement, buildAbutGroup, cameraForBox, covers } from '../src/view/abut-scene';
|
||||
import { setRebarViewOn } from '../src/view/scene';
|
||||
import type { TerrainGrid } from '../src/core/ground-model';
|
||||
|
||||
const RAG = fileURLToPath(new URL('../../../RAG/운곡교P1입력.xlsx', import.meta.url));
|
||||
@@ -132,3 +133,37 @@ describe('교대 선택 시 카메라', () => {
|
||||
expect(cam.position.distanceTo(cam.target)).toBeGreaterThan(12);
|
||||
});
|
||||
});
|
||||
|
||||
describe('③ 배근 보기 반투명 (교각과 같음, 2026-11-04)', () => {
|
||||
const g = buildAbutGroup(model, members, wings, undefined, GROUND_EL);
|
||||
const mats = () => {
|
||||
const out: THREE.MeshStandardMaterial[] = [];
|
||||
g.traverse((o) => {
|
||||
if (o instanceof THREE.Mesh) out.push(o.material as THREE.MeshStandardMaterial);
|
||||
});
|
||||
return out;
|
||||
};
|
||||
const ground = () => (g.getObjectByName('ground') as THREE.Group).children[0] as THREE.Mesh;
|
||||
|
||||
it('turns every member and the ground to half opacity with depth writes off', () => {
|
||||
setRebarViewOn(g, true);
|
||||
for (const m of mats()) {
|
||||
expect(m.opacity).toBe(0.5);
|
||||
expect(m.transparent).toBe(true);
|
||||
expect(m.depthWrite).toBe(false);
|
||||
}
|
||||
});
|
||||
|
||||
it('restores each part: members opaque, the ground at 0.35 without depth writes', () => {
|
||||
setRebarViewOn(g, false);
|
||||
const groundMat = ground().material as THREE.MeshStandardMaterial;
|
||||
for (const m of mats()) {
|
||||
if (m === groundMat) continue;
|
||||
expect(m.opacity).toBe(1);
|
||||
expect(m.transparent).toBe(false);
|
||||
expect(m.depthWrite).toBe(true);
|
||||
}
|
||||
expect(groundMat.opacity).toBe(0.35);
|
||||
expect(groundMat.depthWrite).toBe(false);
|
||||
});
|
||||
});
|
||||
@@ -1,15 +1,15 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { fckChanged, IMPORTED_FCK } from '../src/core/rebar/common';
|
||||
import { DEFAULT_MATERIAL, fckChanged, IMPORTED_FCK, materialFor } from '../src/core/rebar/common';
|
||||
|
||||
describe('IMPORTED_FCK (교각도 기준 부재별 기본 fck)', () => {
|
||||
it('is 40 for 기둥·코핑 and 27 for 확대기초', () => {
|
||||
expect(IMPORTED_FCK).toEqual({ column: 40, coping: 40, footing: 27 });
|
||||
describe('IMPORTED_FCK (교각도 · 교대도 기준 부재별 기본 fck)', () => {
|
||||
it('is 40 for 기둥·코핑, 27 for 확대기초 and 27 for 교대 저판', () => {
|
||||
expect(IMPORTED_FCK).toEqual({ column: 40, coping: 40, footing: 27, abutFooting: 27 });
|
||||
});
|
||||
});
|
||||
|
||||
describe('fckChanged (기본과 다르면 주황색)', () => {
|
||||
it('is false at the imported default', () => {
|
||||
expect(fckChanged({ column: 40, coping: 40, footing: 27 }, 'coping')).toBe(false);
|
||||
expect(fckChanged({ column: 40, coping: 40, footing: 27, abutFooting: 27 }, 'coping')).toBe(false);
|
||||
});
|
||||
|
||||
it('is true when the member differs from its imported default', () => {
|
||||
@@ -21,3 +21,15 @@ describe('fckChanged (기본과 다르면 주황색)', () => {
|
||||
expect(fckChanged({}, 'column')).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('교대 저판 fck (교각 기초와 별도, 2026-11-04)', () => {
|
||||
it('follows abutFooting, not the pier footing', () => {
|
||||
const byMember = { footing: 30, abutFooting: 35 };
|
||||
expect(materialFor(DEFAULT_MATERIAL, byMember, 'abutFooting').fck).toBe(35);
|
||||
expect(materialFor(DEFAULT_MATERIAL, byMember, 'footing').fck).toBe(30);
|
||||
});
|
||||
|
||||
it('falls back to the 공통 fck when unset (old project files)', () => {
|
||||
expect(materialFor({ ...DEFAULT_MATERIAL, fck: 24 }, { footing: 30 }, 'abutFooting').fck).toBe(24);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user