← 返回 Skills 市场
boboy-j

engineering-drawing-parser

作者 boboy · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
61
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install engineering-drawing-parser
功能描述
EN: Extract structured information from engineering drawings — mechanical 2D drafts, P&IDs, electrical schematics, construction architectural/structural draw...
使用说明 (SKILL.md)

Engineering Drawing Parser · 工程图纸智能解析

Turn a 1:50 scale engineering drawing into a clean structured dataset in under 2 minutes — BOM, dimensions, tolerances, title block, and every visible symbol — all linked back to coordinates on the source page.

2 分钟把工程图纸变成结构化数据:BOM、尺寸、公差、标题栏、符号清单,每一项都能定位回原图坐标。


🎯 When to Use · 何时使用

Trigger keywords (中文): 解析图纸、读图纸、抽 BOM、出明细表、尺寸清单、公差清单、标题栏、装配图、零件图、施工图、P&ID、电气原理图

Trigger keywords (EN): parse drawing, extract BOM, read dimensions, tolerance list, title block, drawing OCR, P&ID parsing, schematic extraction

Supported drawing types:

类别 / Type 子类 / Subtype 支持元素
机械 Mechanical 零件图、装配图、爆炸图 尺寸、公差、表面粗糙度、几何公差、BOM、标题栏
管道工艺 P&ID 工艺流程、PFD/PID 设备、管线、阀门、仪表、tag 号、介质
电气 Electrical 原理图、接线图、系统图 元器件、网络标号、回路、参数
建筑结构 Civil 平面、立面、剖面、节点 轴网、构件、标高、配筋、说明

Supported formats: DWG, DXF, PDF (vector or scanned), PNG/JPG/TIFF (scanned)

Do NOT use when:

  • Drawing is a freehand sketch with no standardized notation
  • File is a 3D model (STEP/STL/IGES) — use a CAD-native tool instead
  • User wants the parser to redesign or modify the drawing

📋 Parsing Pipeline · 解析流程

Step 1: Format dispatch · 格式分发

python3 scripts/dispatch.py --input \x3Cfile> --out /tmp/raw_geom.json
  • DWG/DXF → vector geometry via ezdxf (bundled)
  • Vector PDF → vector geometry via pdfminer
  • Scanned PDF / image → raster pipeline (OCR + symbol detector)

Step 2: Region segmentation · 区域分割

scripts/segment_regions.py partitions every drawing into 5 zones:

  • Title block (右下角标题栏)
  • BOM / parts list (明细栏)
  • Main view region (主视区)
  • Notes & legends (技术要求、图例)
  • Border & frame (图框)

This dramatically improves downstream extraction precision.

Step 3: Title block extraction · 标题栏抽取

Maps fields to standardized keys per knowledge/title_block_\x3Cstandard>.json:

  • 图号 drawing_no
  • 图名 drawing_name
  • 比例 scale
  • 材料 material
  • 设计/校对/审核/批准 (designer/checker/approver)
  • 日期、版本、张次

Step 4: BOM extraction · BOM 抽取

Table-aware extraction with column heuristics for serial/part-number/name/qty/material/remark columns. Handles merged cells, multi-row entries, and continuation pages.

Step 5: Dimension & tolerance extraction · 尺寸与公差

scripts/extract_dimensions.py uses geometric reasoning:

  • Detect dimension lines, arrows, extension lines
  • Associate dimension text with feature (length / diameter / radius / angle)
  • Parse tolerance notation (±0.05, H7/g6, 0/-0.02, geometric tolerance frames per ISO 1101)
  • Detect surface roughness symbols (Ra, Rz)

Step 6: Symbol recognition · 符号识别

Domain-specific symbol libraries in knowledge/symbols_\x3Cdomain>.json:

  • Mechanical: welding symbols, datum symbols, surface finish
  • P&ID: ISA-5.1 instrument symbols, valve types, equipment glyphs
  • Electrical: IEC 60617 component symbols
  • Civil: structural connection details, rebar callouts

Step 7: Cross-reference resolution · 交叉引用解析

Resolve references like "see Detail A on sheet 3" or "(详 大样图 5)" by building an inter-sheet graph if multi-page input is provided.

Step 8: Output assembly · 输出装配

python3 scripts/assemble_output.py --input parsed.json --format json|xlsx|csv

📤 Output Format · 输出格式

{
  "document": { "title": "...", "drawing_no": "...", "scale": "1:50", "sheets": 4 },
  "title_block": { "designer": "李工", "approver": "王总", "date": "2024-03-15", ... },
  "bom": [
    { "no": 1, "part_no": "GB/T 70.1 M8x25", "name": "内六角螺栓", "qty": 4, "material": "8.8", "remark": "" }
  ],
  "dimensions": [
    { "value": "120", "tolerance": "±0.05", "feature": "总长", "page": 1, "bbox": [120,340,180,360] }
  ],
  "tolerances_geometric": [ { "symbol": "⏥", "value": "0.02", "datum": "A", ... } ],
  "symbols": [ { "type": "weld_fillet", "size": "5", "page": 1, "bbox": [...] } ],
  "notes": ["技术要求:1. 未注公差按 GB/T 1804-m;2. ..."],
  "cross_references": [ { "from": "p1@detail-A", "to": "p3@bbox=..." } ],
  "extraction_report": { "coverage_estimate": 0.92, "low_confidence_items": [...] }
}

