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

# 生成 3D 模型

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

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

## 快速开始

```bash theme={null}
arka create a 3d model of a gear
arka make 3d vase 10cm tall
arka compose 3d model of a coffee mug
arka generate stl for phone stand
arka 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}
arka 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}
arka compose_3d check
```

## 相关

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


## Related topics

- [3D 模型转透明图像](/cn/guides/model-to-image.md)
- [3D 场景合成](/cn/guides/scene-3d.md)
- [生成音乐](/cn/guides/generate-music.md)
- [PDF 转交互式网站](/cn/guides/pdf-interactive.md)
- [引擎内推测解码](/cn/guides/speculative-decoding.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.