CAD建筑图(看图、会审、报告)
下载地址
https://www.zhengdianxue.com/wp-content/uploads/skills/user_d1f4c870--cad-vision-reader.zip将提示词发送给你的 AI 安装该 skills
请根据 https://skillhub.cn/install/skillhub.md,安装 @user_d1f4c870/cad-vision-reader。- 签章/扫描/矢量 PDF → PyMuPDF 渲染 PNG → Read 工具"
- 看"
- 图 → 输出六段式图纸解读报告
阅读全文 (展开查看完整说明)
概述
CAD Vision Reader
Purpose
The cad-viewer skill can mine text from DWG/DXF, but it cannot see the drawing — graphic geometry, title blocks, dimension lines, and symbols drawn as imagery are invisible to text extraction (especially 天正/Tianzheng tables and scanned signed PDFs).
This skill closes that gap: it renders the final-version drawing PDF into a high-DPI PNG and uses the multimodal Read tool to actually look at it, then outputs a structured six-segment drawing-interpretation report (see references/six_segment_report.md).
When to use
- A drawing is delivered as a signed/scanned PDF (no text layer) and you
need to read the title block, dimensions, or annotations.
- You need to visually verify something that text extraction can't catch
(floor-plan room count, 标高统计表, 工程概况 table, symbol decoding).
- The user asks for a 六段式图纸解读报告 / 图纸会审 / 图纸解读.
- A DWG's text is a 天正 table and
cad-viewerreturns only fragments.
Dependencies (required)
pip install pymupdf pypdf Pillowpymupdf— PDF → PNG rendering (the core of this skill).pypdf— optional text probing / page counts.Pillow— region cropping from rendered PNGs.
No system packages (poppler/gs/mutool) and no OCR engine are needed: the multimodal Read tool reads the rendered PNG directly.
Optional: DWG text mining (companion, not visual)
For extracting text from .dwg/.dxf (not visual), use the cad-viewer skill's cad_tools.py (needs ezdxf + ODA File Converter). See "DWG handling" below.
Workflow
- Locate the drawing PDF. Prefer the final / signed version (签章PDF),
which is the authoritative source. Find the per-building PDF (e.g. 建施-12-一层平面图_A2+0.25.pdf) under the project's 签章/审图通过 folder.
- Render to PNG with the bundled script:
python {SKILL_DIR}/scripts/render_pdf.py <drawing.pdf> <out.png> --dpi 200
# region crop (title block) by fractional rect x0,y0,x1,y1 (0..1):
python {SKILL_DIR}/scripts/render_pdf.py <drawing.pdf> <out.png> --dpi 200 --frac 0.55,0.62,1.0,1.0
# all pages:
python {SKILL_DIR}/scripts/render_pdf.py <drawing.pdf> --all <outdir> --dpi 150Use 200–300 dpi for the full page, 400 dpi if you will crop a small region (title block / 工程概况). Keep each PNG under ~6–8 MB for the Read tool.
- Look at it with the Read tool on the PNG path(s).
- Extract title-block fields (图名/图号/比例/版本/日期/设计), dimensions,
annotations, and symbols.
- Output the six-segment report per
references/six_segment_report.md.
DWG handling
- Visual reading of a
.dwgis best done by first exporting it to PDF in
your CAD software, then running this skill on the PDF.
- Free ODA File Converter only does DWG/DXF/DGN conversion (no raster PDF),
and ezdxf+matplotlib rendering drops 天正 proxy objects (blank image). So do not rely on direct DWG→image rendering.
- For text inside a DWG, use
cad-viewer'scad_tools.py texts/search.
Notes
- The
{SKILL_DIR}placeholder = the directory containing this SKILL.md. - 200 dpi on an A2 sheet ≈ 5900×3300 px (~2.4 MB) — comfortably readable.
- If a region is too small to read at full-page dpi, re-render that page at
higher dpi and crop, rather than upscaling.
- Cross-check visually-read values (套数, 面积, 标高) against any text-extracted
sources before writing them into spreadsheets.