feat: explore standard section arcs, radius labels and table values (Task 4)

Concrete major arcs R7282/R6982 (same centre) give a 300 mm lining band
and excavation R7402 sits 120 mm outside the outer lining arc. Table cells
(CS-TABL-TEX2) meaning is left to HITL.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A5Cun3RHQKna9qxE6ybZ4A
This commit is contained in:
Claude committed 2026-10-21 00:19:03 +00:00
1 parent e69ff275da
commit 26d1c8dd03
1 file changed
+25
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env python3
"""Task 4 exploration: layers, arcs (radius + centre) and dimension-like texts
of the standard section drawing (C0060303-001). Read-only."""
import collections
import re
import sys
import ezdxf
from ezdxf import bbox
msp = ezdxf.readfile(sys.argv[1]).modelspace()
print("layers:", collections.Counter(e.dxf.layer for e in msp).most_common(12))
ext = bbox.extents(msp)
print("extents:", [round(v, 1) for v in ext.extmin], [round(v, 1) for v in ext.extmax])
print("== ARCs (layer, centre, radius, start/end deg) sorted by radius")
arcs = sorted(msp.query("ARC"), key=lambda e: -e.dxf.radius)
for e in arcs[:14]:
c = e.dxf.center
print(f" {e.dxf.layer:14s} c=({c.x:9.2f},{c.y:9.2f}) R={e.dxf.radius:9.2f} {e.dxf.start_angle:7.1f}->{e.dxf.end_angle:7.1f}")
print("== R-labels and numeric dims")
pat = re.compile(r"^(R\d'?|\d{2,5}(\.\d+)?|\d+\.\d+%?|-?\d+\.\d+)$")
for e in msp.query("TEXT"):
s = e.dxf.text.strip()
if pat.match(s) or s.startswith("R"):
print(f" {e.dxf.layer:14s} ({e.dxf.insert.x:9.2f},{e.dxf.insert.y:9.2f}) {s}")