- logic 새 파일 9 — B06_Section_Cross_Culvert · _Culvert_Geom · _Culvert_Extra · _Culvert_Tiers · _Culvert_Types · _Culvert_Wire · _Box_Geom · _Ford_Geom · _Ford_Pavement - 그림 파일(UI_Cross_Culvert · _Culvert_Types · _Box · _Ford · _Ford_Pavement)은 받은 좌표로 그리기만 · 관 겹 꼭짓점(pipeShellCorners) · 물넘이 노면 끝 · 월류선 · 유출 성토선은 logic 으로 - 옛 순수 기하 6 파일(UI_Cross_Culvert_Geom · _Extra · _Tiers · _Wire · _Box_Geom · _Ford_Geom) 지움 · 부르는 쪽(B05 Corridor · Structure_Layouts · Route_Carry_Patch · Wall 등)은 import 줄만 - test_472_3 GEOMETRY_PULLS 자기 11 줄 + 더는 안 끌리는 Design_Surface 1 줄 걷음 - 시험 · helper 경로를 새 logic 파일로 — 옮긴 파일을 가리키던 낡은 경로 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
46 lines
1.7 KiB
Python
46 lines
1.7 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""433-19 · 433-20 — 구간값 죽은 길 걷음 · 표 위 CAD 요소 한도(서버 2000 짝).
|
|
|
|
못박는 것
|
|
- 구간값 제어에 기준벽 `update`(culvertopt 큐 쓰기) 없음 · 구간 줄은 다단 벽만(444 관 초안 한 벌).
|
|
- 표 위 CAD 한도 = 서버 `CrossNoteCad.entities max_length` · 넘으면 초안에 안 쓰고 알림.
|
|
"""
|
|
|
|
import re
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
B06 = ROOT / "B06_Section"
|
|
|
|
|
|
def _read(name: str) -> str:
|
|
return (B06 / name).read_text(encoding="utf-8")
|
|
|
|
|
|
def test_구간값_제어에_culvertopt_큐_쓰기_없음():
|
|
span = _read("B06_Section_UI_Page_Span_Control.ts")
|
|
assert "culvertOptions" not in span
|
|
assert "update: (section, role" not in span
|
|
wire = _read("logic/B06_Section_Cross_Culvert_Wire.ts")
|
|
assert not re.search(r"^\s*update: \(section: CrossSection, role", wire, re.M)
|
|
view = _read("B06_Section_UI_Cross_View_Structure.ts")
|
|
assert "structureSpan?.update(" not in view
|
|
|
|
|
|
def test_CAD_한도_서버와_같음():
|
|
schema = _read("B06_Section_Schema.py")
|
|
server = re.search(
|
|
r"class CrossNoteCad\(BaseModel\):.*?entities:.*?max_length=(\d+)", schema, re.S
|
|
)
|
|
cad = _read("B06_Section_UI_Cross_Detail_Cad.ts")
|
|
screen = re.search(r"NOTE_CAD_MAX_ENTITIES = (\d+)", cad)
|
|
assert server and screen and server.group(1) == screen.group(1)
|
|
|
|
|
|
def test_CAD_한도_넘으면_초안에_안_씀():
|
|
cad = _read("B06_Section_UI_Cross_Detail_Cad.ts")
|
|
body = cad[cad.index("function writeNoteCad(") :]
|
|
guard = body.index("NOTE_CAD_MAX_ENTITIES")
|
|
assert guard < body.index("structure_note_cad = cad")
|
|
assert "showToast(" in body[guard : body.index("structure_note_cad = cad")]
|