svg2gcode 4.1.2__tar.gz → 4.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/PKG-INFO +9 -6
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/README.md +8 -5
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/__init__.py +1 -1
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/__main__.py +4 -3
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/__init__.py +3 -1
- svg2gcode-4.1.3/svg2gcode/svg_to_gcode/compiler/_compiler.py +1274 -0
- svg2gcode-4.1.3/svg2gcode/svg_to_gcode/compiler/_compiler.py_new +1257 -0
- svg2gcode-4.1.2/svg2gcode/svg_to_gcode/compiler/_compiler.py → svg2gcode-4.1.3/svg2gcode/svg_to_gcode/compiler/_compiler_save_save.py +62 -3
- svg2gcode-4.1.3/svg2gcode/svg_to_gcode/compiler/_compiler_savesave_last.py +1248 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/LICENSE +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/pyproject.toml +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_examples/README.md +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_examples/abcdefghijklmnop.svg +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_examples/gcode_output.zip +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_examples/kye_circle_paws_orig copy.svg +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_examples/kye_circle_paws_orig.svg +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_examples/letter_B.svg +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_examples/lettersandsigns.svg +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_examples/nonzero_evenodd.svg +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/LICENSE +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/compiler/__init__.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/compiler/interfaces/__init__.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/compiler/interfaces/_abstract_interface.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/compiler/interfaces/_fan_controlled_gcode.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/compiler/interfaces/_gcode.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/compiler/last_compiler.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/compiler/ttt.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/css_color.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/formulas.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/geometry/__init__.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/geometry/_abstract_chain.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/geometry/_abstract_curve.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/geometry/_circular_arc.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/geometry/_cubic_bazier.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/geometry/_elliptical_arc.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/geometry/_line.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/geometry/_line_segment_chain.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/geometry/_matrix.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/geometry/_quadratic_bazier.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/geometry/_raster_image.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/geometry/_smooth_arc_chain.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/geometry/_vector.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/svg_parser/__init__.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/svg_parser/_parser_methods.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/svg_parser/_path.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/svg_parser/_transformation.py +0 -0
- {svg2gcode-4.1.2 → svg2gcode-4.1.3}/svg2gcode/svg_to_gcode/svg_parser/debug_methods.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: svg2gcode
|
|
3
|
-
Version: 4.1.
|
|
3
|
+
Version: 4.1.3
|
|
4
4
|
Summary: svg2gcode: convert an SVG (Scalable Vector Graphic) image to gcode.
|
|
5
5
|
Keywords: scalable vector graphics,svg,image,laser cutter,laser engraving
|
|
6
6
|
Author-email: Johannes Noordanus <mailjohannes.mailnoordanus@gmail.com>
|
|
@@ -28,7 +28,10 @@ This all from one command.
|
|
|
28
28
|
--
|
|
29
29
|
|
|
30
30
|
Exciting times as I have discovered that deep black laser engravings are possible on polished (stainless)steel using a 10W 0.08 mm<sup>2</sup> - practically 0.1 mm<sup>2</sup> - beam laser. Settings: speed 200mm/min and intensity 1000 (full power).<br>
|
|
31
|
-
I can get incredible detail in text and
|
|
31
|
+
I can get incredible detail in text and excellent image quality.
|
|
32
|
+
|
|
33
|
+
### Latest version 4.1.3
|
|
34
|
+
Added option ```--outline``` to generate an outline of the drawings specified by the *.svg* file. This can be used to mark the exact position of the piece to engrave.
|
|
32
35
|
|
|
33
36
|
### Version 4.1 is out now!
|
|
34
37
|
**svg2gcode 4.1** has improved control over the gcode end result.<br>Option ```--origin machine-x machine-y``` now sets the *lower left* of the engraving and cutting area to the machine location indicated. When set to *0 0* the engraving and cutting area will be immediately above the machine x axis and immediately to the right of the machine y axis which makes it easy to place the object to engrave.<br>
|
|
@@ -258,12 +261,11 @@ Some linux distributions use a managed environment in which you cannot install p
|
|
|
258
261
|
|
|
259
262
|
### Usage:
|
|
260
263
|
```
|
|
261
|
-
vg2gcode --help
|
|
262
264
|
usage: runsvg2gcode [-h] [--showimage] [--pixelsize <default:0.1>] [--imagespeed <default:800>] [--cuttingspeed <default:1000>] [--imagepower <default:300>]
|
|
263
265
|
[--poweroffset <default:0>] [--cuttingpower <default:850>] [--passes <default:1>] [--pass_depth <default:0>] [--rapidmove <default:10>]
|
|
264
266
|
[--noise <default:0>] [--overscan <default:0>] [--showoverscan] [--constantburn | --no-constantburn] [--selfcenter] [--origin origin-x origin-y]
|
|
265
|
-
[--scale factor-x factor-y] [--rotate <default:0>] [--splitfile] [--pathcut] [--nofill] [--fillrule <default:"nonzero">]
|
|
266
|
-
[--ymaxtravel <default:400>] [--color_coded <default:"">] [--fan <default:"off">] [-V]
|
|
267
|
+
[--scale factor-x factor-y] [--rotate <default:0>] [--splitfile] [--outline] [--pathcut] [--nofill] [--fillrule <default:"nonzero">]
|
|
268
|
+
[--xmaxtravel <default:300>] [--ymaxtravel <default:400>] [--color_coded <default:"">] [--fan <default:"off">] [-V]
|
|
267
269
|
svg gcode
|
|
268
270
|
|
|
269
271
|
Convert svg to gcode for GRBL v1.1 compatible diode laser engravers.
|
|
@@ -305,7 +307,8 @@ options:
|
|
|
305
307
|
scale svg with (factor-x,factor-y) (default not set)
|
|
306
308
|
--rotate <default:0> number of degrees to rotate
|
|
307
309
|
--splitfile split gcode output of SVG path and image objects
|
|
308
|
-
--
|
|
310
|
+
--outline generate outline of SVG path objects
|
|
311
|
+
--pathcut alway cut SVG path objects! (use laser power set with option --cuttingpower)
|
|
309
312
|
--nofill ignore SVG fill attribute
|
|
310
313
|
--fillrule <default:"nonzero">
|
|
311
314
|
set fill rule to [nonzero|evenodd]
|
|
@@ -12,7 +12,10 @@ This all from one command.
|
|
|
12
12
|
--
|
|
13
13
|
|
|
14
14
|
Exciting times as I have discovered that deep black laser engravings are possible on polished (stainless)steel using a 10W 0.08 mm<sup>2</sup> - practically 0.1 mm<sup>2</sup> - beam laser. Settings: speed 200mm/min and intensity 1000 (full power).<br>
|
|
15
|
-
I can get incredible detail in text and
|
|
15
|
+
I can get incredible detail in text and excellent image quality.
|
|
16
|
+
|
|
17
|
+
### Latest version 4.1.3
|
|
18
|
+
Added option ```--outline``` to generate an outline of the drawings specified by the *.svg* file. This can be used to mark the exact position of the piece to engrave.
|
|
16
19
|
|
|
17
20
|
### Version 4.1 is out now!
|
|
18
21
|
**svg2gcode 4.1** has improved control over the gcode end result.<br>Option ```--origin machine-x machine-y``` now sets the *lower left* of the engraving and cutting area to the machine location indicated. When set to *0 0* the engraving and cutting area will be immediately above the machine x axis and immediately to the right of the machine y axis which makes it easy to place the object to engrave.<br>
|
|
@@ -242,12 +245,11 @@ Some linux distributions use a managed environment in which you cannot install p
|
|
|
242
245
|
|
|
243
246
|
### Usage:
|
|
244
247
|
```
|
|
245
|
-
vg2gcode --help
|
|
246
248
|
usage: runsvg2gcode [-h] [--showimage] [--pixelsize <default:0.1>] [--imagespeed <default:800>] [--cuttingspeed <default:1000>] [--imagepower <default:300>]
|
|
247
249
|
[--poweroffset <default:0>] [--cuttingpower <default:850>] [--passes <default:1>] [--pass_depth <default:0>] [--rapidmove <default:10>]
|
|
248
250
|
[--noise <default:0>] [--overscan <default:0>] [--showoverscan] [--constantburn | --no-constantburn] [--selfcenter] [--origin origin-x origin-y]
|
|
249
|
-
[--scale factor-x factor-y] [--rotate <default:0>] [--splitfile] [--pathcut] [--nofill] [--fillrule <default:"nonzero">]
|
|
250
|
-
[--ymaxtravel <default:400>] [--color_coded <default:"">] [--fan <default:"off">] [-V]
|
|
251
|
+
[--scale factor-x factor-y] [--rotate <default:0>] [--splitfile] [--outline] [--pathcut] [--nofill] [--fillrule <default:"nonzero">]
|
|
252
|
+
[--xmaxtravel <default:300>] [--ymaxtravel <default:400>] [--color_coded <default:"">] [--fan <default:"off">] [-V]
|
|
251
253
|
svg gcode
|
|
252
254
|
|
|
253
255
|
Convert svg to gcode for GRBL v1.1 compatible diode laser engravers.
|
|
@@ -289,7 +291,8 @@ options:
|
|
|
289
291
|
scale svg with (factor-x,factor-y) (default not set)
|
|
290
292
|
--rotate <default:0> number of degrees to rotate
|
|
291
293
|
--splitfile split gcode output of SVG path and image objects
|
|
292
|
-
--
|
|
294
|
+
--outline generate outline of SVG path objects
|
|
295
|
+
--pathcut alway cut SVG path objects! (use laser power set with option --cuttingpower)
|
|
293
296
|
--nofill ignore SVG fill attribute
|
|
294
297
|
--fillrule <default:"nonzero">
|
|
295
298
|
set fill rule to [nonzero|evenodd]
|
|
@@ -67,9 +67,9 @@ def svg2gcode(args) -> int:
|
|
|
67
67
|
return Compiler(interfaces.Gcode, params={'laser_power':args.cuttingpower,'movement_speed':args.cuttingspeed, 'pixel_size':args.pixelsize,
|
|
68
68
|
'maximum_image_laser_power':args.imagepower, 'image_movement_speed':args.imagespeed, 'fan':args.fan,'rapid_move':args.rapidmove,
|
|
69
69
|
'showimage':args.showimage, 'x_axis_maximum_travel':args.xmaxtravel,'y_axis_maximum_travel':args.ymaxtravel, 'image_noise':args.noise,
|
|
70
|
-
'pass_depth':args.pass_depth, 'laser_mode':"constant" if args.constantburn else "dynamic", 'splitfile':args.splitfile, '
|
|
71
|
-
'nofill':args.nofill, 'fillrule':args.fillrule, 'image_poweroffset':args.poweroffset, 'image_overscan':args.overscan,
|
|
72
|
-
'color_coded': args.color_coded,})
|
|
70
|
+
'pass_depth':args.pass_depth, 'laser_mode':"constant" if args.constantburn else "dynamic", 'splitfile':args.splitfile, 'outline':args.outline,
|
|
71
|
+
'pathcut':args.pathcut, 'nofill':args.nofill, 'fillrule':args.fillrule, 'image_poweroffset':args.poweroffset, 'image_overscan':args.overscan,
|
|
72
|
+
'image_showoverscan':args.showoverscan, 'color_coded': args.color_coded,})
|
|
73
73
|
|
|
74
74
|
compiler = init_compiler(args)
|
|
75
75
|
compiler.compile_to_file(args.gcode, args.svg, parse_file(args.svg, scale_factor=args.scale, rotate_deg=args.rotate), passes=args.passes, write=not(args.selfcenter or args.origin))
|
|
@@ -170,6 +170,7 @@ def main() -> int:
|
|
|
170
170
|
parser.add_argument('--rotate', default=cfg["rotate_default"], metavar="<default:" +str(cfg["rotate_default"])+ ">",
|
|
171
171
|
type=int, help="number of degrees to rotate")
|
|
172
172
|
parser.add_argument('--splitfile', action='store_true', default=False, help='split gcode output of SVG path and image objects' )
|
|
173
|
+
parser.add_argument('--outline', action='store_true', default=False, help='generate outline of SVG path objects' )
|
|
173
174
|
parser.add_argument('--pathcut', action='store_true', default=False, help='alway cut SVG path objects! (use laser power set with option --cuttingpower)' )
|
|
174
175
|
parser.add_argument('--nofill', action='store_true', default=False, help='ignore SVG fill attribute' )
|
|
175
176
|
parser.add_argument('--fillrule', action = 'store', default=cfg["fillrule_default"], metavar="<default:\"" + str(cfg["fillrule_default"])+ "\">",
|
|
@@ -44,6 +44,7 @@ SETTING = {
|
|
|
44
44
|
"pixel_size", # float sets image pixel size (in mm)
|
|
45
45
|
"showimage", # boolean show image used for conversion to gcode
|
|
46
46
|
"splitfile", # boolean return SVG path objects to <filename>.<gcext> and SVG image objects to <filename>_images.<gcext>
|
|
47
|
+
"outline", # boolean return outline of SVG path objects to <filename>_outline.<gcext>
|
|
47
48
|
"pathcut", # boolean always cut SVG path objects! use laser_power setting
|
|
48
49
|
"nofill", # boolean ignore SVG fill attribute
|
|
49
50
|
"color_coded", # string color of path determines whether it is a cut or engrave
|
|
@@ -80,6 +81,7 @@ DEFAULT_SETTING = {
|
|
|
80
81
|
"pixel_size": 0.1, # laser kerf is mostly < 0.1mm
|
|
81
82
|
"showimage": False, # default image is not shown
|
|
82
83
|
"splitfile": False, # SVG path and image objects are emitted to one file: <filename>.<gcext>
|
|
84
|
+
"outline": False, # outline of SVG path objects is emitted to: <filename>_outline.<gcext>
|
|
83
85
|
"pathcut": False, # always cut SVG path objects! use laser_power setting
|
|
84
86
|
"nofill": False, # ignore SVG fill attribute
|
|
85
87
|
"color_coded": str, # color of path determines whether it is a cut or engrave
|
|
@@ -125,7 +127,7 @@ def check_setting(setting: dict[str,Any] | None = None) -> bool:
|
|
|
125
127
|
raise ValueError(f"Unknown '{key}' value '{setting[key]}'. Please specify one of the following: {UNITS}")
|
|
126
128
|
if key == "distance_mode" and setting[key] not in DISTANCEMODE:
|
|
127
129
|
raise ValueError(f"Unknown '{key}' value '{setting[key]}'. Please specify one of the following: {DISTANCEMODE}")
|
|
128
|
-
if key in {"showimage","splitfile","pathcut","nofill","image_showoverscan"} and setting[key] not in {True,False}:
|
|
130
|
+
if key in {"showimage","splitfile","outline","pathcut","nofill","image_showoverscan"} and setting[key] not in {True,False}:
|
|
129
131
|
raise ValueError(f"Unknown '{key}' value '{setting[key]}'. Please specify one of the following: {{True,False}}")
|
|
130
132
|
if key == "fan" and setting[key] not in FAN:
|
|
131
133
|
raise ValueError(f"Unknown '{key}' value '{setting[key]}'. Please specify one of the following: {FAN}")
|