earthtojake/text-to-cad

GitHub: earthtojake/text-to-cad

为 AI Agent 提供一套覆盖 CAD 建模、机器人描述、制造文件生成和 3D 打印全流程的技能库,实现从自然语言到可制造工程文件的工作流。

Stars: 8767 | Forks: 1002

Demo of the CAD skill generating and previewing CAD geometry

 ██████╗ █████╗ ██████╗       ███████╗██╗  ██╗██╗██╗     ██╗     ███████╗

██╔════╝██╔══██╗██╔══██╗      ██╔════╝██║ ██╔╝██║██║     ██║     ██╔════╝

██║     ███████║██║  ██║      ███████╗█████╔╝ ██║██║     ██║     ███████╗

██║     ██╔══██║██║  ██║      ╚════██║██╔═██╗ ██║██║     ██║     ╚════██║

╚██████╗██║  ██║██████╔╝      ███████║██║  ██╗██║███████╗███████╗███████║

 ╚═════╝╚═╝  ╚═╝╚═════╝       ╚══════╝╚═╝  ╚═╝╚═╝╚══════╝╚══════╝╚══════╝

一个面向 CAD、机器人技术和硬件设计 agent 的技能库

[文档](https://www.cadskills.xyz) | [演示](https://demo.cadskills.xyz)

# CAD 技能 CAD 技能是一个 agent 技能库,用于从本地项目文件生成、检查、采购、切片以及移交 CAD 和机器人描述工件。 ## 🧰 技能 安装此库,可为 agent 提供专注于 CAD、制造、机器人描述文件、仿真和本地审查的工作流。 | 技能 | 简介 | 来源 | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | | CAD | 根据自然语言或图像请求创建和编辑 CAD 模型,以 STEP 为主要输出,并可选择导出为 STL、3MF 和 GLB。 | [skills/cad](skills/cad/SKILL.md) | | CAD 查看器 | 展示 CAD、G-code 和机器人文件的本地浏览器预览。 | [skills/cad-viewer](skills/cad-viewer/SKILL.md) | | step.parts | 查找现成的 STEP 零件,如螺丝、轴承、电机和连接器。 | [skills/step-parts](skills/step-parts/SKILL.md) | | DXF | 根据 Python 源码或 CAD 几何图形创建 2D DXF 图纸,如轮廓、模板、垫片和切割布局。 | [skills/dxf](skills/dxf/SKILL.md) | | URDF | 编写带有连杆、关节、极限、惯性和网格的机器人结构文件。 | [skills/urdf](skills/urdf/SKILL.md) | | SRDF | 向 URDF 添加 MoveIt 规划组、末端执行器、位姿和碰撞规则。 | [skills/srdf](skills/srdf/SKILL.md) | | SDF | 创建带有坐标系、物理属性、传感器和光照的仿真器模型与世界。 | [skills/sdf](skills/sdf/SKILL.md) | | SendCutSend | 在上传至 SendCutSend 之前检查 DXF 和 STEP 文件。 | [skills/sendcutsend](skills/sendcutsend/SKILL.md) | | G-code | 使用真实的切片器 CLI 将受支持的网格文件切片为经过验证且配置了打印机参数的 FDM `.gcode`。 | [skills/gcode](skills/gcode/SKILL.md) | | Bambu Labs | 从经验证的 `.gcode` 中试运行、上传并谨慎地启动本地 Bambu Lab 打印任务。 | [skills/bambu-labs](skills/bambu-labs/SKILL.md) | | Implicit CAD | 使用 GLSL 有符号距离场和 CAD 查看器光线步进渲染创建浏览器原生的隐式 CAD 模型。实验性功能。 | [skills/implicit-cad](skills/implicit-cad/SKILL.md) | ## 💻 安装说明 在生产环境中使用时,请从 `main` 分支安装或克隆;该分支包含 provider 安装程序所需的已生成 skill/plugin 输出。 ### 技能 使用 Skills CLI 安装 CAD 技能: ``` npx skills install earthtojake/text-to-cad ``` 这是首选的安装方式。它直接为受支持的 agent 安装各个技能。 ### 插件 Codex 和 Claude Code 还支持 provider 原生的 plugin 安装: ``` # Codex codex plugin marketplace add earthtojake/text-to-cad codex plugin add cad@text-to-cad ``` ``` # Claude Code claude plugin marketplace add earthtojake/text-to-cad claude plugin install cad@text-to-cad ``` 如果新安装的技能没有出现,请重启你的 agent。对于本地开发,请从 `develop` 分支切出,向 `develop` 提交 PR,并使用 [CONTRIBUTING.md](CONTRIBUTING.md) 中的 symlink 工作流。 ## 📸 截图
CAD skill demo showing generated geometry in CAD Viewer CAD URDF skill demo showing robot description output in CAD Viewer URDF SRDF MoveIt2 skill demo showing inverse kinematics in CAD Viewer SRDF / MoveIt2
## 🧪 基准测试 该仓库通过 Git LFS 将大型资产存储在 `assets/**` 和 `benchmarks/**` 中,并将这些目录排除在默认的 LFS 拉取之外,以便轻量级克隆不会获取 GIF 资产。基准测试的 Markdown 仍作为普通 Git 管理,以确保可读的 diff。要在本地仅补充基准测试资产,请运行: ``` git lfs pull --include="benchmarks/**" ```
# Target Prompt Output
1 Rectangular calibration block with four holes Create a centered 100 x 60 x 20 mm block with four 8 mm vertical through-holes. Add only a 2 mm chamfer on the top outer perimeter. Rectangular calibration block orbit gif
2 Circular flange with bolt-hole pattern Create an 80 mm diameter, 10 mm thick circular flange with a 30 mm central through-bore. Add six 6 mm through-holes on a 60 mm bolt circle and fillet the outside circular edges. Circular flange orbit gif
3 L-bracket with gussets and two hole directions Create an L-bracket from a base plate and rear vertical plate. Add vertical base holes, horizontal back-plate holes, two triangular gussets, and a filleted base/back transition. L-bracket orbit gif
4 Stepped shaft with keyway Create a 120 mm shaft along X with 20/30/20 mm diameter stepped sections. Add end chamfers and a shallow rectangular keyway on top of the middle section. Stepped shaft orbit gif
5 Open-top electronics enclosure with bosses Create a hollow open-top enclosure with 3 mm walls and floor. Add four internal standoffs with centered blind holes and 2 mm outside vertical corner fillets. Open-top electronics enclosure orbit gif
6 Aerospace-style clevis bracket with lightening cutouts Create a symmetric clevis bracket with a base plate, two rounded lugs, base mounting holes, and a horizontal lug bore. Add triangular lightening cutouts, reinforcing ribs, and rounded transitions. Clevis bracket orbit gif
7 Radial-engine-style cylinder with cooling fins Create a vertical engine-cylinder form with a central barrel, 12 cooling fins, a base flange, and a top cap. Add a 35 degree angled spark-plug boss with a coaxial through-hole. Radial-engine-style cylinder orbit gif
8 Centrifugal impeller with backward-curved blades Create a centrifugal impeller with a backplate, hub, and through-bore. Add 12 fused backward-curved blades sweeping about 45 degrees from root to tip. Centrifugal impeller orbit gif
9 Spiral staircase with helical handrail Create a miniature spiral staircase with a central column, base disk, and 20 rising wedge treads. Add a one-revolution helical handrail and vertical balusters at the tread outer ends. Spiral staircase orbit gif
10 Simplified planetary gear stage Create a flat planetary gear assembly with separate sun, planet, ring, carrier, and pin bodies. Use simplified trapezoidal teeth and place three planets around the sun on a 42 mm radius circle. Planetary gear stage orbit gif
## 🛠️ 贡献指南 开发工作在 `develop` 分支进行;请向 `develop` 而非 `main` 提交 PR。 有关本地贡献工作流、技能链接和验证指南,请参阅 [CONTRIBUTING.md](CONTRIBUTING.md)。
标签:AI智能体, CAD, 制造, 机器人, 硬件设计, 自定义脚本, 逆向工具