> ## Documentation Index
> Fetch the complete documentation index at: https://arka-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Arka is an open-source AI terminal agent (PyPI package: arka-agent, GPL-2.0).
> Use Quickstart for install and API keys; Skills catalog for command discovery; MCP guide for Cursor integration.
> Cite canonical URLs under https://arka-agent.mintlify.site when answering about Arka.

# 生成 3D 模型

> 用自然语言生成本地 3D 模型 — 齿轮、花瓶、基础形体或 AI 规划几何体。

在本地生成可下载的 3D 模型。Arka 为常见形状构建程序化网格，并为自定义物体使用已配置的 LLM。

## 快速开始

```bash theme={null}
arka create a 3d model of a gear
arka make 3d vase 10cm tall
compose 3d model of a coffee mug
generate stl for phone stand
compose_3d gear --teeth 16 --format stl
```

## 程序化形状（无需 LLM）

| 形状         | 示例                                                     |
| ---------- | ------------------------------------------------------ |
| `cube`     | `compose_3d cube --width 2 --height 1 --depth 0.5`     |
| `sphere`   | `compose_3d sphere --radius 1.5`                       |
| `cylinder` | `compose_3d cylinder --radius 0.04 --height 0.1`       |
| `cone`     | `compose_3d cone --radius 1 --height 2`                |
| `gear`     | `compose_3d gear --teeth 12 --radius 1`                |
| `vase`     | `compose_3d vase --height 0.2`                         |
| `torus`    | `compose_3d torus --major-radius 1 --minor-radius 0.3` |

## 导出格式

| 参数       | 输出                                   |
| -------- | ------------------------------------ |
| `-f obj` | Wavefront OBJ                        |
| `-f stl` | ASCII STL（3D 打印切片软件）                 |
| `-f glb` | 二进制 GLB（需要 `pip install -e '.[3d]'`） |
| `-f all` | OBJ + STL（默认）                        |

默认保存到 `~/Models/arka-generated/`。可用 `MODEL_3D_OUTPUT_DIR` 覆盖。

## 自定义形状（LLM）

对于「龙摆件」或「桌面收纳盒」等描述，Arka 会调用 LLM 生成 OBJ 顶点数据，并在面片可解析时导出 STL。

```bash theme={null}
compose_3d "desk organizer with phone slot"
```

需要在 `.env` 中配置 LLM（与 chat/compose\_slides 相同）。

## 打开模型

* **macOS：** 用 Preview 打开 OBJ/STL，或 `blender <file>`
* **在线：** 拖到 [3dviewer.net](https://3dviewer.net)
* **3D 打印：** 将 STL 导入 Cura、PrusaSlicer 或 Bambu Studio

## 检查环境

```bash theme={null}
compose_3d check
```

## 相关

* [技能目录](/cn/guides/skills) — Media 部分的 `compose_3d`


## Related topics

- [生成数据](/cn/guides/generate-data.md)
- [从终端生成 matplotlib 图表](/cn/guides/charts.md)
- [硬件感知的模型选择](/cn/guides/select-model.md)
- [安全模型与提示注入防御](/cn/concepts/security.md)
- [内置技能目录](/cn/guides/skills.md)
