agentCLAWHUBUnverified

图纸解析

建筑图纸解析引擎。支持 DWG/DXF/PDF/图片格式的图纸解析,提取文字、段落、材料表、尺寸标注等结构化数据。用户提及'解析图纸''读图''CAD解析''PDF解析'时触发。 Skill: 图纸解析 Owner: yfg305 Summary: 建筑图纸解析引擎。支持 DWG/DXF/PDF/图片格式的图纸解析,提取文字、段落、材料表、尺寸标注等结构化数据。用户提及'解析图纸''读图''CAD解析''PDF解析'时触发。 Tags: latest:0.1.1 Version history: v0.1.1 | 2026-08-18T23:56:34.460Z | auto - Version 0.1.1 released with no file or documentation changes detected. - No new features, fixes, or updates included in this release. v0.1.0 | 2026-08-18T23:52:58.874Z | auto - Initial release of the drawing-parser e

OpenClaw

Rank

62

Safety

84

Downloads

1.5k

Updated

Oct 10, 2026

Version

0.1.1

Source

CLAWHUB

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.5K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Public facts

Every fact links back to the source it came from.

Vendor
Clawhubvendor · observed Oct 10, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 10, 2026
Adoption signal
1.5K downloadsadoption · observed Oct 10, 2026
Latest release
0.1.1release · observed Aug 18, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: low.

clawhub skill install s17d97d5gyphs43gjx0sx4nvfn8cqntd:ssq
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-yfg305-ssq/snapshot"

Documentation

CLAWHUB

24,845 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: drawing-parser
description: "建筑图纸解析引擎。支持 DWG/DXF/PDF/图片格式的图纸解析,提取文字、段落、材料表、尺寸标注等结构化数据。用户提及'解析图纸''读图''CAD解析''PDF解析'时触发。"
metadata:
  version: "1.0.0"
  author: "yfg305"
  license: "MIT"
  tags: ["建筑", "图纸解析", "CAD", "PDF", "OCR"]
---

# Drawing Parser — 建筑图纸解析引擎

自动识别图纸格式(DWG/DXF/PDF/图片),调度对应解析管线,输出结构化数据供方案编制和审核使用。

## 支持的格式

| 格式 | 子引擎 | 技术方案 | 精度 |
|:----|:------|:---------|:----:|
| `.dwg` | CAD管线 | ODA转换→DXF→ezdxf | 高 |
| `.dxf` | CAD管线 | ezdxf 直接读取 | 高 |
| `.pdf` | PDF管线 | PyMuPDF + 多模式OCR | 高 |
| `.png/.jpg` | PDF管线 | 同上,三种OCR可选 | 高 |

## OCR 模式对比(PDF/图片)

| 模式 | 技术栈 | 精度 | 速度 | 依赖 |
|:----|:--------|:---:|:----|:----|
| `v6`(推荐) | PP-OCRv6 rapidocr | 最高 | 较快 | pip install rapidocr |
| `dl` | deepdoc ONNX | 高 | 较慢 | onnxruntime, opencv |
| `rapid` | RapidOCR-json.exe | 高 | 较快 | 仅需exe |
| `fast` | PaddleOCR-json.exe | 够用 | 快 | 仅需exe |

## 快速开始

### Python API

```python
import sys
sys.path.insert(0, 'path/to/scripts')

# CAD 图纸解析
from cad_parser import parse_cad_drawing
result = parse_cad_drawing('图纸.dwg', output_dir='./output')

# PDF 图纸解析
from pdf_parser import parse_pdf_drawing
result = parse_pdf_drawing('图纸.pdf', ocr_mode='v6', output_dir='./output')
```

### 命令行

```bash
# CAD 解析
python scripts/cad_parser.py 图纸.dwg ./output --mode v4

# PDF 解析(自动降级 v6→dl→rapid→fast)
python scripts/pdf_parser.py 图纸.pdf ./output --mode v6
```

## 输出结构

所有解析结果写入 `{项目}/_drawing_parser/project_data.json`:

