# 使用第三方软件生成写字绘画Gcode

这部分内容是关于如何使用Inkscape或Adobe Illustrator等第三方软件生成写字绘画Gcode的。

💡**Tips:** 如果已经成功使用Rotrics Studio生成了写字绘画的Gcode，可以跳过这部分内容。

## 使用Inkscape生成写字绘画G-code

Inkscape是一款开源的矢量图形编辑软件，可以很方便的设计或编辑矢量图形，配合丰富的扩展插件，可以完成包括矢量图形编辑、灰度图处理等多种操作，可以导出SVG文件或使用扩展插件生成Gcode。

#### 在开始前，确定已经完成了InkScape软件的安装

下载链接：<https://inkscape.org/release/inkscape-0.92.5/>

#### 1) 下载InkScape导出G-code扩展插件

{% file src="/files/-M5WIS-7bjeB5o9pFCP2" %}
Inkscape G-code Extension
{% endfile %}

**2)安装Rotrics扩展插件**

![](/files/-M5VYAHV4uZcYjwRHMIt)

\*Windows复制到Inkscape安装目录下的Extensions文件夹下，一般是：`\Program Files\Inkscape\share\extensions`

\*Mac OS复制到Inkscape安装目录下的Extensions文件夹下，一般是：`/Applications/Inkscape.app/Contents/Resources/extensions`

\*插件安装完成后，需要重启软件。

#### 3) 打开InkScape，新建一个A4大小的画布

<div align="left"><img src="/files/-M5VdfEI5ljo7VRglljR" alt=""></div>

\*选择竖版，因为机械臂X轴方向的工作范围较短。

#### 4) 导入准备好的SVG文件

![](/files/-M5VgwQodfjbIM4o5sJz)

#### 5) 调整尺寸，确保不会超出A4范围

![](/files/-M5Vg07KbSIWBImxJi8t)

#### 6) 调整图片位置，保证图片中心在X0 Y0位置。

![](/files/-M5WIkkxmASpdUfLa5ND)

***\***&#x58;轴坐标为图片宽度的1/2，Y轴坐标为图片高度的1/2。*

#### 7) 点击`扩展->Rotrics Drawing` 打开插件

![](/files/-M5WGJTXAWZUPFLRPgjB)

#### 8) 输入Rotrics 绘画配置参数

<div align="left"><img src="/files/-M5WGAvZOO92spvNFT2M" alt=""></div>

* Pen Height Down - 绘画落笔高度，输入从Rotrics Studio获得的绘画高度
  * G0 Z-
* Pen Height Up - 绘画抬笔高度，一般比落笔高度高5-10mm
  * G0 Z-

#### 9) 设置G-code保存位置和文件名

<div align="left"><img src="/files/-M5WGk2xq8Pv61tVIypt" alt=""></div>

#### 10) 点击Apply，即可生成G-code

## 使用Adobe Illustrator生成写字绘画G-code

Adobe Illustrator是Adobe公司出品的一款矢量图形编辑软件，功能强大，大量应用于矢量图形设计领域。配合插件脚本可以生成Rotrics机械臂所需的写字绘画Gcode文件。

#### 在开始之前，确认已经完成了Adobe Illustrator软件的安装。

#### 1) 下载Adobe Illustrator G-code插件和Rotrics绘画配置文件

{% file src="/files/-M5UuMd5hmyWfO3BZJUE" %}
Adobe Illustrator G-code Entension & Rotrics Drawing Configuration
{% endfile %}

#### 2) 安装Export to G-code插件

<div align="left"><img src="/files/-M5UoCn50F7oeT_lrDpi" alt=""></div>

\*Windows系统安装到Adobe Illustrator安装文件夹下的脚本文件夹，一般是 `Program Files (x86)\Adobe\Illustrator2019\Adobe Illustrator CC 2019\Presets\zh_CN\脚本`

\*Mac OS安装到Illustrator安装文件夹下的脚本文件夹，一般是

\*插件安装完成后，需要重启软件。

#### 3) 打开Adobe Illustrator，新建一个A4大小的画布

\*选择竖版，因为机械臂X轴的工作范围较短。

#### 4) 导入准备好的SVG文件

![](/files/-M5WJMcUSL0whlg2XBJo)

#### 5) 调整图片尺寸，确保未超出A4工作区域

![](/files/-M5WJWNWc4j5ZSYel0pu)

#### 6) 将图片坐标设置为X0，Y0

![](/files/-M5WJmv_qxpALs0G0V-z)

#### 7) 点击左上角`文件->脚本->Export to G-code 1.1`打开插件

![](/files/-M5WFeJ8MdSpzTPkiQcY)

#### 8) 输入绘画配置文件

<div align="left"><img src="/files/-M5WEbFOMY-rzEPC2rxU" alt=""></div>

* ON Command - 绘画落笔高度，输入从Rotrics Studio获得的绘画高度
  * G0 Z-
* OFF Command - 绘画抬笔高度，一般比落笔高度高5-10mm
  * G0 Z-

❗抬笔高度一定要比落笔高度高，否则可能损伤机械臂。如果有任何问题，请立即关闭机械臂电源。

\*其他设置项留空。

#### 9) 点击Directory设置文件保存位置，设置文件名

<div align="left"><img src="/files/-M5WEo7edTGNkNwMW1aQ" alt=""></div>

\*文件名记得加`.gcode`后缀

#### 10) 点击Generate G-code，即可生成G-code

## 使用Rotrics Studio发送G-code

#### 1) 打开Rotrics Studio，连接机械臂

#### 2) 切换到Basic界面，点击HOME使机械臂运动到HOME点

#### 4) 点击右上角的G-code，导入准备好的G-code文件

#### 5) 点击▶按钮，即可开始绘制

## 使用触控屏开始绘制

#### 1) 将准备好的G-code文件拷贝到触控屏SD卡&#x7684;**`g-code`**&#x6587;件夹；

#### 2) 将触控屏连接到机械臂；

#### 3) 点击Basic -> HOME，初始化机械臂；&#x20;

#### 4) 点击`SD Card`，选择对应的G-code文件，点&#x51FB;**`Start`**&#x5373;可开始运行；


---

# 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/drawing_and_writing_chn/sheng-cheng-gcode-wen-jian/shi-yong-di-san-fang-ruan-jian-sheng-cheng-xie-zi-hui-hua-gcode.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.
