fix(B06): 교차점 자동 줌아웃이 5m 사면 규칙에 잘리던 문제
자동 줌아웃 판정이 배수관용 slopeToeOffset(성토사면 5m에서 컷오프)을 써서, 사면이 5m를 넘는 측점은 필요 폭을 과소 산정했고 교차점이 화면 밖에 남았다(2026-08-23 사용자 보고). - _UI_Cross_Fit 재작성: 설계선(design_line)과 지반선의 **실제 교차점**을 0.1m 간격으로 훑어 찾는다(노면·노견·측구 구간은 건너뜀). 설계선이 만나기 전에 끝나면 끝단 기울기 차로 외삽하고 1m 올림. - 카드 자동 줌아웃(effectiveHalfWidth)이 이 값을 쓴다. 보유 샘플 밖으로는 넓히지 않는다(지반이 없어 빈 화면이 될 뿐). - [적용]은 전 측점 중 필요한 최대 폭까지 함께 넓힌다 — 20m를 넘으면 그 값으로 재생성해 각 카드가 자동 줌아웃할 지반을 확보한다. 자체검증: node tmp/tests/test_toe_extrapolate.mjs (사면 18m 교차점을 5m 컷오프 없이 탐색, 설계선이 15m에서 끊겨도 외삽으로 같은 자리), tsc --noEmit 통과. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
||||
type StandardCrossSection,
|
||||
} from "./B06_Section_Api_Fetch";
|
||||
import { createStationControls } from "./B06_Section_UI_Page_Station_Controls";
|
||||
import { maxToeFitHalfWidth } from "./B06_Section_UI_Cross_Fit";
|
||||
import { readAlignmentDraft } from "../B05_Profile/B05_Profile_UI_Profile_Edit";
|
||||
import {
|
||||
type CrossDesignChange,
|
||||
@@ -285,8 +286,11 @@ export async function renderB06ProfileCross(root: HTMLElement): Promise<void> {
|
||||
*/
|
||||
async function applyCrossHalfWidth(): Promise<void> {
|
||||
if (!sectionDetail) return;
|
||||
// 교차점이 샘플 밖인 측점이 있으면 그 폭까지 넓힌다(카드가 자동 줌아웃할 지반 확보).
|
||||
const requested = crossHalfWidth();
|
||||
if (requested !== undefined && !(await ensureSampledWidth(requested))) return;
|
||||
const needed = maxToeFitHalfWidth(sectionDetail.cross_sections);
|
||||
const target = Math.max(requested ?? 0, needed);
|
||||
if (target > 0 && !(await ensureSampledWidth(target))) return;
|
||||
if (!sectionDetail) return;
|
||||
stationControls.applyGlobalWidth(
|
||||
requested,
|
||||
|
||||
Reference in New Issue
Block a user