```json
{
  "project_name": "示例项目",
  "source_file": "图纸.dwg",
  "parse_time": "2026-08-18T18:00:00Z",
  "texts": [
    {
      "content": "钢筋混凝土",
      "bbox": [x1, y1, x2, y2],
      "layer": "TEXT",
      "confidence": 0.95
    }
  ],
  "paragraphs": [
    {
      "type": "title",
      "content": "结构设计说明",
      "position": 1
    }
  ],
  "tables": [
    {
      "header": ["材料", "规格", "数量"],
      "rows": [["钢筋", "HRB400", "120"]]
    }
  ],
  "dimensions": [
    {
      "value": 3600,
      "unit": "mm",
      "position": [x, y]
    }
  ]
}
```

## 依赖安装

### 基础依赖(所有模式)

```bash
pip install pymupdf ezdxf openpyxl numpy matplotlib
```

### CAD 管线(v4主力)

```bash
# ODA File Converter(免费,需手动下载安装)
# 下载地址:https://www.opendesign.com/guestfiles/oda_file_converter

# 或 AutoCAD(v3备用管线)
# 需要安装 AutoCAD 2026+
```

### PDF 管线

```bash
# v6 模式(推荐)
pip install rapidocr

# dl 模式
pip install onnxruntime opencv-python-headless
# 模型文件:models/deepdoc/(已内置)

# rapid / fast 模式
# exe 文件已内置在 scripts/ocr_service/
```

## 故障排查

| 问题 | 解决方案 |
|:----|:--------|
| ODA 路径异常 | 更新 config.json 中的 ODA_PATH |
| ezdxf 版本冲突 | `pip install ezdxf==1.4.4` |
| LISP 脚本失效 | 检查 dwg_extract_v2.lsp 路径配置 |
| v4 管线失败 | 切 v3(accoreconsole+LISP) |
| OCR 模型缺失 | 从 hf-mirror.com 下载 PP-OCRv6 模型 |
| 内存不足 | 降低 max_pages 参数 |

## 版本历史

- v1.0.0(2026-08-18):初始开源版本
  - 支持 DWG/DXF/PDF/图片四种格式
  - 四模式OCR自动降级
  - 结构化JSON输出

## 许可证

MIT License - 可自由使用、修改、分发

## 贡献

欢迎提 Issue 和 PR。请确保:
1. 代码符合 PEP 8 规范
2. 新增功能附带测试用例
3. 更新 CHANGELOG.md

README.md

# Drawing Parser — 建筑图纸解析引擎

