java转CNC_Drawbot_image_to_gcode_v2

该代码用于为绘图机器人、极坐标绘图机或其他垂直绘图机器生成G代码。它接受原始图像,对其进行处理并生成一条路径,使其看起来类似于原始图像。特别是为了配合Copic马克笔而编写。该代码设计为可以进行大量修改,以生成不同的绘制风格。如果剪贴板包含图像URL,代码会自动下载。通过按键操作,可以调整图像、旋转、缩放、显示不同颜色的笔绘制的图像,并控制G代码的生成。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Drawbot_image_to_gcode_v2

951c9ae867615e1d2f033f1d1ac36427.png

This code is used to generate gcode for drawbots, polargraphs or other vertical drawing machines.

It takes an original image, manipulates it and generates a drawing path that kinda sorta looks like the original image.

This code was specifically written to work with multiple Copic markers.

The code was intended to be heavily modified to generate different and unique drawing styles.

If your clipboard contains a URL to an image, the code will download it. This makes finding usable images easy and straight forword.

If your clipboard contains a URL to a web site, the code will crash and burn in a spectacular fashion.

Key Bindings:

Key

Description

p

Load next "Path Finding Module" (PFM)

r

Rotate drawing

[

Zoom in

]

Zoom out

\

Reset drawing zoom, offset and rotation

O

Display original image (capital letter)

o

Display image to be drawn after pre-processing (lower case letter)

l

Display image after the path finding module has manipulated it

d

Display drawing with all pens

1

Display drawing, pen 0 only

2

Display drawing, pen 1 only

3

Display drawing, pen 2 only

4

Display drawing, pen 3 only

5

Display drawing, pen 4 only

6

Display drawing, pen 5 only

7

Display drawing, pen 6 only

8

Display drawing, pen 7 only

9

Display drawing, pen 8 only

0

Display drawing, pen 9 only

S

Stop path finding prematurely

Esc

Exit running program

<

Decrease the total number of lines drawn

>

Increase the total number of lines drawn

g

Generate all gcode, SVGs, and PDFs with lines as displayed

G

Toggle grid

t

Redistribute percentage of lines drawn by each pen evenly

y

Redistribute 100% of lines drawn to pen 0 ( Black/White/Sharpie )

9

Change distribution of lines drawn (lighten)

0

Change distribution of lines drawn (darken)

1

Increase percentage of lines drawn by pen 0

2

Increase percentage of lines drawn by pen 1

3

Increase percentage of lines drawn by pen 2

4

Increase percentage of lines drawn by pen 3

5

Increase percentage of lines drawn by pen 4

6

Increase percentage of lines drawn by pen 5

7

Increase percentage of lines drawn by pen 6

8

Increase percentage of lines drawn by pen 7

9

Increase percentage of lines drawn by pen 8

0

Increase percentage of lines drawn by pen 9

shift 0

Decrease percentage of lines drawn by pen 0

shift 1

Decrease percentage of lines drawn by pen 1

shift 2

Decrease percentage of lines drawn by pen 2

shift 3

Decrease percentage of lines drawn by pen 3

shift 4

Decrease percentage of lines drawn by pen 4

shift 5

Decrease percentage of lines drawn by pen 5

shift 6

Decrease percentage of lines drawn by pen 6

shift 7

Decrease percentage of lines drawn by pen 7

shift 8

Decrease percentage of lines drawn by pen 8

shift 9

Decrease percentage of lines drawn by pen 9

shift 0

Decrease percentage of lines drawn by pen 0

{

Change Copic marker sets, increment

}

Change Copic marker sets, decrement

Examples of drawings made with this software: http://dullbits.com/drawbot/gallery

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值