fix(view): 지형 모델이 없을 때 60 m 사각판 대신 교각별 지반고 선 표시
- 지형 격자가 없으면 교각 지반고 위치에 얇은 선(코핑 길이 + 여유 2 m)만 그림 - 전체 보기에서도 지형이 없으면 교각별 지반고 선을 표시, 지형이 있으면 공유 격자만 표시 - 부재 표시 '지반' 체크박스는 두 경우 모두 동작 - 테스트: 얇은 선 위치와 길이, 지형 있을 때 선 미표시 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
765384cd71
commit
e5d8002c79
5 files changed
+61
-15
No files matched your search
+10
-6
@@ -31,11 +31,15 @@ describe('buildAllPiers', () => {
|
||||
expect(b.max.distanceTo(a.max)).toBeLessThan(1e-4);
|
||||
});
|
||||
|
||||
it('hides each pier ground plane and keys scenes by name', () => {
|
||||
const all = buildAllPiers([{ name: 'P1', model }]);
|
||||
expect([...all.scenes.keys()]).toEqual(['P1']);
|
||||
expect(all.scenes.get('P1')!.parts.ground.visible).toBe(false);
|
||||
expect(all.terrain).toBeNull();
|
||||
expect(all.view.size).toBeGreaterThan(0);
|
||||
it('keeps each pier 지반고 line without terrain, and hides it when the shared terrain is drawn', () => {
|
||||
const without = buildAllPiers([{ name: 'P1', model }]);
|
||||
expect([...without.scenes.keys()]).toEqual(['P1']);
|
||||
expect(without.scenes.get('P1')!.parts.ground.visible).toBe(true);
|
||||
expect(without.terrain).toBeNull();
|
||||
expect(without.view.size).toBeGreaterThan(0);
|
||||
|
||||
const withTerrain = buildAllPiers([{ name: 'P1', model }], { origin: [259815.676, 179088.094], step: 5, nx: 2, ny: 2, z: [30, 31, 32, 33] });
|
||||
expect(withTerrain.scenes.get('P1')!.parts.ground.visible).toBe(false);
|
||||
expect(withTerrain.terrain).not.toBeNull();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user