[![Python](https://img.shields.io/badge/Python-3.8+-blue.svg)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![GitHub stars](https://img.shields.io/github/stars/yfg305/drawing-parser)](https://github.com/yfg305/drawing-parser/stargazers)

> 建筑图纸智能解析工具,支持 DWG/DXF/PDF/图片格式,自动提取文字、段落、材料表、尺寸标注等结构化数据。

## ✨ 特性

- **多格式支持**:DWG、DXF、PDF、PNG、JPG
- **智能OCR**:四种OCR模式自动降级(PP-OCRv6 → deepdoc → RapidOCR → PaddleOCR)
- **结构化输出**:JSON格式,包含文字、段落、表格、尺寸标注
- **可视化分析**:支持图层截图、区域放大、距离测量
- **Hana集成**:可直接作为 HanaAgent 技能使用

## 📦 安装

### 1. 克隆仓库

```bash
git clone https://github.com/yfg305/drawing-parser.git
cd drawing-parser
```

### 2. 安装依赖

```bash
# 基础依赖
pip install -r requirements.txt

# 按需安装OCR模式
pip install rapidocr        # v6模式(推荐)
# 或
pip install onnxruntime opencv-python-headless  # dl模式
```

### 3. CAD 依赖(可选)

```bash
# 方法一:ODA File Converter(推荐)
# 下载地址:https://www.opendesign.com/guestfiles/oda_file_converter

# 方法二:AutoCAD(v3备用)
# 需要安装 AutoCAD 2026+
```

## 🚀 快速开始

### Python API

```python
from scripts.cad_parser import parse_cad_drawing
from scripts.pdf_parser import parse_pdf_drawing

# 解析 CAD 图纸
result = parse_cad_drawing('floor_plan.dwg', output_dir='./output')
print(f"提取文字: {len(result['texts'])} 条")
print(f"提取表格: {len(result['tables'])} 个")

# 解析 PDF 图纸
result = parse_pdf_drawing('elevation.pdf', ocr_mode='v6', output_dir='./output')
```

### 命令行

```bash
# 解析 CAD 图纸
python scripts/cad_parser.py floor_plan.dwg ./output --mode v4

# 解析 PDF 图纸(自动降级)
python scripts/pdf_parser.py elevation.pdf ./output --mode v6
```

## 📊 输出示例

```json
{
  "project_name": "示例项目",
  "source_file": "floor_plan.dwg",
  "parse_time": "2026-08-18T18:00:00Z",
  "texts": [
    {
      "content": "C30混凝土",
      "bbox": [100, 200, 300, 250],
      "layer": "TEXT",
      "confidence": 0.95
    }
  ],
  "paragraphs": [
    {
      "type": "title",
      "content": "结构设计说明",
      "position": 1
    }
  ],
  "tables": [
    {
      "header": ["材料", "规格", "数量"],
      "rows": [
        ["钢筋", "HRB400", "120"],
        ["混凝土", "C30", "45m³"]
      ]
    }
  ],
  "dimensions": [
    {
      "value": 3600,
      "unit": "mm",
      "position": [500, 600]
    }
  ]
}
```

## 🔧 配置

编辑 `config.json`:

```json
{
  "ODA_PATH": "C:\\Program Files\\ODA\\ODAFileConverter.exe",
  "ACCONSOLE_PATH": "C:\\Program Files\\Autodesk\\AutoCAD 2026\\accoreconsole.exe",
  "OCR_MODE": "v6",
  "MAX_PAGES": 10,
  "OUTPUT_DIR": "./output"
}
```

## 📚 文档

- [SKILL.md](SKILL.md) - 技能描述和触发条件
- [scripts/](scripts/) - 核心解析脚本
- [examples/](examples/) - 使用示例
- [models/](models/) - OCR 模型文件

## 🤝 贡献

欢迎提 Issue 和 PR!

1. Fork 本仓库
2. 创建特性分支 (`git checkout -b feature/AmazingFeature`)
3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
4. 推送到分支 (`git push origin feature/AmazingFeature`)
5. 开启 Pull Request

## 📄 许可证

MIT License - 详见 [LICENSE](LICENSE) 文件

## 🙏 致谢

- [ezdxf](https://github.com/mozman

_meta.json

{
  "ownerId": "kn76k6w4x0228a3bz67yfpd5xn8cp2ra",
  "slug": "ssq",
  "version": "0.1.1",
  "publishedAt": 1787097394460
}

skill-card.md

## Description:

建筑图纸解析引擎,支持 DWG/DXF/PDF/图片格式的图纸解析,并提取文字、段落、材料表、尺寸标注等结构化数据。

This skill is ready for commercial/non-commercial use.

## Publisher:

[yfg305](https://clawhub.ai/user/yfg305)

### License/Terms of Use:

MIT

## Use Case:

Developers and engineering teams use this skill to parse architectural drawings into structured local JSON outputs for drafting, review, and downstream analysis workflows.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The security review says the skill processes potentially sensitive drawings with underspecified local file handling.

Mitigation: Run it in an isolated, least-privileged environment using copies of drawings, and review the local output directory after each run.

Risk: The security review says the skill materially overstates what it can parse, including DWG, OCR, and table extraction.

Mitigation: Treat extracted text, tables, dimensions, and summaries as draft outputs requiring human review before design, compliance, or customer use.

Risk: The security review flags dependency installation as underspecified.

Mitigation: Pin or lock Python and OCR/CAD dependencies before processing confidential building plans.

## Reference(s):

- [Server-resolved source repository](https://github.com/yfg305/ssq)
- [ClawHub skill page](https://clawhub.ai/yfg305/skills/ssq)
- [PyMuPDF documentation](https://pymupdf.readthedocs.io/)
- [ezdxf](https://github.com/mozman/ezdxf)
- [RapidOCR](https://github.com/RapidAI/RapidOCR)
- [Open Design Alliance File Converter](https://www.opendesign.com/guestfiles/oda_file_converter)

## Skill Output:

**Output Type(s):** [text, code, shell commands, configuration, files]

**Output Format:** [Markdown guidance with Python and shell examples; parsed drawing data is written as JSON files.]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Local outputs may include extracted drawing text, bounding boxes, tables, dimensions, layers, metadata, and error strings.]

## Skill Version(s):

0.1.1 (source: ClawHub release metadata; artifact metadata reports 1.0.0)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

manifest.json

{
  "name": "drawing-parser",
  "version": "1.0.0",
  "description": "建筑图纸解析引擎,支持DWG/DXF/PDF/图片格式的结构化数据提取",
  "author": "yfg305",
  "license": "MIT",
  "keywords": ["建筑", "图纸解析", "CAD", "PDF", "OCR", "ezdxf", "PP-OCR"],
  "repository": "https://github.com/yfg305/drawing-parser",
  "homepage": "https://github.com/yfg305/drawing-parser#readme",
  "bugs": {
    "url": "https://github.com/yfg305/drawing-parser/issues"
  },
  "engines": {
    "python": ">=3.8"
  },
  "dependencies": {
    "pymupdf": ">=1.23.0",
    "ezdxf": ">=1.4.0",
    "openpyxl": ">=3.1.0",
    "numpy": ">=1.24.0",
    "matplotlib": ">=3.7.0"
  },
  "optional_dependencies": {
    "ocr-v6": ["rapidocr"],
    "ocr-dl": ["onnxruntime", "opencv-python-headless"],
    "cad-v4": ["oda-file-converter"],
    "cad-v3": ["autocad"]
  },
  "scripts": {
    "parse-cad": "python scripts/cad_parser.py",
    "parse-pdf": "python scripts/pdf_parser.py",
    "install-deps": "pip install -r requirements.txt"
  },
  "files": [
    "SKILL.md",
    "manifest.json",
    "scripts/**/*.py",
    "scripts/ocr_service/**/*",
    "models/**/*",
    "examples/**/*",
    "LICENSE",
    "README.md"
  ],
  "hana_integration": {
    "skill_type": "tool",
    "trigger_keywords": ["解析图纸", "读图", "CAD解析", "PDF解析", "提取图纸数据"],
    "entry_point": "scripts/main.py",
    "output_schema": "project_data.json"
  }
}
Github ReposUpdated 17h agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

Machine-readable data

The same record, as JSON, for agents and crawlers.

{
  "facts": [
    {
      "factKey": "vendor",
      "category": "vendor",
      "label": "Vendor",
      "value": "Clawhub",
      "href": "https://clawhub.ai/yfg305/skills/ssq",
      "sourceUrl": "https://clawhub.ai/yfg305/skills/ssq",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-10T10:35:39.297Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-yfg305-ssq/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-yfg305-ssq/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-10T10:35:39.297Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "1.5K downloads",
      "href": "https://clawhub.ai/yfg305/ssq",
      "sourceUrl": "https://clawhub.ai/yfg305/ssq",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-10T10:35:39.297Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "0.1.1",
      "href": "https://clawhub.ai/yfg305/ssq",
      "sourceUrl": "https://clawhub.ai/yfg305/ssq",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-08-18T23:56:34.460Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-yfg305-ssq/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-yfg305-ssq/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 0.1.1",
      "description": "- Version 0.1.1 released with no file or documentation changes detected. - No new features, fixes, or updates included in this release.",
      "href": "https://clawhub.ai/yfg305/ssq",
      "sourceUrl": "https://clawhub.ai/yfg305/ssq",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-08-18T23:56:34.460Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 10, 2026.

Sponsored

Ads related to 图纸解析 and adjacent AI workflows.