Xpersona
D

Dxf Handle

CLAWHUB · Unverified

DWG/DXF CAD 图纸处理工具。使用 ezdxf 读取图纸,遍历图层信息,计算面积或周长。适用于室内设计房间量房统计。 Skill: Dxf Handle Owner: mapleslove Summary: DWG/DXF CAD 图纸处理工具。使用 ezdxf 读取图纸,遍历图层信息,计算面积或周长。适用于室内设计房间量房统计。 Tags: latest:1.0.0 Version history: v1.0.0 | 2026-03-31T11:11:08.675Z | auto Initial release of dxf-handle - Provides a command-line tool for DWG/DXF CAD file processing using ezdxf. - Supports area and perimeter calculations for all or single configured CAD layers. - Requires a configurable JSON file to define

62
Rank
84
Safety
1.6k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.6K 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

Install and run

Setup complexity: low.

clawhub skill install s17eggbqe3epjkd0bmstdt0ad583gwhm:dxf-handle
  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-mapleslove-dxf-handle/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

5,495 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: dxf-handle
description: DWG/DXF CAD 图纸处理工具。使用 ezdxf 读取图纸,遍历图层信息,计算面积或周长。适用于室内设计房间量房统计。
---

# Dxf-Handle

DWG/DXF 图纸图层遍历和面积/周长计算工具。

## 前提条件

```bash
pip install ezdxf
```

## 使用方法

使用技能时需要提供:
1. **DWG 文件路径**(必填)
2. **图层配置 JSON**(必填,参考下方格式)
3. **查询模式**(四选一):
   - 全部查询面积
   - 全部查询周长
   - 单个查询面积
   - 单个查询周长

## 图层配置格式

在 `references/layers.json` 中配置图层:

```json
{
  "layers": [
    {"layerName": "JS_客厅区域框线", "description": "客厅"},
    {"layerName": "JS_主卧区域框线", "description": "主卧"},
    {"layerName": "JS_次卧区域框线", "description": "次卧"},
    {"layerName": "JS_客卧1区域框线", "description": "客卧1"},
    {"layerName": "JS_客卧2区域框线", "description": "客卧2"},
    {"layerName": "JS_南阳台区域框线", "description": "南阳台"},
    {"layerName": "JS_北阳台区域框线", "description": "北阳台"},
    {"layerName": "JS_厨房区域框线", "description": "厨房"},
    {"layerName": "JS_公卫区域框线", "description": "公卫"},
    {"layerName": "JS_内卫区域框线", "description": "内卫"}
  ]
}
```

## 命令示例

### 1. 全部查询面积
计算所有配置图层的面积

```bash
python skills/dxf-handle/scripts/dxf_handle.py 你的图纸.dwg --type area
```

**输出示例:**
```
读取文件: 你的图纸.dwg
计算类型: area
配置了 10 个图层
扫描图层...
  找到: JS_客厅区域框线 (1 个多段线)
  找到: JS_主卧区域框线 (1 个多段线)

共匹配 2 个图层, 其中 2 个有有效数据
----------------------------------------
客厅: 25.60 m²
主卧: 18.20 m²

完成!
```

### 2. 全部查询周长
计算所有配置图层的周长

```bash
python skills/dxf-handle/scripts/dxf_handle.py 你的图纸.dwg --type perimeter
```

**输出示例:**
```
读取文件: 你的图纸.dwg
计算类型: perimeter
配置了 10 个图层
扫描图层...

共匹配 0 个图层, 其中 0 个有有效数据

未找到匹配的实体
```

### 3. 单个查询面积
查询指定房间的面积

```bash
python skills/dxf-handle/scripts/dxf_handle.py 你的图纸.dwg --query 客厅 --type area
```

**输出示例(有图层):**
```
客厅: 25.60 m²
```

**输出示例(无图层):**
```
没找到客厅图层
```

### 4. 单个查询周长
查询指定房间的周长

```bash
python skills/dxf-handle/scripts/dxf_handle.py 你的图纸.dwg --query 客厅 --type perimeter
```

**输出示例(有图层):**
```
客厅: 20.30 m
```

**输出示例(无图层):**
```
没找到客厅图层
```

## CSV 导出

使用 `--output` 参数导出 CSV 文件:

```bash
python skills/dxf-handle/scripts/dxf_handle.py 你的图纸.dwg --type area -o result.csv
```

**CSV 格式:**
```csv
名称,图层,数量,面积
客厅,JS_客厅区域框线,1,25.60
主卧,JS_主卧区域框线,1,18.20
```

_meta.json

{
  "ownerId": "kn7bxtn19vmpf767vvf46pmvy583b7vc",
  "slug": "dxf-handle",
  "version": "1.0.0",
  "publishedAt": 1774955468675
}

references/layers.json

{
  "layers": [
    {"layerName": "JS_客厅区域框线", "description": "客厅"},
    {"layerName": "JS_主卧区域框线", "description": "主卧"},
    {"layerName": "JS_次卧区域框线", "description": "次卧"},
    {"layerName": "JS_客卧1区域框线", "description": "客卧1"},
    {"layerName": "JS_客卧2区域框线", "description": "客卧2"},
    {"layerName": "JS_南阳台区域框线", "description": "南阳台"},
    {"layerName": "JS_北阳台区域框线", "description": "北阳台"},
    {"layerName": "JS_厨房区域框线", "description": "厨房"},
    {"layerName": "JS_公卫区域框线", "description": "公卫"},
    {"layerName": "JS_内卫区域框线", "description": "内卫"}
  ]
}

skill-card.md

## Description:

Dxf Handle helps agents process DWG/DXF CAD drawings with ezdxf to traverse configured layers and calculate room areas or perimeters.

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

## Publisher:

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

### License/Terms of Use:

MIT-0

## Use Case:

Developers, designers, and CAD workflow maintainers use this skill to run local DWG/DXF measurement commands against configured room layers, then report area or perimeter results and optionally export CSV data.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill reads local CAD files and can write CSV output to a user-specified path.

Mitigation: Run it in a virtual environment, review the input and output paths before execution, and avoid writing CSV files over important local files.

Risk: The skill depends on ezdxf for CAD parsing.

Mitigation: Install ezdxf in an isolated environment and consider pinning it to a reviewed version.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/mapleslove/skills/dxf-handle)
- [Layer configuration example](artifact/references/layers.json)

## Skill Output:

**Output Type(s):** [Shell commands, Configuration, Text, CSV]

**Output Format:** [Markdown guidance with command examples, terminal output, and optional CSV files]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Reads local DWG/DXF files and a JSON layer configuration; optional CSV export writes to the user-specified output path.]

## Skill Version(s):

1.0.0 (source: server release metadata)

## 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.

Sponsored

Ads related to Dxf Handle and adjacent AI workflows.