dxf: split into layer-key and block-partition workflows

This commit is contained in:
2026-04-13 09:22:03 +09:00
parent be58c7ed3c
commit bd79da2b64
13 changed files with 38154 additions and 0 deletions

48
dxf/README.md Normal file
View File

@@ -0,0 +1,48 @@
# DXF 정리 (Hyein/issue-sample)
`dxf` 작업을 아래 두 주제로 분리해서 정리했습니다.
1. 레이어 기반 위치 키 지정
2. 블록 정보 추출 + 도면 분할 표시
## 1) 레이어 기반 위치 키 지정
- 스크립트: `dxf/layer_position_keys.mjs`
- 목적: DXF 엔티티의 `layer + 위치(grid)` 기준 키 생성
- 출력: `dxf/layer_position_keys.json`
실행 예시:
```bash
node dxf/layer_position_keys.mjs --input dxf/center.dxf --output dxf/layer_position_keys.json --cell 2000
```
키 포맷:
- `LAYER::R{row}C{col}::####`
- 예: `CHAIR_A::R3C2::0014`
## 2) 블록 정보 추출 + 도면 분할 표시
- 스크립트: `dxf/block_partition_report.mjs`
- 목적: DXF `INSERT` 기반 블록 배치/크기/영역(zone) 추출
- 출력:
- `dxf/block_partition_report.json`
- `dxf/block_partition_report.html`
실행 예시:
```bash
node dxf/block_partition_report.mjs --input dxf/center.dxf --json dxf/block_partition_report.json --html dxf/block_partition_report.html --split 4
```
`--split 4` 는 전체 도면을 4x4 zone으로 분할해 `zoneKey`를 부여합니다.
## 이슈 정리 문서
- `dxf/issues/MASTER-01-layer-position-key.md`
- `dxf/issues/MASTER-02-block-partition-report.md`
- `dxf/issues/SUB-01-layer-rules-and-key-schema.md`
- `dxf/issues/SUB-02-layer-key-validation.md`
- `dxf/issues/SUB-03-block-extraction-pipeline.md`
- `dxf/issues/SUB-04-block-viewer-and-zone-info.md`