# 生成3D打印G-code文件

由于3D打印功能比激光雕刻和写字绘画等功能复杂，我们在发货前不能完成开发工作。在我们的软件完成之前，我们推荐使用开源的Cura软件进行3D模型切片和生成G-code文件。

我们会尽快将3D打印功能集成到Rotrics Studio软件中，敬请期待。

## 第一时间体验3D打印功能

在使用Cura生成G-code文件之前，可以点击下方链接下载示例的3D打印G-code到桌面，第一时间体验Rotrics机械臂的3D打印功能。

{% file src="/files/-M7ahzwBXfAy-V-U2W3s" %}
Cura 4.6 Profiles & Samples for Rotrics V1.0
{% endfile %}

## 使用Cura生成G-code文件

#### 1) 点击下载[Cura](https://ultimaker.com/software/ultimaker-cura)，完成软件安装；

#### 2) 在[ROTRICS.COM](https://manual.rotrics.com/v1.0-chinese/3d_print_chn/www.rotrics.com)或点击下方链接下载Cura配置文件和测试模型

{% file src="/files/-M7ahzwBXfAy-V-U2W3s" %}
Cura 4.6 Profiles & Samples for Rotrics V1.0
{% endfile %}

#### 2) 打开Cura，第一次使用需要按照下述说明添加打印机；

第一次使用时，需要在Cura上新增打印机。添加打印机之后，后续打印直接跳转到第4）步生成G-code模型即可。

A. 点击左上角`Machine -> Add printer -> Add a non-networked printer -> Custom -> Custom FFF printer`

![](/files/-M5_ANNmJ8WFG73RiHMn)

B. 修改`Printer name`为`Rotrics V1.0`，点击`Add`添加打印机

![](/files/-M5_AUUhWaBx-CJIYnVq)

C. 配置打印机和挤出机参数

![](/files/-M5_BKReKjAPDWAOTNpB)

* X(Width) - 150 mm  `*附带垫板宽度，其他垫板尺寸需要对应设置`
* Y(Depth) - 150 mm  `*附带垫板长度，其他垫板尺寸需要对应设置`
* Z(Height) - 270 mm
* Origin at center - Yes
* G-code flavor - Marlin
* X min - 0
* Y min - 0
* X max - 0&#x20;
* Y max - 0
* Start G-code（直接复制下方指令即可），设置当前耗材位置为0，设置运动模式为直线运动
  * `M888 P3`
  * `G92 E0`&#x20;
  * `M2000` &#x20;
* End G-code，关闭冷却风扇，停止喷嘴加热
  * `M106 S0`
  * `M104 S0`
  * `G91`&#x20;
  * `G0 Z20`
  * `G90`
* 设置挤出机和耗材参数

![](/files/-M5_BTZvRnNeVUSxLKGD)

* Nozzle Size - 0.4 mm
* Compatible material diameter - 1.75 mm

D. 设置完成后，点&#x51FB;**`Next`**，即可完成打印机的添加。

#### 3) 点击左上角`Rotrics V1.0 -> Manage printers -> Profiles -> Import` 导入推荐的Rotrics打印配置文件。

如果没有在第2) 步下载Profile文件，也可以点击下面的链接下载：

{% file src="/files/-M7ahzwBXfAy-V-U2W3s" %}
Cura 4.6 Profiles & Samples for Rotrics V1.0
{% endfile %}

![](/files/-M5_FZU0brgL66oEPGtX)

也可以根据不同的材料和模型自定义打印参数，主要设置层厚、填充率、打印温度、打印速度等。

#### 4)将准备好的3D打印模型加载到工作区。

模型可以通过以下几种方式获取：

* 通过[Thingiverse](https://manual.rotrics.com/v1.0-chinese/3d_print_chn/www.thingiverse.com)等模型分享网站获得
* 使用Fusion 360，Solidworks等3维软件设计
* 使用3D扫描仪扫描生成

![](/files/-M5_OiNq4MvmQlgx79xL)

#### 5) 通过左侧区域旋转模型，调整模型大小、位置等。

![](/files/-M5_PIYl6ZZLHAp73-Ld)

#### 6) 调整完成后，点击右下角`Slice`，进行切片，切片完成后，点击`Save to File`，保存G-code文件到电脑上。

![](/files/-M5_Q-xyPo15wzzt7LpQ)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual.rotrics.com/v1.0-chinese/3d_print_chn/sheng-cheng-gcode-wen-jian.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
