diff --git a/B06_Section/B06_Section_UI_Cross_Culvert_Wire.ts b/B06_Section/B06_Section_UI_Cross_Culvert_Wire.ts index 7c66da84..65969bc3 100644 --- a/B06_Section/B06_Section_UI_Cross_Culvert_Wire.ts +++ b/B06_Section/B06_Section_UI_Cross_Culvert_Wire.ts @@ -392,7 +392,23 @@ export function computeCardCulvert( )?.revetShift ?? ownerInput; // 연동을 풀어도 **같은 기슭막이**다 — 단 수는 소유 측점 것이고, 이 측점이 손댄 // 벽만 자기 값으로 선다(2026-08-30 사용자). - const ownerAdjusts = detached ? detachedAdjusts(section, ownerApplied, revetOffset) : ownerApplied; + const merged = detached ? detachedAdjusts(section, ownerApplied, revetOffset) : ownerApplied; + // 이 측점까지 오지 않는 단은 **계산에서부터** 뺀다. 다 세워 놓고 그림만 지우면 + // (`trimLinkedLayout`) 성토부선은 원래 단 수로 계산된 채 남아, 마지막 단 뒤 성토면이 + // 갱신되지 않는다(2026-08-30 사용자 지적: 우측 독립 기슭막이에서 단이 없어져도 + // 그 위 성토면이 그대로). 단은 위에서부터 쌓이므로 **덮이는 앞부분만** 남긴다. + const tierPrefix = (kind: "extra" | "bextra", total: number): number => { + let count = 0; + while (count < total && spanCovers(tierSpanOf(link.source, `${kind}${count}`), link.deltaM)) { + count += 1; + } + return count; + }; + const ownerAdjusts: WallAdjustSet = merged && { + ...merged, + extras: merged.extras.slice(0, tierPrefix("extra", merged.extras.length)), + basinExtras: merged.basinExtras.slice(0, tierPrefix("bextra", merged.basinExtras.length)), + }; // 경사 해제 = **수평(Z 일원화)**. 3D 링만 눕히는 게 아니라 횡단도에서도 기준벽 // 상단 표고를 소유 측점과 같게 맞춘다(2026-08-30 사용자 확정 — 종전 "3D 전용" // 규정을 갈아엎는다). 차이는 노견 확장 구간이 흡수하므로 성토선은 이 측점