agentCLAWHUBUnverified

CAD2PDF

CAD图纸转矢量PDF - 支持DWG/DXF,自动按图框拆页,完整渲染中文、标注、填充 Skill: CAD2PDF Owner: lgx281227231 Summary: CAD图纸转矢量PDF - 支持DWG/DXF,自动按图框拆页,完整渲染中文、标注、填充 Tags: latest:2.0.0 Version history: v2.0.0 | 2026-05-28T14:43:35.780Z | user v2.0重构:ezdxf原生渲染引擎+自动拆页+大样图检测+天正MBCS解码+DIMENSION修复+索引圆圈编号补全 v1.0.0 | 2026-05-28T05:49:21.372Z | user CAD图纸(DWG/DXF)转矢量PDF,完整渲染中文标注、尺寸标注、填充图案 Archive index: Archive v2.0.0: 5 files, 10695 bytes Files: cad2pdf.sh (3254b), scripts/dxf2pdf.py (14963b), skill

OpenClaw

Rank

62

Safety

84

Downloads

1.3k

Updated

Oct 10, 2026

Version

2.0.0

Source

CLAWHUB

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.3K 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.3K downloadsadoption · observed Oct 10, 2026
Latest release
2.0.0release · observed May 28, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: low.

clawhub skill install s177q4de4p3n2vjtjb3c2v0aj587jzn7:cad2pdf
  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-lgx281227231-cad2pdf/snapshot"

Documentation

CLAWHUB

11,430 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: cad2pdf
description: CAD图纸转矢量PDF - 支持DWG/DXF,自动按图框拆页,完整渲染中文、标注、填充
version: 2.0.0
author: 老狗
tags: [cad, dxf, dwg, pdf, 矢量, 工程图纸, 建筑, 造价]
license: MIT
---

# CAD2PDF v2 - CAD图纸转矢量PDF

## 一句话介绍
CAD图纸发过来,一条命令出多页矢量PDF——自动按图框拆页、完整渲染填充/标注/中文。

## 解决什么问题?
- CAD图纸发微信:对方没CAD软件?→ 转PDF直接看
- 多图框图纸:一张DWG里有N个大样?→ 自动拆成N页PDF
- 中文乱码:天正CAD文字显示不全?→ MBCS编码自动解码
- HATCH填充丢失:转PDF后材质看不出来?→ ezdxf原生渲染,完整保留

## 核心特性
- 📐 **ezdxf原生渲染引擎** - HATCH填充/尺寸标注/块引用完整渲染
- ✂️ **自动拆页** - 检测粉紫色图框,每框一页
- 🔍 **大样图检测** - 自动检测图框外实体聚集区域,独立页面
- 🈶 **天正MBCS解码** - `\M+5CDE2` → "外",中文不乱码
- 📏 **DIMENSION修复** - 标注insert在原点时自动移到实际位置
- 🔢 **索引圆圈编号补全** - ODA转换丢失的SHX编号自动补绘
- 🎨 **黑白输出** - 适配打印,不同材质用不同灰度区分

## 依赖安装

### Python依赖
```bash
pip install ezdxf matplotlib --break-system-packages
```

### 系统依赖(DWG转DXF才需要)
```bash
# ODA File Converter
wget "https://www.opendesign.com/guestfiles/get?filename=ODAFileConverter_QT6_lnxX64_8.3dll_27.1.deb" -O /tmp/ODAFileConverter.deb
sudo dpkg -i /tmp/ODAFileConverter.deb
sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1

# 中文字体
sudo apt-get install -y fonts-noto-cjk
```

## 使用方法

### 基本用法
```bash
# DXF转PDF
python3 scripts/dxf2pdf.py 图纸.dxf 输出.pdf

# 指定纸张和DPI
python3 scripts/dxf2pdf.py 图纸.dxf 输出.pdf --paper A3 --dpi 300

# DWG文件(自动先转DXF)
bash cad2pdf.sh 图纸.dwg 输出.pdf
```

### Shell封装
```bash
bash cad2pdf.sh 图纸.dxf                    # 自动命名输出
bash cad2pdf.sh 图纸.dxf 输出.pdf --paper A2
```

### 命令行参数
- `--paper SIZE` - 纸张大小:A0/A1/A2/A3/A4(默认A3,宽度固定,高度按图框比例自适应)
- `--dpi N` - 输出分辨率(默认300)

## 技术架构

