- 묶음 출력 읽기만 · ground · cross 단계 함수를 그 자리 측점 하나로 다시 부름(파생 저장 · 캐시 안 씀) - 그 자리 측점 = [측점 추가] 뒤 묶음 측점과 같은 틀 · 반경 · 확폭(logic/design_pipeline_probe_station) - 격자 없음 · 분석 지형 다름 = 서버 미리 뜨기 + 「저장 계획선 기준」 한 줄 · 창 글에 계획고 - 묶음 cross 차례마다 떠 있는 창 다시 그림 - 거울 시험 test_368_4(곡선표 있음 · 없음 · 직선 · 곡선 안) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013QyNXY2TUKXCFMwAca2APG
55 lines
1.9 KiB
Python
55 lines
1.9 KiB
Python
"""368-4 원지반 점 작은 창 = 지금 계획선 — 아무 누가거리 측점 하나(`probeStation`)가
|
|
[측점 추가] 뒤 묶음 측점(`buildStations` + 추가 측점)과 같은 자리 · 틀 · 방위 · 반경 · 확폭 ·
|
|
열쇠(곡선표 있음 · 없음 · 직선 · 곡선 안).
|
|
|
|
TS 쪽 = `helper_368_4_probe_station.cjs`(Node). 노선 · 관 · 구조물은 344-3 거울 시험 것을 그대로 씀.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
import subprocess
|
|
import tempfile
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
import test_344_3_pipeline_stations_mirror as base
|
|
|
|
HERE = Path(__file__).resolve().parent
|
|
|
|
pytestmark = base.pytestmark
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def out() -> list[dict]:
|
|
job = {
|
|
"line": base.LINE,
|
|
"curves": base.CURVES,
|
|
"pipes": base.PIPES,
|
|
"structures": base.STRUCTURES,
|
|
"types": base._types(),
|
|
"at": [77.0, 205.0, 213.0], # 직선 · 곡선 안 · 곡선 끝 테이퍼
|
|
}
|
|
with tempfile.TemporaryDirectory() as folder:
|
|
path = Path(folder) / "job.json"
|
|
path.write_text(json.dumps(job), encoding="utf-8")
|
|
proc = subprocess.run( # noqa: S603 — 고정 실행 파일
|
|
["node", str(HERE / "helper_368_4_probe_station.cjs"), str(path)],
|
|
capture_output=True,
|
|
text=True,
|
|
encoding="utf-8",
|
|
timeout=60,
|
|
)
|
|
assert proc.returncode == 0, proc.stderr
|
|
return json.loads(proc.stdout)
|
|
|
|
|
|
def test_작은_창_측점_묶음_추가_측점과_같음(out) -> None:
|
|
assert len(out) == 6
|
|
for case in out:
|
|
assert case["after"] is not None, case
|
|
assert case["mine"] == case["after"], case
|
|
# 곡선 안 측점은 반경 · 확폭이 실제로 섬(빈 값만 대조하지 않게)
|
|
assert any(case["mine"]["planRadiusM"] for case in out)
|
|
assert any(case["mine"]["curveWideningM"] > 0 for case in out)
|