Files
issue-sample/dxf/README.md

1.7 KiB

DXF 정리 (Hyein/issue-sample)

dxf 작업을 아래 두 주제로 분리해서 정리했습니다.

  1. 레이어 기반 위치 키 지정
  2. 블록 정보 추출 + 도면 분할 표시

1) 레이어 기반 위치 키 지정

  • 스크립트: dxf/layer_position_keys.mjs
  • 목적: DXF 엔티티의 layer + 위치(grid) 기준 키 생성
  • 출력: dxf/layer_position_keys.json

실행 예시:

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

실행 예시:

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를 부여합니다.

Gitea 이슈 정리