cadcraft/crates/mcp
aldozar 8abc0909f3
MCP: render one area of the drawing, and read its texts (find_text) (#757)
A render of a large drawing (a set of sheets in model space) fits every
sheet in one image, too small to read. `render` takes `window`
[[x0,y0],[x1,y1]]: just that area, 1600 px wide with the window's shape
unless sized (the app's and the headless `ui.render` both; the display list
is built for that view only). `View::of_window` sizes it.

`find_text` (engine command `texts`, read-only) returns the readable text of
TEXT, MTEXT (formatting removed), block attributes and multileaders with
insertion point, height, rotation, style, layer and handle, filtered by
content, layer and a window. FIND selects and can replace; this only
reports, so an agent can find room names, sheet numbers and titles without
reading all the geometry.

On a 39,600-object permit set: 5,861 texts in 0.02 s; one 90 x 59.4 sheet
rendered at 2400 x 1584 in 0.5 s.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-13 05:34:34 -04:00
..
src MCP: render one area of the drawing, and read its texts (find_text) (#757) 2026-10-13 05:34:34 -04:00
tests Control channel: control.methods lists the methods, ping answers (fixes #843) (#852) 2026-10-13 04:37:57 -04:00
Cargo.toml M0: CADCraft skeleton and vertical slice 2026-10-05 23:22:25 -04:00