```
输入DXF
  ↓
[预处理]
  ├─ MBCS解码: \M+XXXXX → GBK中文
  ├─ Unicode解码: \U+XXXX → 字符
  ├─ %%编码: %%c→Ø, %%d→°, %%p→±
  ├─ DIMENSION修复: insert(0,0) → 实际位置
  ├─ 字体替换: STXIHEI.SHX → Noto Sans CJK
  └─ 圆圈编号补全: 空圆圈 → 自动编号
  ↓
[页面检测]
  ├─ 粉紫色图框(颜色6) → 主图页
  └─ 实体聚集区域聚类 → 大样图页
  ↓
[ezdxf原生渲染]
  ├─ HATCH填充(完整保留)
  ├─ DIMENSION标注
  ├─ TEXT/MTEXT文字
  ├─ LINE/ARC/CIRCLE
  └─ INSERT块引用
  ↓
[多页PDF输出]
  ├─ 宽度固定A3
  ├─ 高度按图框比例自适应
  └─ 视图裁剪到图框范围
```

## 已知限制
- 大样图检测基于网格聚类,极分散的实体可能误判
- 天正自定义HATCH图案名(`\M+`编码)无法显示为中文名
- 需要STXIHEI.TTF等原版字体才能完美显示天正标注样式

## 文件结构
```
cad2pdf/
├── SKILL.md              # 本文档
├── cad2pdf.sh            # Shell封装(支持DWG/DXF)
└── scripts/
    └── dxf2pdf.py        # 核心Python脚本
```

_meta.json

{
  "ownerId": "kn71my9qhkbphhx5k1hcye6jz187k06n",
  "slug": "cad2pdf",
  "version": "2.0.0",
  "publishedAt": 1779979415780
}

skill-card.md

## Description:

Converts DWG and DXF CAD drawings into vector PDFs with automatic page splitting, Chinese text decoding, dimension repair, hatch rendering, and black-and-white print output.

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

## Publisher:

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

### License/Terms of Use:

MIT-0

## Use Case:

Developers, engineers, and CAD users use this skill to convert DWG or DXF drawings into shareable PDF files for review, printing, or delivery when recipients may not have CAD software. It is especially oriented to multi-frame engineering drawings that need automatic page splitting and readable Chinese annotations.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Setup can make system-wide package changes and install dependencies with root privileges.

Mitigation: Install in a controlled VM or container, verify the ODA File Converter source and checksum, and prefer a Python virtual environment for Python dependencies.

Risk: DWG conversion may process extra CAD files located in the same input folder.

Mitigation: Place the target DWG in a folder without unrelated or confidential drawings before conversion.

## Reference(s):

- [CAD2PDF ClawHub skill page](https://clawhub.ai/lgx281227231/skills/cad2pdf)
- [ODA File Converter dependency](https://www.opendesign.com/guestfiles/get?filename=ODAFileConverter_QT6_lnxX64_8.3dll_27.1.deb)

## Skill Output:

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

**Output Format:** [Markdown guidance with shell commands and generated PDF files]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Output PDFs are generated from local DWG or DXF inputs; paper size and DPI can be configured by command-line flags.]

## Skill Version(s):

2.0.0 (source: frontmatter and server release evidence)

## 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.
Github ReposUpdated 1d 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/lgx281227231/skills/cad2pdf",
      "sourceUrl": "https://clawhub.ai/lgx281227231/skills/cad2pdf",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-10T19:56:00.573Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-lgx281227231-cad2pdf/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-lgx281227231-cad2pdf/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-10T19:56:00.573Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "1.3K downloads",
      "href": "https://clawhub.ai/lgx281227231/cad2pdf",
      "sourceUrl": "https://clawhub.ai/lgx281227231/cad2pdf",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-10T19:56:00.573Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "2.0.0",
      "href": "https://clawhub.ai/lgx281227231/cad2pdf",
      "sourceUrl": "https://clawhub.ai/lgx281227231/cad2pdf",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-05-28T14:43:35.780Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-lgx281227231-cad2pdf/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-lgx281227231-cad2pdf/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 2.0.0",
      "description": "v2.0重构:ezdxf原生渲染引擎+自动拆页+大样图检测+天正MBCS解码+DIMENSION修复+索引圆圈编号补全",
      "href": "https://clawhub.ai/lgx281227231/cad2pdf",
      "sourceUrl": "https://clawhub.ai/lgx281227231/cad2pdf",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-05-28T14:43:35.780Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 10, 2026.

Sponsored

Ads related to CAD2PDF and adjacent AI workflows.