fix(B06): 구조물 추가 시 유토곡선도 같이 갱신
유토곡선은 카드보다 먼저 계산돼, 구조물을 넣으면 카드 면적만 바뀌고 최종 누가토량은 옛 값으로 남았음. 구조물이 바뀌면 면적을 먼저 다시 얹고 그리게 순서를 바로잡음. 검증: 3+0.0 성토 8.06 → 5.73㎡, 최종 누가토량 553.4 → 546.4㎥ (저장 전, 즉시). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -62,6 +62,7 @@ import {
|
|||||||
wallSpecsFrom,
|
wallSpecsFrom,
|
||||||
type WallStructureInput,
|
type WallStructureInput,
|
||||||
} from "@util/common_util_structure_walls";
|
} from "@util/common_util_structure_walls";
|
||||||
|
import { applyStructureAreaRows, structureAreaRows } from "./B06_Section_Structure_Layouts";
|
||||||
import {
|
import {
|
||||||
fetchStructureTypes,
|
fetchStructureTypes,
|
||||||
readPendingStructures,
|
readPendingStructures,
|
||||||
@@ -361,6 +362,15 @@ export async function renderB06ProfileCross(root: HTMLElement): Promise<void> {
|
|||||||
if (!projectId || currentRouteId === null) return;
|
if (!projectId || currentRouteId === null) return;
|
||||||
try {
|
try {
|
||||||
await applyDraftWalls(sectionDetail);
|
await applyDraftWalls(sectionDetail);
|
||||||
|
// 면적을 **먼저** 다시 얹는다 — 유토곡선은 카드보다 앞서 계산되므로, 카드 렌더가
|
||||||
|
// 고치는 것만으로는 곡선이 옛 면적으로 남는다(2026-09-06 실측: 카드는 바뀌는데
|
||||||
|
// 최종 누가토량이 그대로였음).
|
||||||
|
if (sectionDetail) {
|
||||||
|
applyStructureAreaRows(
|
||||||
|
sectionDetail.cross_sections,
|
||||||
|
structureAreaRows(sectionDetail.cross_sections),
|
||||||
|
);
|
||||||
|
}
|
||||||
renderSectionDetail();
|
renderSectionDetail();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const detail = error instanceof Error ? ` ${error.message}` : "";
|
const detail = error instanceof Error ? ` ${error.message}` : "";
|
||||||
|
|||||||
Reference in New Issue
Block a user