fix(376-2): B07 구조물 도면 CAD 가이드 선(M02 얹는 도각 층에서 작도 영역)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XWh5wNNycMkbwMpACz1rte
This commit is contained in:
@@ -52,6 +52,7 @@ from B07_DesignDetail.B07_DesignDetail_Router_Support import (
|
||||
)
|
||||
from B07_DesignDetail.B07_DesignDetail_Router_Support_Overlay import cross_overlay_extents
|
||||
from B07_DesignDetail.B07_DesignDetail_Router_Support_Plan import PLAN_KIND_ID, plan_kind_source
|
||||
from B07_DesignDetail.B07_DesignDetail_Router_Support_Structure import STRUCTURE_FRAME_LAYER
|
||||
from B07_DesignDetail.B07_DesignDetail_Schema import (
|
||||
DesignDrawingConfirmRequest,
|
||||
DesignDrawingConfirmResponse,
|
||||
@@ -140,7 +141,9 @@ def _asset_data_url(relative_path: str | None) -> str:
|
||||
|
||||
def _drawing_guide(drawing: dict[str, Any]) -> dict[str, Any] | None:
|
||||
"""CAD 가이드(169-1 · 169-2) — 작도 영역(도면 좌표) + 넘친 칸. 도각이 없으면 None."""
|
||||
area = frame_guide_area(drawing.get("entities") or [])
|
||||
entities = drawing.get("entities") or []
|
||||
# 구조물 도면(376) = M02 얹는 도각 층
|
||||
area = frame_guide_area(entities) or frame_guide_area(entities, STRUCTURE_FRAME_LAYER)
|
||||
return {"area": area, "marks": drawing.get("overflow_cells") or []} if area else None
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ from M02_MasterTemplete.M02_Item_Source import read_json
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
STRUCTURE_PREFIX = "structure_"
|
||||
# M02 `structure_frame` 도각 층 — 그 모듈은 B07 라우터를 불러 여기서 못 부름(같은 값 유지)
|
||||
STRUCTURE_FRAME_LAYER = "m02-structure-frame"
|
||||
_SHEET_ID = re.compile(r"^[A-Za-z0-9-]{1,40}$")
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@ from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from B07_DesignDetail import B07_DesignDetail_Router as router
|
||||
from B07_DesignDetail import B07_DesignDetail_Router_Support as support
|
||||
from B07_DesignDetail import B07_DesignDetail_Router_Support_Structure as structure
|
||||
from B07_DesignDetail.B07_DesignDetail_Engine_Cad import DRAWING_FORMAT
|
||||
from B07_DesignDetail.B07_DesignDetail_Engine_Template import (
|
||||
use_project_templates,
|
||||
@@ -114,6 +116,13 @@ def test_단건_도각_도번_도면명(project: Path) -> None:
|
||||
assert "관보호공 조합 · 상세" in texts # 도면명
|
||||
assert "SD-000002-2" in texts # 장 도번
|
||||
assert any(layer.get("id") == "m02-structure-frame" for layer in drawing["layers"])
|
||||
assert router._drawing_guide(drawing)["area"] # CAD 가이드 선 — 얹는 도각 층에서
|
||||
|
||||
|
||||
def test_도각_층_이름_M02_와_같음() -> None:
|
||||
from M02_MasterTemplete.M02_MasterTemplete_Router_Drawing import STRUCTURE_FRAME_LAYER
|
||||
|
||||
assert STRUCTURE_FRAME_LAYER == structure.STRUCTURE_FRAME_LAYER
|
||||
|
||||
|
||||
def test_없는_구조물_도면은_404(project: Path) -> None:
|
||||
|
||||
Reference in New Issue
Block a user