forked from 305engineering/Inkscape
-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathraster2laser_gcode.inx
93 lines (78 loc) · 3.92 KB
/
raster2laser_gcode.inx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<!-- Nome con cui compare l'estensione nel menù, fa casino con gli underscore _ -->
<name>Raster 2 Laser GCode generator</name>
<!-- il campo ID deve essere univoco -->
<id>com.305engineering.raster2laser_gcode</id>
<!-- Dipendenze, basta solo lo script python principale -->
<!-- <dependency type="executable" location="extensions">raster2laser_gcode.py</dependency> -->
<!-- <dependency type="executable" location="extensions">inkex.py</dependency> -->
<!-- Titolo e descrizione -->
<param name="Title" type="description">Raster 2 Laser GCode generator</param>
<param name="Description" type="description">created by 305 Engineering - Tweaked to work on Inkscape 1.x (+BFerrarese)</param>
<!-- Opzioni di esportazione dell'immagine -->
<param name="directory" type="string" gui-text="Export directory"></param>
<param name="filename" type="string" gui-text="File Name"></param>
<param name="extension" type="string" gui-text="File Name extension">ngc</param>
<param name="add-numeric-suffix-to-filename" type="boolean" gui-text="Add numeric suffix to filename">true</param>
<param name="resolution" type="enum" gui-text="Resolution">
<_item value="1">1 pixel/mm</_item>
<_item value="2">2 pixel/mm</_item>
<_item value="5">5 pixel/mm</_item>
<_item value="10">10 pixel/mm</_item>
</param>
<!-- Come convertire in scala di grigi -->
<param name="grayscale_type" type="enum" gui-text="Color to Grayscale conversion">
<_item value="1">0.21R + 0.71G + 0.07B</_item>
<_item value="2">(R+G+B)/3</_item>
<_item value="3">R</_item>
<_item value="4">G</_item>
<_item value="5">B</_item>
<_item value="6">Max Color</_item>
<_item value="7">Min Color</_item>
</param>
<!-- Modalità di conversione in Bianco e Nero -->
<param name="conversion_type" type="enum" gui-text="B/W conversion algorithm ">
<_item value="1">B/W fixed threshold</_item>
<_item value="2">B/W random threshold</_item>
<_item value="3">Halftone</_item>
<_item value="4">Halftone row</_item>
<_item value="5">Halftone column</_item>
<_item value="6">Grayscale</_item>
</param>
<!-- Opzioni modalita -->
<param name="BW_threshold" type="int" min="1" max="254" gui-text="B/W threshold">128</param>
<param name="grayscale_resolution" type="enum" gui-text="Grayscale resolution ">
<_item value="1">256</_item>
<_item value="2">128</_item> <!-- 256/2 -->
<_item value="4">64</_item> <!-- 256/4 -->
<_item value="8">32</_item> <!-- 256/8 -->
<_item value="16">16</_item> <!-- 256/16 -->
<_item value="32">8</_item> <!-- 256/32 -->
</param>
<!-- Velocità Nero e spostamento -->
<param name="feed" type="int" min="1" max="5000" gui-text="Engraving speed mm/s">200</param>
<param name="power" type="int" min="1" max="100" gui-text="Laser power %">80</param>
<!-- FLIP = coordinate Cartesiane (False) Coordinate "informatiche" (True) -->
<param name="flip_y" type="boolean" gui-text="Flip Y">false</param>
<!-- Homing -->
<param name="homing" type="enum" gui-text="Homing ?">
<_item value="1">G28 (Standard)</_item>
<_item value="2">$H (GRBL)</_item>
<_item value="3">No Homing</_item>
</param>
<param name="laseron" type="string" gui-text="Laser ON Command">M03</param>
<param name="laseroff" type="string" gui-text="Laser OFF Command">M05</param>
<param name="laser_max_value" type="int" min="1" max="12000" gui-text="Laser max power value">255</param>
<param name="laserminsw" type="boolean" gui-text="ON/OFF only at the beginning and end of the file">true</param>
<effect needs-live-preview="false">
<object-type>all</object-type>
<effects-menu>
<submenu name="305 Engineering"/>
</effects-menu>
</effect>
<!-- Script python da eseguire -->
<script>
<command reldir="extensions" interpreter="python">raster2laser_gcode.py</command>
</script>
</inkscape-extension>