← 返回
未分类 中文

Agentcad Skill

CAD tool for AI agents. Use when the user asks you to design, model, or build a 3D object. agentcad executes build123d or CadQuery Python scripts and produce...
AI 代理的 CAD 工具,用于在用户请求设计、建模或构建 3D 对象时执行 build123d 或 CadQuery Python 脚本并生成结果。
jdilla1277 jdilla1277 来源
未分类 clawhub v0.2.4 3 版本 100000 Key: 无需
★ 1
Stars
📥 641
下载
💾 0
安装
3
版本
#cad#latest#stable

概述

agentcad — CAD tool for AI agents

You have access to agentcad, a CLI that turns build123d or CadQuery Python scripts into

3D geometry. All output is JSON. Every command returns "command" and "status" keys.

First-time setup

agentcad init --name <project_name>
agentcad --help   # Read this — it is your complete operational briefing

Core workflow

  1. Write a script. No imports needed — build123d primitives,

show_object, and agentcad edit helpers are pre-injected by default.

show_object(result) is required.

  1. Dry-run first to check metrics without consuming a version:

```bash

agentcad run script.py --output test --dry-run

```

Check volume, dimensions, is_valid in the response.

  1. Run for real. Visual feedback is on by default:

```bash

agentcad run script.py --output label

```

Every successful run produces (paths in the JSON response):

  • preview.png — 4-view composite (front, right, top, iso). Read this

to confirm the part looks right before iterating. One image, all 4 angles.

  • diff.side_by_side — side-by-side PNG vs the most recent successful prior

version. Read this when iterating to see what your change did.

  • diff.overlay — tinted (green prev, red this) overlay for subtle shifts.

Read only if side-by-side didn't resolve the question.

  • viewer.html — interactive 3D viewer for the user (humans only; you can't

render HTML). Mention it to the user so they open it.

Pass --no-preview only for tight parametric sweeps where latency matters.

  1. Show the user. After a successful build, open the interactive viewer:

```bash

agentcad view v1_label/viewer.html # or output.step / output.glb

```

Users expect to see the result in a browser. Do this every run, unprompted.

  1. Inspect if invalid. If is_valid: false or geometry looks wrong:

```bash

agentcad inspect v1_label/output.step

```

  1. Iterate. Fix the script, run with a new --output label. Use

agentcad diff 1 2 to compare versions.

Script writing rules

  • show_object(result) is required — at least one call.
  • These are pre-injected by default (no import needed):

build123d primitives like Box, Cylinder, Sphere, Plane, plus

show_object, load_step, pick_face, pick_edge, fillet_edges,

chamfer_edges, shell_faces, cut_pocket, boss, split_by_plane,

and replace_face.

  • CadQuery remains supported. Use import cadquery as cq, initialize with

agentcad init --runtime cadquery, or pass --runtime cadquery.

  • CadQuery helper paths operate on TopoDS_Shape. Bridge with .val().wrapped:

```python

import cadquery as cq

part = cq.Workplane('XY').box(10, 20, 5).val().wrapped

moved = translate(part, 50, 0, 0)

```

  • To show helper output:

```python

import cadquery as cq

show_object(cq.Workplane('XY').newObject([cq.Shape.cast(topo_shape)]))

```

  • For OCP internals (gp_Pnt, BRepPrimAPI, etc.), import manually.

Key commands

CommandPurpose
------------------
agentcad init --name NAMEInitialize project
agentcad run SCRIPT --output LABELExecute script, produce STEP + metrics
agentcad run ... --dry-runMetrics only, no version consumed
agentcad run ... --no-previewSuppress preview (on by default)
agentcad run ... --render iso,frontPNG views
agentcad run ... --export stl,glbMesh export
agentcad run ... --params k=v,k=vOverride script parameters
agentcad render STEP --view SPECPost-hoc renders with camera control
agentcad export STEP --format stl,glbPost-hoc mesh export
agentcad inspect STEPTopology report (validity, free edges)
agentcad diff REF1 REF2Compare versions
agentcad contextProject state
agentcad docs [SECTION]Deep-dive docs (16 sections)
agentcad view FILERun this after every successful build — opens GLB/STEP in the user's browser

Debugging playbook

  1. Check metrics firstvolume and dimensions catch most issues.
  2. Read preview.png — the 4-view composite. Fastest way to spot obvious problems.
  3. Read diff.side_by_side if iterating — confirms your change did what you intended.
  4. Negative volume? Wire winding is backwards (CW instead of CCW).
  5. is_valid: false? Run agentcad inspect — check free_edge_count and shell status.
  6. Hollow shape? free_edge_count > 0 means open shell.
  7. Complex profiles (gears, splines)? Use subtractive construction — cut from

a blank cylinder/box instead of building up. See agentcad docs patterns.

Patterns

  • Build at origin, then position: Create geometry at origin, use translate()

and rotate() to place it.

  • Compound vs Union: makeCompound() for assemblies (parts stay separate),

.union() for boolean fuse into one solid.

  • Parametric scripts: Top-level variable assignments become overridable via

--params. Use this for iteration.

  • Named parts: show_object(shape, name="wheel", options={"color": "red"})

for per-part metrics and colored GLB export.

版本历史

共 3 个版本

  • v0.2.4 当前
    2026-06-03 13:01
  • v0.2.0
    2026-05-07 03:58 安全 安全
  • v0.1.6
    2026-05-03 07:23 安全 安全

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,113 📥 834,901
dev-programming

Agentcad Skill

jdilla1277
AI代理的CAD工具。当用户要求设计、建模或构建3D对象时使用。agentcad执行CadQuery Python脚本并生成STEP文件,...
★ 0 📥 358
ai-agent

Find Skills

guipi888
场景驱动+关键词双模式技能发现工具。当用户用自然语言描述场景/需求(如"我想做一个海报""帮我分析股票"),或明确说"安装技能/find skills/找个skill"时,自动从官方内置、本地已安装、SkillHub、虾评、GitHub、C
★ 1,479 📥 542,093