Files
Aislo/resources/tester/test_m02_router_drawing.py
T
eomsangdonandClaude Opus 5.5 b4f8515b5d chore(853-2): 걸음 0 묶음 ① — 화면 0 서버 길 16 · 그 길만 부르던 본체 · 죽은 화면 래퍼 걷음
- 길: sangeun from-line · formula-check · copy · equation(셋) · block · labor copy · 프로젝트 양식 reset · apply · save-as · sources · drawing-import · drawing-fields · logic-lib machine-parts · logic-lib/auto
- 본체: Calc.from_line · Formula.check_doc 외 셋 · Equation 읽기 · 미리 셈 · Equation_Full 파일 · Block 끊기 · 잇기 · 수식 탭 · Labor_Copy.preview · Router_Layers 가져오기 도우미
- 화면: Api_Fetch 래퍼 여덟 · sangeunFromLine
- 시험: 죽은 길만 보던 796-2c · 796-2e 파일 지움 · 함수째 지움(715-3 · 733-2 · 792-1 · 796-2b · router_drawing · template_layers · structure_panel 글자 시험) · 살아 있는 결과는 [저장] 길로 고침(795-2 · 796-2b) · 813-2 = M01 parts.of_machine 바로
- 남김: Sangeun_Copy.preview(옛 엔진 셈 거울 — 걸음 2) · B07 이 쓰는 reset_project · B09 가 쓰는 _company_projects
- 검증: /openapi.json 524 → 508(뜻한 16 만) · 빌더 --check 같음 · 핵심 시험 99 통과 · 관련 시험 687 통과 · typecheck 0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 11:36:15 +09:00

26 lines
1.1 KiB
Python

"""M02 구조물 도면에 얹는 도각 길(56장) — 자리표 · 도각 불러오기 길은 894 에서 걷음."""
from fastapi import FastAPI
from fastapi.testclient import TestClient
from M02_MasterTemplete.M02_MasterTemplete_Router_Drawing import router
app = FastAPI()
app.include_router(router)
client = TestClient(app)
def test_structure_frame_origin_at_zero():
# 56장 — 구조물 도면에 얹는 도각: 외곽 좌하단 (0,0) · 잠금 도각 층 · 원본 양식은 그대로
from B07_DesignDetail.B07_DesignDetail_Engine_Template import entities_bbox, template_entities
before = entities_bbox(template_entities())
body = client.get("/api/m02/structure-frame").json()
x0, y0, x1, y1 = entities_bbox(body["entities"])
assert abs(x0) < 1e-9 and abs(y0) < 1e-9
assert abs((x1 - x0) - (before[2] - before[0])) < 1e-6
assert body["layer"]["isLocked"] is True
assert {e["layerId"] for e in body["entities"]} == {"m02-structure-frame"}
assert body["layer"]["id"] == "m02-structure-frame" # 불러온 DXF 층(b08-frame)과 갈림
assert entities_bbox(template_entities()) == before