- Code\rebar_pipeline, review_pipeline, pier-program을 정션에서 실제 폴더로 전환 - Code\rhino_mcp 및 CLAUDE_rhino배경.md 추가, .mcp.json은 PYTHONPATH로 새 위치 사용 - pier-program 내부 .git 제거(이력은 backup\pier-program_20261028.bundle에 보관) - worktree 가이드 반영(CLAUDE.local.md, HANDOFF.md) - D:\Rhino-MCP 경로 참조를 새 위치로 치환 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
29 lines
1.2 KiB
Python
29 lines
1.2 KiB
Python
import sys, re, json, collections
|
|
sys.path.insert(0, 'pylib')
|
|
import ezdxf
|
|
F = r"D:\★Pier 자료\심수석님 검토 파일\검토_옥성교P1\옥성교P1.dxf"
|
|
d = ezdxf.readfile(F)
|
|
m = d.modelspace()
|
|
FONT = re.compile(r'\\f[^;]*;')
|
|
texts = []
|
|
for e in m:
|
|
t = e.dxftype()
|
|
if t == 'TEXT':
|
|
texts.append((e.dxf.insert.x, e.dxf.insert.y, e.dxf.text, e.dxf.layer))
|
|
elif t == 'MTEXT':
|
|
s = FONT.sub('', e.text).replace('{', '').replace('}', '').replace('\\P', ' / ')
|
|
texts.append((e.dxf.insert.x, e.dxf.insert.y, s, e.dxf.layer))
|
|
tags = []
|
|
for e in m:
|
|
if e.dxftype() == 'INSERT' and e.dxf.name.startswith('CSBNUM1'):
|
|
at = [(a.dxf.tag, a.dxf.text) for a in e.attribs]
|
|
tags.append((e.dxf.insert.x, e.dxf.insert.y, e.dxf.name, at))
|
|
print(len(texts), len(tags))
|
|
json.dump({"texts": texts, "tags": tags}, open('ok_shape_raw.json', 'w', encoding='utf-8'), ensure_ascii=False)
|
|
# 철근상세 영역(시트 D 의 좌측 도해 x<687000) 에서 L= 로 시작하는 글자
|
|
Ls = [t for t in texts if re.match(r'\s*L\s*=', t[2])]
|
|
print(len(Ls))
|
|
for t in sorted(Ls, key=lambda a: (round(a[0] / 5000), -a[1]))[:80]:
|
|
print(round(t[0]), round(t[1]), t[2])
|
|
print(tags[:5])
|