For Excel export: BOM, dimension list, and symbol inventory are placed on separate sheets with hyperlinks back to a PDF preview annotated with extraction bounding boxes.


⚠️ Safety & Compliance · 安全合规

  1. Extraction only, no design judgment — never infer whether a dimension is "correct" or suggest design changes.
  2. Confidence scores attached — every item has a confidence score; items below threshold flagged for human review.
  3. No drawing redistribution — the skill never uploads drawings anywhere; all processing local.
  4. IP protection — title-block extraction excludes confidentiality notices verbatim; users responsible for downstream IP handling.
  5. Traceability — every extracted value carries {page, bbox} for visual verification.

本技能仅做信息抽取,不做设计判断或修改建议;所有抽取项带置信度并支持人工复核;不向外部上传图纸;每项信息可定位回原图坐标用于核对。


🚀 Usage Examples · 使用示例

Example 1: Single mechanical part drawing

python3 scripts/run_pipeline.py \
  --input bracket.dwg \
  --domain mechanical --standard GB \
  --output bracket_parsed.json
python3 scripts/render_preview.py --input bracket_parsed.json --pdf bracket_annotated.pdf

Example 2: Multi-sheet assembly with BOM

python3 scripts/run_pipeline.py \
  --input assembly_4_sheets.pdf \
  --domain mechanical \
  --output assembly.json
python3 scripts/export_bom.py --input assembly.json --format xlsx > bom.xlsx

Example 3: P&ID extraction

python3 scripts/run_pipeline.py \
  --input pid_unit_100.pdf \
  --domain piping \
  --output pid_extracted.json
python3 scripts/render_isa.py --input pid_extracted.json > pid_summary.md

Example 4: Batch process drawing folder

python3 scripts/batch_parse.py \
  --input-dir ./project_drawings/ \
  --output-dir ./parsed/ \
  --workers 4 \
  --report summary.html

🧪 Testing · 测试

cd tests && python3 -m pytest -v

Fixtures cover:

  • 8 mechanical drawings (GB/ISO/ANSI)
  • 4 P&ID drawings (ISA-5.1)
  • 3 electrical schematics (IEC 60617)
  • 5 civil drawings (Chinese GB standard)
  • Edge cases: rotated dimensions, stacked tolerance frames, hand-annotated revisions

📚 References · 参考资料

  • GB/T 17450, GB/T 4458 机械制图国家标准
  • ISO 128, ISO 1101, ISO 5459 Technical drawings
  • ANSI Y14.5 Dimensioning and Tolerancing
  • ISA-5.1 P&ID Instrumentation Symbols
  • IEC 60617 Electrical Symbols

🏷️ Tags · 标签

engineering CAD drawing-parsing BOM-extraction P&ID DWG DXF 工程图 图纸解析 BOM 工业

安全使用建议
This looks safe to install based on the supplied scan results. As with any skill, review its stated purpose and only provide files, credentials, or account access that are necessary for the task.
能力评估
Purpose & Capability
The supplied artifact context, clean VirusTotal telemetry, and clean SkillSpector result do not show exfiltration, destructive behavior, or capabilities outside the skill's apparent purpose.
Instruction Scope
No pre-scan prompt-injection indicators were reported, and SkillSpector reported no instruction-scope issues.
Install Mechanism
No evidence was supplied of deceptive installation behavior, obfuscated setup, or unsafe automatic execution.
Credentials
No credential, browser-session, broad local indexing, or unrelated sensitive-data access was identified in the supplied scanner evidence.
Persistence & Privilege
No persistence, background-worker behavior, privilege escalation, or unbounded authority was reported.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install engineering-drawing-parser
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /engineering-drawing-parser 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of Engineering Drawing Parser. - Extracts structured data (BOM, dimensions, tolerances, title block, symbol inventory) from mechanical, P&ID, electrical, and architectural/structural engineering drawings. - Supports input formats: DWG, DXF, PDF (vector or scanned), and common image types. - Delivers machine-readable outputs (JSON, XLSX, CSV), each item traceable to original drawing coordinates. - Features region segmentation, title block/BOM/dimension/symbol extraction, and cross-reference resolution. - Includes confidence scoring and safety measures (local processing, no design inference, IP protection). - Ready-to-use pipeline scripts and batch processing tools with multilingual prompt triggers.
元数据
Slug engineering-drawing-parser
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

engineering-drawing-parser 是什么?

EN: Extract structured information from engineering drawings — mechanical 2D drafts, P&IDs, electrical schematics, construction architectural/structural draw... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 61 次。

如何安装 engineering-drawing-parser?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install engineering-drawing-parser」即可一键安装,无需额外配置。

engineering-drawing-parser 是免费的吗?

是的,engineering-drawing-parser 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

engineering-drawing-parser 支持哪些平台?

engineering-drawing-parser 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 engineering-drawing-parser?

由 boboy(@boboy-j)开发并维护,当前版本 v1.0.0。

💬 留言讨论