-
Notifications
You must be signed in to change notification settings - Fork 100
/
gcodetools-dev.inx
executable file
·422 lines (353 loc) · 22 KB
/
gcodetools-dev.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
<?xml version="1.0" encoding="UTF-8"?>
<!-- Gcodetools: header block -->
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<!-- Gcodetools: name -->
<name>Gcodetools dev</name>
<!-- Gcodetools: /name -->
<!-- Gcodetools: id -->
<id>ru.cnc-club.filter.gcodetools_dev</id>
<!-- Gcodetools: /id -->
<dependency type="executable" location="extensions">gcodetools-dev.py</dependency>
<dependency type="executable" location="extensions">inkex.py</dependency>
<param name='active-tab' type="notebook">
<!-- Gcodetools: /header block -->
<!-- Gcodetools: help block -->
<page name='help' _gui-text='Help'>
<_param name="fullhelp" type="description" xml:space="preserve">
Gcodetools plug-in: converts paths to Gcode (using circular interpolation), makes offset paths and engraves sharp corners using cone cutters.
This plug-in calculates Gcode for paths using circular interpolation or linear motion when needed.
Tutorials, manuals and support can be found at
English support forum:
http://www.cnc-club.ru/gcodetools
and Russian support forum:
http://www.cnc-club.ru/gcodetoolsru
Credits: Nick Drobchenko, Vladimir Kalyaev, John Brooker, Henry Nicolas.
Gcodetools ver. 1.6
</_param>
</page>
<!-- Gcodetools: /help block -->
<!-- Gcodetools: options block -->
<page name='options' _gui-text='Options'>
<param name="Zscale" type="float" precision="5" min="-100000" max="100000" _gui-text="Scale along Z axis:">1</param>
<param name="Zoffset" type="float" precision="5" min="-100000" max="100000" _gui-text="Offset along Z axis:">0.0</param>
<param name="auto_select_paths" type="boolean" _gui-text="Select all paths if nothing is selected">true</param>
<param name="min-arc-radius" type="float" precision="5" min="-1000" max="1000" _gui-text="Minimum arc radius:">0.05</param>
<param name="comment-gcode" type="string" _gui-text="Comment Gcode:"></param>
<param name="comment-gcode-from-properties" type="boolean" _gui-text="Get additional comments from object's properties">False</param>
<param name="debug-level" type="string" _gui-text="Debug level">0b0000000</param>
<param name="drilling-strategy" type="optiongroup" _gui-text="Drilling Strategy">
<option value='drillg01'>G01 : drills straight to the bottom of the hole</option>
<option value='drillg73'>G73 : drills with small upward moves on each step</option>
<option value='drillg83'>G83 : drills with complete retract moves on each step</option>
</param>
</page>
<!-- Gcodetools: /options block -->
<!-- Gcodetools: preferences block -->
<page name='preferences' _gui-text='Preferences'>
<param name="filename" type="string" _gui-text="File:">output.ngc</param>
<param name="add-numeric-suffix-to-filename" type="boolean" _gui-text="Add numeric suffix to filename">true</param>
<param name="directory" type="string" _gui-text="Directory:">/home</param>
<param name="Zsafe" type="float" precision="5" min="-1000" max="1000" _gui-text="Z safe height for G00 move over blank:">5</param>
<param name="unit" type="enum" _gui-text="Units (mm or in):">
<_item value="G21 (All units in mm)">mm</_item>
<_item value="G20 (All units in inches)">in</_item>
</param>
<param name="postprocessor" type="enum" _gui-text="Post-processor:">
<_item value=" ">None</_item>
<_item value="parameterize();">Parameterize Gcode</_item>
<_item value="flip(y);parameterize();">Flip y axis and parameterize Gcode</_item>
<_item value="round(4);">Round all values to 4 digits</_item>
<_item value='regex("G01 Z([0-9\.\-]+).*\(Penetrate\)", lambda match: "G00 Z%f (Fast pre-penetrate)\n%s" %(float(match.group(1))+5, match.group(0)));'>Fast pre-penetrate</_item>
</param>
<param name="postprocessor-custom" type="string" _gui-text="Additional post-processor:"></param>
<param name="preprocessor-custom" type="string" _gui-text="Additional pre-processor:"></param>
<param name="create-log" type="boolean" _gui-text="Generate log file">false</param>
<param name="log-filename" type="string" _gui-text="Full path to log file:"></param>
</page>
<!-- Gcodetools: /preferences block -->
<!-- Gcodetools: importoth block -->
<page name='importoth' _gui-text='Import'>
<_param name="help" type="description">
Imports files from other systems.
</_param>
<param name="importoth-filename" type="string" _gui-text="Full path to file:"></param>
<param name="importoth-type" type="enum" _gui-text="Select file type:">
<_item value="KiCAD gerber decimal,mm,absolute">kicad-dec-abs-mm</_item>
</param>
</page>
<!-- Gcodetools: /importoth block -->
<!-- Gcodetools: dxfpoints block -->
<page name='dxfpoints' _gui-text='DXF points'>
<_param name="help" type="description" xml:space="preserve">
Convert selected objects to drill points (as dxf_import plugin does). Also you can save original shape.
If path is not closed, the last ending node will be omitted. If path is closed, all nodes will be converted.
Also you can manually select object, open XML editor (Shift+Ctrl+X) and add or remove XML tag 'dxfpoint' with any value.
</_param>
<param type='optiongroup' name='dxfpoints-action' _gui-text="Convert selection:">
<_option value='save'>set as dxfpoint and save shape</_option>
<_option value='replace'>set as dxfpoint and draw arrow</_option>
<_option value='clear'>clear dxfpoint sign</_option>
</param>
</page>
<!-- Gcodetools: /dxfpoints block -->
<!-- Gcodetools: ptg block -->
<page name='path-to-gcode' _gui-text='Path to Gcode'>
<param name="biarc-tolerance" type='float' precision="5" _gui-text='Biarc interpolation tolerance:'>1</param>
<param name="biarc-max-split-depth" type="int" _gui-text="Maximum splitting depth:">4</param>
<param name="path-to-gcode-order" _gui-text="Cutting order" type="optiongroup" appearance="minimal">
<_option value="subpath by subpath">Subpath by subpath</_option>
<_option value="path by path">Path by path</_option>
<_option value="pass by pass">Pass by Pass</_option>
</param>
<param name="path-to-gcode-depth-function" type="string" _gui-text="Depth function:">d</param>
<param name="path-to-gcode-sort-paths" type="boolean" _gui-text="Sort paths to reduce rapid distance">True</param>
<_param name="help" type="description" xml:space="preserve">
Biarc interpolation tolerance is the maximum distance between path and its approximation.
The segment will be split into two segments if the distance between path's segment and its approximation exceeds biarc interpolation tolerance.
For depth function c=color intensity from 0.0 (white) to 1.0 (black), d is the depth defined by orientation points, s - surface defined by orientation points.
</_param>
</page>
<!-- Gcodetools: /ptg block -->
<!-- Gcodetools: area_fill block -->
<page name='area_fill' _gui-text='Fill area'>
<param name="area-fill-angle" type="float" min="-360" max="360" _gui-text="Area fill angle">0</param>
<param name="area-fill-shift" type="float" min="-1" max="1" _gui-text="Area fill shift">0</param>
<param name="area-fill-method" _gui-text="Filling method" type="optiongroup">
<_option value="zig-zag">Zig zag</_option>
<_option value="spiral">Spiral</_option>
</param>
</page>
<!-- Gcodetools: /area_fill block -->
<!-- Gcodetools: area block -->
<page name='area' _gui-text='Area'>
<param name="max-area-curves" type="int" min="0" max="1000" _gui-text="Maximum area cutting curves:">100</param>
<param name="area-inkscape-radius" type="float" min="-1000" max="1000" _gui-text="Area width:">-10</param>
<param name="area-tool-overlap" type="float" min="0" max="1" _gui-text="Area tool overlap (0..0.9):">0</param>
<_param name="help" type="description" xml:space="preserve">
"Create area offset": creates several Inkscape path offsets to fill original path's area up to "Area radius" value.
Outlines start from "1/2 D" up to "Area width" total width with "D" steps where D is taken from the nearest tool definition ("Tool diameter" value).
Only one offset will be created if the "Area width" is equal to "1/2 D".
</_param>
</page>
<!-- Gcodetools: /area block -->
<!-- Gcodetools: area_artefacts block -->
<page name='area_artefacts' _gui-text='Area artifacts'>
<param name="area-find-artefacts-diameter" type="float" min="0.01" max="1000" _gui-text="Artifact diameter:">5.0</param>
<param name="area-find-artefacts-action" type="optiongroup" _gui-text="Action:">
<_option value="mark with an arrow">mark with an arrow</_option>
<_option value="mark with style">mark with style</_option>
<_option value="delete">delete</_option>
</param>
<_param name="help" type="description" xml:space="preserve">
Usage:
1. Select all Area Offsets (gray outlines)
2. Object/Ungroup (Shift+Ctrl+G)
3. Press Apply
Suspected small objects will be marked out by colored arrows.
</_param>
</page>
<!-- Gcodetools: /area_artefacts block -->
<!-- Gcodetools: engraving block -->
<page name='engraving' _gui-text='Engraving'>
<param name="engraving-sharp-angle-tollerance" type="float" precision="5" min="150" max="180" _gui-text="Smooth convex corners between this value and 180 degrees:">175</param>
<param name="engraving-max-dist" type="float" precision="5" min="0" max="1000" _gui-text="Maximum distance for engraving (mm/inch):">10</param>
<param name="engraving-newton-iterations" type="int" min="2" max="10" _gui-text="Accuracy factor (2 low to 10 high):">4</param>
<param name="engraving-draw-calculation-paths" type="boolean" _gui-text="Draw additional graphics to see engraving path">false</param>
<_param name="help" type="description" xml:space="preserve">
This function creates path to engrave letters or any shape with sharp angles.
Cutter's depth as a function of radius is defined by the tool.
Depth may be any Python expression. For instance:
cone....(45 degrees)......................: w
cone....(height/diameter=10/3)..: 10*w/3
sphere..(radius r)...........................: math.sqrt(max(0,r**2-w**2))
ellipse.(minor axis r, major 4r).....: math.sqrt(max(0,r**2-w**2))*4</_param>
</page>
<!-- Gcodetools: /engraving block -->
<!-- Gcodetools: orientation block -->
<page name='orientation' _gui-text='Orientation'>
<param name="orientation-points-count" type="optiongroup" _gui-text="Orientation type:">
<_option value="2">2-points mode
(move and rotate,
maintained aspect ratio X/Y)</_option>
<_option value="3">3-points mode
(move, rotate and mirror,
different X/Y scale)</_option>
<_option value="graffiti">graffiti points</_option>
<_option value="in-out reference point">in-out reference point</_option>
</param>
<param name="Zsurface" type="float" precision="5" min="-1000" max="1000" _gui-text="Z surface:">0</param>
<param name="Zdepth" type="float" precision="5" min="-1000" max="1000" _gui-text="Z depth:">-1</param>
<param name="unit" type="enum" _gui-text="Units (mm or in):">
<_item value="G21 (All units in mm)">mm</_item>
<_item value="G20 (All units in inches)">in</_item>
</param>
<_param name="help" type="description" xml:space="preserve">
Orientation points are used to calculate transformation (offset,scale,mirror,rotation in XY plane) of the path.
3-points mode only: do not put all three into one line (use 2-points mode instead).
You can modify Z surface, Z depth values later using text tool (3rd coordinates).
If there are no orientation points inside current layer they are taken from the upper layer.
Do not ungroup orientation points! You can select them using double click to enter the group or by Ctrl+Click.
Now press apply to create control points (independent set for each layer).
</_param>
</page>
<!-- Gcodetools: /orientation block -->
<!-- Gcodetools: tools_library block -->
<page name='tools_library' _gui-text='Tools library'>
<param type='optiongroup' name='tools-library-type' _gui-text="Tools type:">
<_option value='default tool'>default</_option>
<_option value='cylinder cutter'>cylinder</_option>
<_option value='cone cutter'>cone</_option>
<_option value='plasma cutter'>plasma</_option>
<_option value='tangent knife'>tangent knife</_option>
<_option value='lathe cutter'>lathe cutter</_option>
<_option value='graffiti'>graffiti</_option>
<_option value='check'>Just check tools</_option>
</param>
<_param name="help" type="description" xml:space="preserve">
Selected tool type fills appropriate default values. You can change these values using the Text tool later on.
The topmost (z order) tool in the active layer is used. If there is no tool inside the current layer it is taken from the upper layer.
Press Apply to create new tool.
</_param>
</page>
<!-- Gcodetools: /tools_library block -->
<!-- Gcodetools: lathe block -->
<page name='lathe' _gui-text='Lathe'>
<param name="lathe-width" type="float" precision="5" min="0" max="1000" _gui-text="Lathe width:">10</param>
<param name="lathe-fine-cut-width" type="float" precision="5" min="0" max="1000" _gui-text="Fine cut width:">1</param>
<param name="lathe-fine-cut-count" type="int" min="0" max="1000" _gui-text="Fine cut count:">1</param>
<param name="lathe-create-fine-cut-using" _gui-text="Create fine cut using:" type="optiongroup" appearance="minimal">
<_option value="Move path">Move path</_option>
<_option value="Offset path">Offset path</_option>
</param>
<param name="lathe-x-axis-remap" type="string" _gui-text="Lathe X axis remap:">X</param>
<param name="lathe-z-axis-remap" type="string" _gui-text="Lathe Z axis remap:">Z</param>
</page>
<!-- Gcodetools: /lathe block -->
<!-- Gcodetools: lathe_modify_path block -->
<page name='lathe_modify_path' _gui-text='Lathe modify path'>
<_param name="help" type="description" xml:space="preserve">
This function modifies path so it will be possibe to cut it with a rectangular cutter.
</_param>
<param name="lathe-rectangular-cutter-width" type="float" precision="5" min="0" max="1000" _gui-text="Lathe width:">4</param>
</page>
<!-- Gcodetools: /lathe_modify_path block -->
<!-- Gcodetools: offset block -->
<page name='offset' _gui-text='Offset'>
<param name="offset-radius" type="float" precision="5" min="-1000" max="1000" _gui-text="Offset radius:">10</param>
<param name="offset-step" type="float" precision="5" min="0" max="1000" _gui-text="Offset step:">10</param>
<param name="offset-draw-clippend-path" type="boolean" _gui-text="Draw clipped path">false</param>
<param name="offset-just-get-distance" type="boolean" _gui-text="Don't do offset just get distance">false</param>
</page>
<!-- Gcodetools: /offset block -->
<!-- Gcodetools: arrangement block -->
<page name='arrangement' _gui-text='Arrangement'>
<param name='arrangement-material-width' type="float" precision="5" min="0" max="1000000" _gui-text='Material width:'>500</param>
<param name='arrangement-population-count' type="int" min="0" max="1000000" _gui-text='Genetic algorithm populations count:'>100</param>
<param name="arrangement-inline-test" type="boolean" _gui-text="Use C-inline test (some additional
packets will be needed)">false</param>
</page>
<!-- Gcodetools: /arrangement block -->
<!-- Gcodetools: plasma-prepare-path block -->
<page name='plasma-prepare-path' _gui-text='Prepare path for plasma or laser cutters'>
<param name='in-out-path' type="boolean" _gui-text="Create in-out paths" >True</param>
<param name='in-out-path-len' type="float" precision="5" min="0" max="1000000" _gui-text='In-out path length:'>10</param>
<param name='in-out-path-point-max-dist' type="float" precision="5" min="0" max="1000000" _gui-text='In-out path max distance to reference point:'>10</param>
<param name="in-out-path-type" _gui-text="In-out path type:" type="optiongroup" appearance="minimal">
<_option value="Round">Round</_option>
<_option value="Perpendicular">Perpendicular</_option>
<_option value="Tangent">Tangent</_option>
</param>
<param name='in-out-path-radius' type="float" precision="5" min="0" max="1000000" _gui-text='In-out path radius for round path:'>10</param>
<param name='in-out-path-replace-original-path' type="boolean" _gui-text="Replace original path" >False</param>
<param name='in-out-path-do-not-add-reference-point' type="boolean" _gui-text="Do not add in-out reference points" >False</param>
<_param name="help" type="description" xml:space="preserve">-------------------------------------------------</_param>
<param name='plasma-prepare-corners' type="boolean" _gui-text="Prepare corners" >True</param>
<param name='plasma-prepare-corners-distance' type="float" precision="5" min="0" max="1000000" _gui-text='Stepout distance for corners:'>10</param>
<param name='plasma-prepare-corners-tolerance' type="float" precision="5" min="0" max="180" _gui-text='Maximum angle for corner (0-180 deg):'>170</param>
</page>
<!-- Gcodetools: /plasma-prepare-path block -->
<!-- Gcodetools: box-prepare-path block -->
<page name='box-prepare-path' _gui-text='Box cutter prepare path.'>
<_param name="help" type="description" xml:space="preserve">Outside corner:</_param>
<param name="box-in-len" type="string" _gui-text="In-going length formula (if <0 will add some path):">boxa/tan(boxb)/sin(a) - boxa/sin(boxb)/tan(boxc)</param>
<param name="box-out-len" type="string" _gui-text="Out-going length formula (if <0 will add some path):">boxa/tan(boxb)/sin(a)</param>
<_param name="help" type="description" xml:space="preserve">
Inside corner:</_param>
<param name="box-in-len-inside" type="string" _gui-text="In-going length formula (if <0 will add some path):">-(boxa/tan(boxb)/sin(a) - boxa/sin(boxb)/tan(boxc))</param>
<param name="box-out-len-inside" type="string" _gui-text="Out-going length formula (if <0 will add some path):">-boxa/tan(boxb)/sin(a)</param>
<param name='box-prepare-a' type="string" _gui-text='Paramater boxa:'>50*3.14159265/180</param>
<param name='box-prepare-b' type="string" _gui-text='Paramater boxb:'>50*3.14159265/180</param>
<param name='box-prepare-c' type="string" _gui-text='Paramater boxc:'>50*3.14159265/180</param>
<param name='box-prepare-corners-tolerance' type="string" _gui-text='Maximum angle for outside corner (0-180 deg) :'>170</param>
<param name='box-prepare-corners-tolerance-inside' type="string" _gui-text='Maximum angle for inside corner (0-180 deg) :'>170</param>
<_param name="help" type="description" xml:space="preserve">This extension will cutt out or add some path in corners.
Extension will eval() formulas as Python code.
You can use a - for angle value, boxa, boxb, boxc - parameters.
</_param>
</page>
<!-- Gcodetools: /box-prepare-path block -->
<!-- Gcodetools: ignore block -->
<page name='ignore' _gui-text='Ignore'>
<_param name="help" type="description" xml:space="preserve">Add gcodetools Ignore tag to selected objects so gcodetools will ignore them.</_param>
</page>
<!-- Gcodetools: /ignore block -->
<!-- Gcodetools: graffiti block -->
<page name='graffiti' _gui-text='Graffiti'>
<param name="graffiti-max-seg-length" type="float" precision="5" min="0" max="1000" _gui-text="Maximum segment length:">10</param>
<param name="graffiti-min-radius" type="float" precision="5" min="0" max="1000" _gui-text="Minimal connector radius:">10</param>
<param name="graffiti-start-pos" type="string" _gui-text="Start position (x;y):">(0.0;0.0)</param>
<param name="graffiti-create-preview" type="boolean" _gui-text="Create preview">true</param>
<param name="graffiti-create-linearization-preview" type="boolean" _gui-text="Create linearization preview">true</param>
<param name="graffiti-preview-size" type="int" min="100" max="10000" _gui-text="Preview's size (px):">800</param>
<param name="graffiti-preview-emmit" type="int" min="100" max="10000" _gui-text="Preview's paint emmit (pts/s):">1000</param>
</page>
<!-- Gcodetools: /graffiti block -->
<!-- Gcodetools: update block -->
<page name='update' _gui-text='Check for updates'>
<_param name="help" type="description" xml:space="preserve">Check for Gcodetools latest stable version and try to get the updates.</_param>
</page>
<!-- Gcodetools: /update block -->
<!-- Gcodetools: bender block -->
<page name='bender' _gui-text='Bender'>
<_param name="help" type="description" xml:space="preserve">Create Gcode for Bending machine.
Bite my shiny metall a..!
</_param>
<_param name="bender-step" type="float" precision="5" min="0.1" max="1000" _gui-text="Path split step:">1</_param>
<_param name="bender-max-split" type="int" min="1" max="1000" _gui-text="Segment max split:">32</_param>
</page>
<!-- Gcodetools: /bender block -->
<!-- Gcodetools: test block -->
<page name='test' _gui-text='Test'>
<_param name="help" type="description" xml:space="preserve">This page was created for testing purpouses.</_param>
<param name="test-1" type="float" precision="5" min="0" max="1000" _gui-text="Test parameter 1:">10</param>
<param name="test-2" type="float" precision="5" min="0" max="1000" _gui-text="Test parameter 2:">10</param>
<param name="test-3" type="float" precision="5" min="0" max="1000" _gui-text="Test parameter 3:">10</param>
<param name="test-string" type="string" _gui-text="Exec this string as a test:">gcodetools.test_prof()</param>
<param name="test-profile" type="boolean" _gui-text="Profile test function">false</param>
</page>
<!-- Gcodetools: /test block -->
<!-- Gcodetools: about block -->
<page name='about' _gui-text='About'>
<_param name="help" type="description" xml:space="preserve">Gcodetools was developed to make simple Gcode from Inkscape's paths. Gcode is a special format which is used in most of CNC machines. So Gcodetools allows you to use Inkscape as CAM program.
It can be used with a lot of machine types:
Mills
Lathes
Laser and Plasma cutters and engravers
Mill engravers
Plotters
etc.
To get more info visit developers page at http://www.cnc-club.ru/gcodetools</_param>
</page>
<!-- Gcodetools: /about block -->
<!-- Gcodetools: footer block -->
</param>
<effect>
<!-- Gcodetools: submenu -->
<!-- Gcodetools: /submenu -->
<object-type>path</object-type>
</effect>
<script>
<command reldir="extensions" interpreter="python">gcodetools-dev.py</command>
</script>
</inkscape-extension>
<!-- Gcodetools: /footer block -->