{"id":"465a59ea-d95d-4278-b0d4-98c685c5cb8a","entityType":"agent","slug":"clawhub-lgx281227231-cad2pdf","name":"CAD2PDF","canonicalUrl":"https://www.xpersona.co/agent/clawhub-lgx281227231-cad2pdf","canonicalPath":"/agent/clawhub-lgx281227231-cad2pdf","generatedAt":"2026-10-10T23:48:07.138Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-10T19:56:00.573Z","emptyReason":null},"description":"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","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.3K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s177q4de4p3n2vjtjb3c2v0aj587jzn7:cad2pdf","sourceUrl":"https://clawhub.ai/lgx281227231/cad2pdf","homepage":"https://clawhub.ai/lgx281227231/skills/cad2pdf","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/lgx281227231/cad2pdf","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/lgx281227231/skills/cad2pdf","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":62,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"CAD图纸转矢量PDF - 支持DWG/DXF，自动按图框拆页，完整渲染中文、标注、填充 Skill: CAD2PDF Owner: lgx281227231 Summary: CAD图纸转矢量PDF - 支持DWG/DXF，自动按图框拆页，完整渲染中文、标注、填充 Tags: latest:2.0.0 Version"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T19:56:00.573Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T19:56:00.573Z","emptyReason":null},"stars":null,"forks":null,"downloads":1274,"packageName":null,"latestVersion":"2.0.0","tractionLabel":"1.3K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T19:56:00.573Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T19:56:00.573Z","lastCrawledAt":"2026-10-10T19:56:00.573Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T19:56:00.573Z","lastVerifiedAt":null,"highlights":[{"version":"2.0.0","createdAt":"2026-05-28T14:43:35.780Z","changelog":"v2.0重构：ezdxf原生渲染引擎+自动拆页+大样图检测+天正MBCS解码+DIMENSION修复+索引圆圈编号补全","fileCount":5,"zipByteSize":10695},{"version":"1.0.0","createdAt":"2026-05-28T05:49:21.372Z","changelog":"CAD图纸(DWG/DXF)转矢量PDF，完整渲染中文标注、尺寸标注、填充图案","fileCount":6,"zipByteSize":11607}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s177q4de4p3n2vjtjb3c2v0aj587jzn7:cad2pdf","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","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":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-lgx281227231-cad2pdf/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-lgx281227231-cad2pdf/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-lgx281227231-cad2pdf/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-lgx281227231-cad2pdf/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-lgx281227231-cad2pdf/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-lgx281227231-cad2pdf/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T23:48:07.138Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-lgx281227231-cad2pdf/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-lgx281227231-cad2pdf/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-lgx281227231-cad2pdf/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-lgx281227231-cad2pdf/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-10T19:56:00.573Z","emptyReason":null},"readme":"Skill: CAD2PDF\n\nOwner: lgx281227231\n\nSummary: CAD图纸转矢量PDF - 支持DWG/DXF，自动按图框拆页，完整渲染中文、标注、填充\n\nTags: latest:2.0.0\n\nVersion history:\n\nv2.0.0 | 2026-05-28T14:43:35.780Z | user\n\nv2.0重构：ezdxf原生渲染引擎+自动拆页+大样图检测+天正MBCS解码+DIMENSION修复+索引圆圈编号补全\n\nv1.0.0 | 2026-05-28T05:49:21.372Z | user\n\nCAD图纸(DWG/DXF)转矢量PDF，完整渲染中文标注、尺寸标注、填充图案\n\nArchive index:\n\nArchive v2.0.0: 5 files, 10695 bytes\n\nFiles: cad2pdf.sh (3254b), scripts/dxf2pdf.py (14963b), skill-card.md (2156b), SKILL.md (3612b), _meta.json (126b)\n\nFile v2.0.0:SKILL.md\n\n---\nname: cad2pdf\ndescription: CAD图纸转矢量PDF - 支持DWG/DXF，自动按图框拆页，完整渲染中文、标注、填充\nversion: 2.0.0\nauthor: 老狗\ntags: [cad, dxf, dwg, pdf, 矢量, 工程图纸, 建筑, 造价]\nlicense: MIT\n---\n\n# CAD2PDF v2 - CAD图纸转矢量PDF\n\n## 一句话介绍\nCAD图纸发过来，一条命令出多页矢量PDF——自动按图框拆页、完整渲染填充/标注/中文。\n\n## 解决什么问题？\n- CAD图纸发微信：对方没CAD软件？→ 转PDF直接看\n- 多图框图纸：一张DWG里有N个大样？→ 自动拆成N页PDF\n- 中文乱码：天正CAD文字显示不全？→ MBCS编码自动解码\n- HATCH填充丢失：转PDF后材质看不出来？→ ezdxf原生渲染，完整保留\n\n## 核心特性\n- 📐 **ezdxf原生渲染引擎** - HATCH填充/尺寸标注/块引用完整渲染\n- ✂️ **自动拆页** - 检测粉紫色图框，每框一页\n- 🔍 **大样图检测** - 自动检测图框外实体聚集区域，独立页面\n- 🈶 **天正MBCS解码** - `\\M+5CDE2` → \"外\"，中文不乱码\n- 📏 **DIMENSION修复** - 标注insert在原点时自动移到实际位置\n- 🔢 **索引圆圈编号补全** - ODA转换丢失的SHX编号自动补绘\n- 🎨 **黑白输出** - 适配打印，不同材质用不同灰度区分\n\n## 依赖安装\n\n### Python依赖\n```bash\npip install ezdxf matplotlib --break-system-packages\n```\n\n### 系统依赖（DWG转DXF才需要）\n```bash\n# ODA File Converter\nwget \"https://www.opendesign.com/guestfiles/get?filename=ODAFileConverter_QT6_lnxX64_8.3dll_27.1.deb\" -O /tmp/ODAFileConverter.deb\nsudo dpkg -i /tmp/ODAFileConverter.deb\nsudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1\n\n# 中文字体\nsudo apt-get install -y fonts-noto-cjk\n```\n\n## 使用方法\n\n### 基本用法\n```bash\n# DXF转PDF\npython3 scripts/dxf2pdf.py 图纸.dxf 输出.pdf\n\n# 指定纸张和DPI\npython3 scripts/dxf2pdf.py 图纸.dxf 输出.pdf --paper A3 --dpi 300\n\n# DWG文件（自动先转DXF）\nbash cad2pdf.sh 图纸.dwg 输出.pdf\n```\n\n### Shell封装\n```bash\nbash cad2pdf.sh 图纸.dxf                    # 自动命名输出\nbash cad2pdf.sh 图纸.dxf 输出.pdf --paper A2\n```\n\n### 命令行参数\n- `--paper SIZE` - 纸张大小：A0/A1/A2/A3/A4（默认A3，宽度固定，高度按图框比例自适应）\n- `--dpi N` - 输出分辨率（默认300）\n\n## 技术架构\n\n```\n输入DXF\n  ↓\n[预处理]\n  ├─ MBCS解码: \\M+XXXXX → GBK中文\n  ├─ Unicode解码: \\U+XXXX → 字符\n  ├─ %%编码: %%c→Ø, %%d→°, %%p→±\n  ├─ DIMENSION修复: insert(0,0) → 实际位置\n  ├─ 字体替换: STXIHEI.SHX → Noto Sans CJK\n  └─ 圆圈编号补全: 空圆圈 → 自动编号\n  ↓\n[页面检测]\n  ├─ 粉紫色图框(颜色6) → 主图页\n  └─ 实体聚集区域聚类 → 大样图页\n  ↓\n[ezdxf原生渲染]\n  ├─ HATCH填充(完整保留)\n  ├─ DIMENSION标注\n  ├─ TEXT/MTEXT文字\n  ├─ LINE/ARC/CIRCLE\n  └─ INSERT块引用\n  ↓\n[多页PDF输出]\n  ├─ 宽度固定A3\n  ├─ 高度按图框比例自适应\n  └─ 视图裁剪到图框范围\n```\n\n## 已知限制\n- 大样图检测基于网格聚类，极分散的实体可能误判\n- 天正自定义HATCH图案名（`\\M+`编码）无法显示为中文名\n- 需要STXIHEI.TTF等原版字体才能完美显示天正标注样式\n\n## 文件结构\n```\ncad2pdf/\n├── SKILL.md              # 本文档\n├── cad2pdf.sh            # Shell封装（支持DWG/DXF）\n└── scripts/\n    └── dxf2pdf.py        # 核心Python脚本\n```\n\nFile v2.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn71my9qhkbphhx5k1hcye6jz187k06n\",\n  \"slug\": \"cad2pdf\",\n  \"version\": \"2.0.0\",\n  \"publishedAt\": 1779979415780\n}\n\nFile v2.0.0:skill-card.md\n\n## Description:\n\nConverts 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.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[lgx281227231](https://clawhub.ai/user/lgx281227231)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers, 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.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Setup can make system-wide package changes and install dependencies with root privileges.\n\nMitigation: Install in a controlled VM or container, verify the ODA File Converter source and checksum, and prefer a Python virtual environment for Python dependencies.\n\nRisk: DWG conversion may process extra CAD files located in the same input folder.\n\nMitigation: Place the target DWG in a folder without unrelated or confidential drawings before conversion.\n\n## Reference(s):\n\n- [CAD2PDF ClawHub skill page](https://clawhub.ai/lgx281227231/skills/cad2pdf)\n- [ODA File Converter dependency](https://www.opendesign.com/guestfiles/get?filename=ODAFileConverter_QT6_lnxX64_8.3dll_27.1.deb)\n\n## Skill Output:\n\n**Output Type(s):** [guidance, shell commands, configuration, code, files]\n\n**Output Format:** [Markdown guidance with shell commands and generated PDF files]\n\n**Output Parameters:** [1D]\n\n**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.]\n\n## Skill Version(s):\n\n2.0.0 (source: frontmatter and server release evidence)\n\n## Ethical Considerations:\n\nUsers 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.\n\nArchive v1.0.0: 6 files, 11607 bytes\n\nFiles: cad2pdf.sh (3838b), README.md (2253b), scripts/dxf2pdf_cjk.py (15679b), skill-card.md (2207b), SKILL.md (3314b), _meta.json (126b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: cad2pdf\ndescription: CAD图纸转矢量PDF - 支持DWG/DXF格式，完整渲染中文标注、尺寸标注、填充图案\nversion: 1.0.0\nauthor: 老狗\ntags: [cad, dxf, dwg, pdf, 矢量, 工程图纸, 建筑, 造价]\nlicense: MIT\n---\n\n# CAD2PDF - CAD图纸转矢量PDF\n\n## 一句话介绍\nCAD图纸发过来，一条命令出矢量PDF，中文标注、尺寸标注、填充图案全保留。\n\n## 解决什么问题？\n- CAD图纸发微信：对方没CAD软件？→ 转PDF直接看\n- 图纸分享：DWG文件太大？→ 矢量PDF体积小、清晰度高\n- 打印出图：需要高质量PDF？→ 300DPI矢量输出\n- 中文乱码：其他工具中文显示不全？→ 完美支持中文标注\n\n## 功能清单\n- 📐 DXF转矢量PDF - 完整保留图形、文字、标注\n- 🏗️ DWG转DXF - 通过ODA File Converter自动转换\n- 🈶 中文支持 - Noto Sans CJK字体，不乱码\n- 📏 尺寸标注 - DIMENSION实体完整渲染\n- 🎨 填充图案 - HATCH实体正确显示\n- ✂️ 自动裁剪 - 检测图框，只保留图框内内容\n- 📝 文字合并 - 自动合并重叠文字，避免显示异常\n- 🔄 特殊编码 - %%c→Ø，%%132→Φ 正确转换\n\n## 依赖安装\n\n### 系统依赖\n```bash\n# ODA File Converter (DWG转DXF)\nwget \"https://www.opendesign.com/guestfiles/get?filename=ODAFileConverter_QT6_lnxX64_8.3dll_27.1.deb\" -O /tmp/ODAFileConverter.deb\nsudo dpkg -i /tmp/ODAFileConverter.deb\nsudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1\n\n# LibreCAD (备用方案)\nsudo apt-get install -y librecad\n\n# 中文字体\nsudo apt-get install -y fonts-noto-cjk\n```\n\n### Python依赖\n```bash\npip install ezdxf matplotlib --break-system-packages\n```\n\n## 使用方法\n\n### 基本用法\n```bash\n# DXF转PDF\npython3 scripts/dxf2pdf_cjk.py 图纸.dxf 输出.pdf\n\n# 指定纸张和DPI\npython3 scripts/dxf2pdf_cjk.py 图纸.dxf 输出.pdf --paper A3 --dpi 300\n\n# 批量转换\nfor f in *.dxf; do\n    python3 scripts/dxf2pdf_cjk.py \"$f\" \"${f%.dxf}.pdf\" -a -p A3\ndone\n```\n\n### 命令行参数\n- `--paper SIZE` - 纸张大小：A0/A1/A2/A3/A4（默认A3）\n- `--dpi N` - 输出分辨率（默认300）\n\n### DWG文件处理\nDWG文件需要先转DXF：\n```bash\n# 设置环境变量\nexport QT_QPA_PLATFORM_PLUGIN_PATH=/usr/bin/ODAFileConverter_27.1.0.0/plugins\n\n# DWG转DXF\nxvfb-run -a ODAFileConverter 输入目录 输出目录 ACAD2018 DXF 0 0\n\n# 再转PDF\npython3 scripts/dxf2pdf_cjk.py 输出文件.dxf 最终.pdf --paper A3\n```\n\n## 技术实现\n- **解析引擎**：ezdxf（Python DXF解析库）\n- **渲染引擎**：matplotlib（矢量图形渲染）\n- **中文字体**：Noto Sans CJK\n- **DWG转换**：ODA File Converter 27.1\n- **备用方案**：LibreCAD dxf2pdf\n\n## 输出规格\n- 格式：PDF 1.4\n- 颜色：黑白（所有实体统一黑色）\n- 裁剪：自动检测图框，图框外内容不显示\n- 文字：自动合并重叠文字，避免显示异常\n\n## 已知限制\n- DWG文件需要先安装ODA File Converter\n- 复杂的HATCH填充（样条曲线边界）可能显示不全\n- 尺寸标注的箭头符号（INSERT实体）未渲染，仅显示数值\n- 不支持3D实体渲染\n\n## 相关技能\n- pdf-toolkit-pro - PDF合并、分割、压缩\n- word-docx - Word文档处理\n- excel-xlsx - Excel表格处理\n\nFile v1.0.0:README.md\n\n# CAD2PDF - CAD图纸转矢量PDF\n\nCAD图纸（DWG/DXF）转矢量PDF，完整保留中文标注、尺寸标注、填充图案。\n\n## 功能\n\n- 📐 **DXF→矢量PDF** - 完整保留图形、文字、标注\n- 🏗️ **DWG→DXF** - 通过ODA File Converter自动转换\n- 🈶 **中文支持** - Noto Sans CJK字体，不乱码\n- 📏 **尺寸标注** - DIMENSION实体完整渲染\n- 🎨 **填充图案** - HATCH实体正确显示（夯实土壤、钢筋混凝土等）\n- ✂️ **自动裁剪** - 检测图框，只保留图框内内容\n- 📝 **文字合并** - 自动合并重叠文字\n- 🔄 **特殊编码** - `%%c`→Ø，`%%132`→Φ 正确转换\n\n## 快速开始\n\n### 安装依赖\n\n```bash\n# Python依赖\npip install ezdxf matplotlib\n\n# 中文字体（Ubuntu/Debian）\nsudo apt-get install -y fonts-noto-cjk\n\n# DWG支持（可选）\nwget \"https://www.opendesign.com/guestfiles/get?filename=ODAFileConverter_QT6_lnxX64_8.3dll_27.1.deb\" -O /tmp/ODAFileConverter.deb\nsudo dpkg -i /tmp/ODAFileConverter.deb\nsudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1\n```\n\n### 使用\n\n```bash\n# DXF转PDF\npython3 scripts/dxf2pdf_cjk.py 图纸.dxf 输出.pdf --paper A3 --dpi 300\n\n# 或用一键脚本（支持DWG/DXF）\nbash cad2pdf.sh 图纸.dwg\nbash cad2pdf.sh 图纸.dxf 输出.pdf --paper A3\n```\n\n### 参数\n\n| 参数 | 说明 | 默认值 |\n|------|------|--------|\n| `--paper` | 纸张大小 (A0/A1/A2/A3/A4) | A3 |\n| `--dpi` | 输出分辨率 | 300 |\n\n## 效果对比\n\n| 问题 | 本方案 |\n|------|--------|\n| 中文乱码 | ✅ Noto Sans CJK 完美支持 |\n| 尺寸标注丢失 | ✅ DIMENSION + MTEXT 完整渲染 |\n| 填充图案缺失 | ✅ HATCH EdgePath 正确解析 |\n| 文字重叠 | ✅ 自动合并邻近文字 |\n| 图框外内容 | ✅ 自动检测图框并裁剪 |\n\n## 技术实现\n\n- **解析引擎**：ezdxf（Python DXF解析库）\n- **渲染引擎**：matplotlib（矢量图形渲染）\n- **中文字体**：Noto Sans CJK\n- **DWG转换**：ODA File Converter 27.1\n\n## 已知限制\n\n- 尺寸标注的箭头符号（INSERT实体）未渲染，仅显示数值\n- 复杂的HATCH填充（样条曲线边界）可能显示不全\n- 不支持3D实体渲染\n\n## License\n\nMIT\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn71my9qhkbphhx5k1hcye6jz187k06n\",\n  \"slug\": \"cad2pdf\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1779947361372\n}\n\nFile v1.0.0:skill-card.md\n\n## Description: <br>\nConverts CAD drawings in DWG or DXF format into vector PDF files while preserving Chinese annotations, dimensions, and hatch patterns. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[lgx281227231](https://clawhub.ai/user/lgx281227231) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers, engineers, and CAD users can use this skill to convert DWG or DXF drawings into shareable vector PDF files for viewing, printing, or exchanging drawings without CAD software. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The setup flow installs Python packages, apt packages, and an optional ODA File Converter package. <br>\nMitigation: Verify the ODA download source, prefer a virtual environment or isolated runtime for Python dependencies, and install system packages only in approved environments. <br>\nRisk: CAD files may be untrusted inputs and conversion output may not fully render complex hatch boundaries, dimension arrow symbols, or 3D entities. <br>\nMitigation: Run conversion only on CAD files you trust and review the generated PDF before relying on it for engineering, printing, or sharing workflows. <br>\n\n\n## Reference(s): <br>\n- [CAD2PDF ClawHub release](https://clawhub.ai/lgx281227231/cad2pdf) <br>\n- [ODA File Converter download](https://www.opendesign.com/guestfiles/get?filename=ODAFileConverter_QT6_lnxX64_8.3dll_27.1.deb) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Shell commands, Configuration instructions, Guidance, Files] <br>\n**Output Format:** [Markdown with inline bash commands and generated PDF file paths] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Supports paper size and DPI options; generated output is a vector PDF.] <br>\n\n## Skill Version(s): <br>\n1.0.0 (source: server release metadata and artifact frontmatter) <br>\n\n## Ethical Considerations: <br>\nUsers 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. <br>","readmeExcerpt":"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","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"pip install ezdxf matplotlib --break-system-packages"},{"language":"bash","snippet":"# ODA File Converter\nwget \"https://www.opendesign.com/guestfiles/get?filename=ODAFileConverter_QT6_lnxX64_8.3dll_27.1.deb\" -O /tmp/ODAFileConverter.deb\nsudo dpkg -i /tmp/ODAFileConverter.deb\nsudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1\n\n# 中文字体\nsudo apt-get install -y fonts-noto-cjk"},{"language":"bash","snippet":"# DXF转PDF\npython3 scripts/dxf2pdf.py 图纸.dxf 输出.pdf\n\n# 指定纸张和DPI\npython3 scripts/dxf2pdf.py 图纸.dxf 输出.pdf --paper A3 --dpi 300\n\n# DWG文件（自动先转DXF）\nbash cad2pdf.sh 图纸.dwg 输出.pdf"},{"language":"bash","snippet":"bash cad2pdf.sh 图纸.dxf                    # 自动命名输出\nbash cad2pdf.sh 图纸.dxf 输出.pdf --paper A2"},{"language":"text","snippet":"输入DXF\n  ↓\n[预处理]\n  ├─ MBCS解码: \\M+XXXXX → GBK中文\n  ├─ Unicode解码: \\U+XXXX → 字符\n  ├─ %%编码: %%c→Ø, %%d→°, %%p→±\n  ├─ DIMENSION修复: insert(0,0) → 实际位置\n  ├─ 字体替换: STXIHEI.SHX → Noto Sans CJK\n  └─ 圆圈编号补全: 空圆圈 → 自动编号\n  ↓\n[页面检测]\n  ├─ 粉紫色图框(颜色6) → 主图页\n  └─ 实体聚集区域聚类 → 大样图页\n  ↓\n[ezdxf原生渲染]\n  ├─ HATCH填充(完整保留)\n  ├─ DIMENSION标注\n  ├─ TEXT/MTEXT文字\n  ├─ LINE/ARC/CIRCLE\n  └─ INSERT块引用\n  ↓\n[多页PDF输出]\n  ├─ 宽度固定A3\n  ├─ 高度按图框比例自适应\n  └─ 视图裁剪到图框范围"},{"language":"text","snippet":"cad2pdf/\n├── SKILL.md              # 本文档\n├── cad2pdf.sh            # Shell封装（支持DWG/DXF）\n└── scripts/\n    └── dxf2pdf.py        # 核心Python脚本"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: cad2pdf\ndescription: CAD图纸转矢量PDF - 支持DWG/DXF，自动按图框拆页，完整渲染中文、标注、填充\nversion: 2.0.0\nauthor: 老狗\ntags: [cad, dxf, dwg, pdf, 矢量, 工程图纸, 建筑, 造价]\nlicense: MIT\n---\n\n# CAD2PDF v2 - CAD图纸转矢量PDF\n\n## 一句话介绍\nCAD图纸发过来，一条命令出多页矢量PDF——自动按图框拆页、完整渲染填充/标注/中文。\n\n## 解决什么问题？\n- CAD图纸发微信：对方没CAD软件？→ 转PDF直接看\n- 多图框图纸：一张DWG里有N个大样？→ 自动拆成N页PDF\n- 中文乱码：天正CAD文字显示不全？→ MBCS编码自动解码\n- HATCH填充丢失：转PDF后材质看不出来？→ ezdxf原生渲染，完整保留\n\n## 核心特性\n- 📐 **ezdxf原生渲染引擎** - HATCH填充/尺寸标注/块引用完整渲染\n- ✂️ **自动拆页** - 检测粉紫色图框，每框一页\n- 🔍 **大样图检测** - 自动检测图框外实体聚集区域，独立页面\n- 🈶 **天正MBCS解码** - `\\M+5CDE2` → \"外\"，中文不乱码\n- 📏 **DIMENSION修复** - 标注insert在原点时自动移到实际位置\n- 🔢 **索引圆圈编号补全** - ODA转换丢失的SHX编号自动补绘\n- 🎨 **黑白输出** - 适配打印，不同材质用不同灰度区分\n\n## 依赖安装\n\n### Python依赖\n```bash\npip install ezdxf matplotlib --break-system-packages\n```\n\n### 系统依赖（DWG转DXF才需要）\n```bash\n# ODA File Converter\nwget \"https://www.opendesign.com/guestfiles/get?filename=ODAFileConverter_QT6_lnxX64_8.3dll_27.1.deb\" -O /tmp/ODAFileConverter.deb\nsudo dpkg -i /tmp/ODAFileConverter.deb\nsudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1\n\n# 中文字体\nsudo apt-get install -y fonts-noto-cjk\n```\n\n## 使用方法\n\n### 基本用法\n```bash\n# DXF转PDF\npython3 scripts/dxf2pdf.py 图纸.dxf 输出.pdf\n\n# 指定纸张和DPI\npython3 scripts/dxf2pdf.py 图纸.dxf 输出.pdf --paper A3 --dpi 300\n\n# DWG文件（自动先转DXF）\nbash cad2pdf.sh 图纸.dwg 输出.pdf\n```\n\n### Shell封装\n```bash\nbash cad2pdf.sh 图纸.dxf                    # 自动命名输出\nbash cad2pdf.sh 图纸.dxf 输出.pdf --paper A2\n```\n\n### 命令行参数\n- `--paper SIZE` - 纸张大小：A0/A1/A2/A3/A4（默认A3，宽度固定，高度按图框比例自适应）\n- `--dpi N` - 输出分辨率（默认300）\n\n## 技术架构\n\n```\n输入DXF\n  ↓\n[预处理]\n  ├─ MBCS解码: \\M+XXXXX → GBK中文\n  ├─ Unicode解码: \\U+XXXX → 字符\n  ├─ %%编码: %%c→Ø, %%d→°, %%p→±\n  ├─ DIMENSION修复: insert(0,0) → 实际位置\n  ├─ 字体替换: STXIHEI.SHX → Noto Sans CJK\n  └─ 圆圈编号补全: 空圆圈 → 自动编号\n  ↓\n[页面检测]\n  ├─ 粉紫色图框(颜色6) → 主图页\n  └─ 实体聚集区域聚类 → 大样图页\n  ↓\n[ezdxf原生渲染]\n  ├─ HATCH填充(完整保留)\n  ├─ DIMENSION标注\n  ├─ TEXT/MTEXT文字\n  ├─ LINE/ARC/CIRCLE\n  └─ INSERT块引用\n  ↓\n[多页PDF输出]\n  ├─ 宽度固定A3\n  ├─ 高度按图框比例自适应\n  └─ 视图裁剪到图框范围\n```\n\n## 已知限制\n- 大样图检测基于网格聚类，极分散的实体可能误判\n- 天正自定义HATCH图案名（`\\M+`编码）无法显示为中文名\n- 需要STXIHEI.TTF等原版字体才能完美显示天正标注样式\n\n## 文件结构\n```\ncad2pdf/\n├── SKILL.md              # 本文档\n├── cad2pdf.sh            # Shell封装（支持DWG/DXF）\n└── scripts/\n    └── dxf2pdf.py        # 核心Python脚本\n```"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn71my9qhkbphhx5k1hcye6jz187k06n\",\n  \"slug\": \"cad2pdf\",\n  \"version\": \"2.0.0\",\n  \"publishedAt\": 1779979415780\n}"},{"path":"skill-card.md","content":"## Description:\n\nConverts 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.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[lgx281227231](https://clawhub.ai/user/lgx281227231)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers, 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.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Setup can make system-wide package changes and install dependencies with root privileges.\n\nMitigation: Install in a controlled VM or container, verify the ODA File Converter source and checksum, and prefer a Python virtual environment for Python dependencies.\n\nRisk: DWG conversion may process extra CAD files located in the same input folder.\n\nMitigation: Place the target DWG in a folder without unrelated or confidential drawings before conversion.\n\n## Reference(s):\n\n- [CAD2PDF ClawHub skill page](https://clawhub.ai/lgx281227231/skills/cad2pdf)\n- [ODA File Converter dependency](https://www.opendesign.com/guestfiles/get?filename=ODAFileConverter_QT6_lnxX64_8.3dll_27.1.deb)\n\n## Skill Output:\n\n**Output Type(s):** [guidance, shell commands, configuration, code, files]\n\n**Output Format:** [Markdown guidance with shell commands and generated PDF files]\n\n**Output Parameters:** [1D]\n\n**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.]\n\n## Skill Version(s):\n\n2.0.0 (source: frontmatter and server release evidence)\n\n## Ethical Considerations:\n\nUsers 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."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"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","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":690,"uniquenessScore":63,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T19:56:00.573Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T19:56:00.573Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T23:48:07.138Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"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!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"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","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}