feat(M02): 구조물 도면 여러 장 저장 꼴 — 더한장 · 연결표 장 · 모든 장 표 맞춤 · 장 도번 도각(82-2)

- 더한장 = [{장id, 이름, 도면:{format, entities, layers}}] 뼈대 검사 · drawing_sheets
- 면적 [저장] 때 안 열린 장 표도 서버가 갱신
- /m02/structure-frame?number= 장 도번을 도각 {{도면번호}} 에
- StructureDoc 더한장 · 연결표 장 타입

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NPJGtfXo6GMbcpiboQC4uK
This commit is contained in:
2026-10-08 12:02:59 +09:00
co-authored by Claude Opus 5.5
parent e25b9ddf2f
commit 5b9c804ff5
5 changed files with 223 additions and 8 deletions
@@ -104,15 +104,19 @@ def _on_frame_layer(entity: dict) -> dict:
}
def structure_frame() -> dict:
"""구조물 도면에 얹는 도각 — B07 시스템 양식 1:1 · 외곽 좌하단 (0,0) · 보여주기 층."""
def structure_frame(number: str | None = None) -> dict:
"""구조물 도면에 얹는 도각 — B07 시스템 양식 1:1 · 외곽 좌하단 (0,0) · 보여주기 층 ·
`number` = 장 도번(82-2 · 도각 `{{도면번호}}`)."""
fields = {"도면번호": number} if number else None
placed = frame_entities("m02-structure", usable_bbox(), fit=False)
box = entities_bbox(placed)
if not box:
return {"entities": [], "layer": None}
ox, oy = box[0], box[1]
x0, y0, x1, y1 = usable_bbox()
entities = frame_entities("m02-structure", (x0 - ox, y0 - oy, x1 - ox, y1 - oy), fit=False)
entities = frame_entities(
"m02-structure", (x0 - ox, y0 - oy, x1 - ox, y1 - oy), fit=False, fields=fields
)
return {
"entities": [_on_frame_layer(entity) for entity in entities],
"layer": {
@@ -125,9 +129,9 @@ def structure_frame() -> dict:
@router.get("/structure-frame")
async def get_structure_frame() -> JSONResponse:
"""구조물 도면 상세 · 카드 미리보기가 얹는 도각(56장)."""
return JSONResponse({"status": "success", **structure_frame()})
async def get_structure_frame(number: str | None = None) -> JSONResponse:
"""구조물 도면 상세 · 카드 미리보기가 얹는 도각(56장) · `number` = 장 도번(82-2)."""
return JSONResponse({"status": "success", **structure_frame(number)})
@router.get("/drawing-fields")