feat(ground): draw the terrain grid around the piers in the 3D view
- ground-model.ts: read schema 2 terrain_grid (origin, step, nx, ny, z), checked the same way as the stored project form; schema 1 is still read. - view/terrain.ts: the grid as a mesh in pier-scene coordinates (x = E − pivot E, z = −(N − pivot N), y = EL), same as the pier frame. Cells with a missing corner are not drawn. - scene.ts: draws the terrain in place of the 60 m plane when the model has a grid; the camera fits the members, not the terrain. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
be76425c8f
commit
bfd41d7c8d
6 files changed
+200
-16
No files matched your search
+2
-1
@@ -317,7 +317,7 @@ function setupScene(): void {
|
||||
rebar3d.group.visible = state.stage === 'rebar';
|
||||
rebar3d.setColorMode(state.rebarColor);
|
||||
world.add(rebar3d.group);
|
||||
const scene = buildPierScene(pier.model);
|
||||
const scene = buildPierScene(pier.model, groundModel?.terrainGrid);
|
||||
for (const key of Object.keys(state.visible) as PartName[]) {
|
||||
scene.parts[key].visible = state.visible[key];
|
||||
}
|
||||
@@ -1512,6 +1512,7 @@ function renderGroundModel(box: HTMLDivElement, pier: Pier): void {
|
||||
try {
|
||||
groundModel = parseGroundModel(await file.text());
|
||||
setStatus(`${file.name}에서 교각 ${groundModel.piers.length}개의 지반 모델 값을 불러왔습니다. 적용은 교각별로 누르세요.`);
|
||||
setupScene();
|
||||
renderAll();
|
||||
} catch (err) {
|
||||
setError(`지반 모델을 읽지 못했습니다: ${(err as Error).message}`);
|
||||
|
||||
Reference in new issue
Block a user