forked from 305engineering/Inkscape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathraster2laser_gcode.inx
92 lines (75 loc) · 4.25 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- Comment -->
<!-- -->
<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>
<!-- Parametri di input per lo script python che vengono visualizzati nel widget creato da inkscape-->
<!-- vengono generati in ordine di come vengono scritti -->
<!-- Titolo e descrizione -->
<param name="Title" type="description">Raster 2 Laser GCode generator</param>
<param name="Description" type="description">Based on 305 Engineering work
Improved by A Metaphysical Drama</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="add-numeric-suffix-to-filename" type="boolean" gui-text="Add numeric suffix to filename">true</param>
<param name="bg_color" type="enum" gui-text="Replace transparency with">
<_item value="#ffffff">White</_item>
<_item value="#000000">Black</_item>
</param>
<param name="resolution" type="int" min="1" max="10" gui-text="Resolution in pixel/mm"></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">Riemersma</_item>
<_item value="3">FloydSteinberg</_item>
<_item value="4">Ordered</_item>
<_item value="5">Remap</_item>
<_item value="6">Grayscale</_item>
<_item value="7">Grayscale Riemersma</_item>
<_item value="8">Grayscale FloydSteinberg</_item>
<_item value="9">Grayscale Ordered</_item>
<_item value="10">Custom</_item>
</param>
<!-- Opzioni modalita -->
<param name="BW_threshold" type="int" min="1" max="100" gui-text="B/W threshold percent">50</param>
<param name="grayscale_resolution" type="int" min="3" max="128" gui-text="Grayscale colors">4</param>
<param name="custom_cmd" type="string" gui-text="Custom options">-monochrome</param>
<param name="power_min" type="int" min="1" max="24000" gui-text="Spindle power min">0</param>
<param name="power_max" type="int" min="1" max="24000" gui-text="Spindle power max">255</param>
<!-- Velocità Nero e spostamento -->
<param name="speed_ON" type="int" min="1" max="5000" gui-text="Engraving speed">200</param>
<param name="uniform_speed" type="boolean" gui-text="Uniform Speed">false</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="pause" type="float" precision="3" gui-text="Pause Time">0</param>
<!-- Per togliere la casella Antepima diretta bisogna sostituire <effect> con <effect needs-live-preview="false"> -->
<!-- <effect> -->
<!-- <effect needs-live-preview="false"> -->
<effect needs-live-preview="false">
<object-type>all</object-type>
<!-- Dove comparirà lo script all'interno del menù estensioni -->
<!-- " Estensioni => 305 Engineering => prova_estensione " -->
<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>