feat(488-3 DWG 불러오기): 삽입 탭 [DWG 불러오기](IMPORT) — 끌어다 놓기와 같은 서버 변환 · 원좌표 · 골라진 채 · 화면 맞춤 · 되돌리기 한 번 · 파일 입력 문서에 숨겨 붙임 · ByLayer 도형 = 레이어 색(B07 붙이기 · M02 불러오기 같은 _color) · 시험 catalog · test_b07_dxf_clip 한 건씩

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 22:17:13 +09:00
co-authored by Claude Opus 5.5
parent 99df7c2512
commit 6695dfaee9
8 changed files with 84 additions and 7 deletions
@@ -62,10 +62,12 @@ def _entity_id(index: int) -> str:
def _color(entity: Any) -> str:
"""DXF 색 번호를 화면 색으로. 도면층 색(BYLAYER)이면 기본색을 쓴다."""
"""DXF 색 번호를 화면 색으로. BYLAYER 면 레이어 색(488 · B07 붙이기 · M02 불러오기 같이) · BYBLOCK 은 기본색."""
try:
aci = int(entity.dxf.color)
if aci in (0, 256): # BYBLOCK · BYLAYER
if aci == 256: # BYLAYER
return _layer_color(entity.doc, entity.dxf.layer) or _DEFAULT_COLOR
if aci == 0: # BYBLOCK
return _DEFAULT_COLOR
red, green, blue = ezdxf_colors.aci2rgb(aci)
return f"#{red:02x}{green:02x}{blue:02x}"