svg2gcode 3.3.4__tar.gz → 3.3.5__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.
Files changed (34) hide show
  1. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/PKG-INFO +24 -10
  2. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/README.md +23 -9
  3. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/__init__.py +1 -1
  4. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/LICENSE +0 -0
  5. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/pyproject.toml +0 -0
  6. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/__main__.py +0 -0
  7. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/LICENSE +0 -0
  8. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/__init__.py +0 -0
  9. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/compiler/__init__.py +0 -0
  10. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/compiler/_compiler.py +0 -0
  11. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/compiler/interfaces/__init__.py +0 -0
  12. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/compiler/interfaces/_abstract_interface.py +0 -0
  13. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/compiler/interfaces/_fan_controlled_gcode.py +0 -0
  14. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/compiler/interfaces/_gcode.py +0 -0
  15. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/css_color.py +0 -0
  16. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/formulas.py +0 -0
  17. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/geometry/__init__.py +0 -0
  18. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/geometry/_abstract_chain.py +0 -0
  19. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/geometry/_abstract_curve.py +0 -0
  20. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/geometry/_circular_arc.py +0 -0
  21. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/geometry/_cubic_bazier.py +0 -0
  22. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/geometry/_elliptical_arc.py +0 -0
  23. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/geometry/_line.py +0 -0
  24. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/geometry/_line_segment_chain.py +0 -0
  25. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/geometry/_matrix.py +0 -0
  26. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/geometry/_quadratic_bazier.py +0 -0
  27. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/geometry/_raster_image.py +0 -0
  28. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/geometry/_smooth_arc_chain.py +0 -0
  29. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/geometry/_vector.py +0 -0
  30. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/svg_parser/__init__.py +0 -0
  31. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/svg_parser/_parser_methods.py +0 -0
  32. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/svg_parser/_path.py +0 -0
  33. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/svg_parser/_transformation.py +0 -0
  34. {svg2gcode-3.3.4 → svg2gcode-3.3.5}/svg2gcode/svg_to_gcode/svg_parser/debug_methods.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: svg2gcode
3
- Version: 3.3.4
3
+ Version: 3.3.5
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>
@@ -50,9 +50,7 @@ Currently only value *evenodd* of *fill-rule* is supported.
50
50
 
51
51
  ### *WYSIWYG*
52
52
 
53
- As seen above, not all *svg* elements are directly supported, but they are after a *path* conversion within the composer (Inkscape: ```menu Path->Object/Stroke to Path```). Without a *path* conversion *svg2gcode* simply ignores all elements except *path* and *image*. Text (fonts) require another step after *selecting* all text and clicking menu ```Object to Path```. Clicking ```menu Object->Ungroup``` generates a separate *path* for each letter which contains all relevant attributes. (Otherwise Inkscape uses a group tag ```<g``` to set some attributes for all letters within the text that are not repeated for each individual letter.)
54
-
55
- Note that the latest version of *svg2gcode* (3.3.3) has support for ```<g``` tags (attribute inheritance) and is able to correctly convert text without ```Ungroup```.
53
+ As seen above, not all *svg* elements are directly supported, but they are after a *path* conversion within the composer (Inkscape: ```menu Path->Object/Stroke to Path```). Without a *path* conversion *svg2gcode* simply ignores all elements except *path* and *image*. Text (fonts) require another step after *selecting* all text and clicking menu ```Object to Path```. Clicking menu```Object->Ungroup``` <sup>(**)</sup> generates a separate *path* for each letter which contains all relevant attributes. (Otherwise Inkscape uses a group tag ```<g``` to set some attributes for all letters within the text that are not repeated for each individual letter.)
56
54
 
57
55
  You can use *gcode2image* to check the conversion result:
58
56
  ```
@@ -61,12 +59,30 @@ You can use *gcode2image* to check the conversion result:
61
59
  ```
62
60
  The image shown should be the same as the one shown by the composer (Inkscape). This is also a good way to measure the conversion result. Note that ```--grid``` and ```--showorigin``` can give some inteference. To be sure run *gcode2image* without them.
63
61
 
64
- #### Notes:
62
+ #### Contour & fill
63
+
64
+ Inkscape translates a contour of a raster image to an outline and fill. So, if you create a contour via (select bitmap first) ```Path->Trace Bitmap...``` slide the ```Treshold``` of the Trace Bitmap menu to almost 1 (0,995) to make the entire bitmap image black (this is a bit *trial and error*, use ```Update preview``` to get the highest slider value before the whole images is black).
65
+
66
+ You can look at the result xml tree via Inkscapes ```XML editor``` which now shows a path for the outline of the raster image and a style attribue like this:
67
+ ```
68
+ style fill:#000000;stroke-width:0.172652
69
+ ```
70
+ To cut this outline, you can set the *fill* attribute to *none* (via the ```XML editor``` or menu ```Fill and Stroke```) and set a specific *stroke* color, for example *red*. The following command generates gcode to cut the outline.
71
+ ```
72
+ > svg2gcode --color_coded "red = cut" contour.svg contour.gc
73
+ ```
74
+ You can also engrave the whole bitmap image by setting a specific fill color (via menu ```Fill and Stroke```) (in this case there is no need to use option ```color_coded```)
75
+
76
+ #### Notes
77
+
65
78
  - drawing objects - within the composer - must be converted to a```path```to be translated to a gcode sequence
66
79
  - image objects should **not** be converted to a ```path```
67
80
  - images must be linked or embedded using base64 (Inkscape default).
68
81
  - images can be in several formats (my tests included *.png* and *.jpg* image files)
69
82
  - *SVG* source documents must be in unit 'mm' and set to ```1 'user unit' is 1 mm``` (Inkscape default)
83
+
84
+ <sup>(**)</sup> Note that the latest version of *svg2gcode* (3.3.4) has support for ```<g``` tags (attribute inheritance) and is able to correctly convert text without ```Ungroup```.
85
+
70
86
  ### Important Commandline options
71
87
 
72
88
  Option ```--color_coded``` can be used to specify what part(s) of the drawing to cut, engrave or even ignore.
@@ -314,11 +330,8 @@ Note: to get options and defaults:
314
330
  > svg2gcode --help
315
331
  ```
316
332
  #### How do we cut these lines?
317
- Change the *style* attribute line - within file *line_hoek.svg* - to the following:
318
- ```
319
- style="fill:none;stroke:none;stroke-width:.1"
320
- ```
321
- or add 'gcode-pathcut' to the style string:
333
+
334
+ Add 'gcode-pathcut' to the style string:
322
335
  ```
323
336
  style="fill:none;stroke:red;stroke-width:.1;gcode-pathcut:true"
324
337
  ```
@@ -368,3 +381,4 @@ One containing the drawings of the .svg, the other containing the images:
368
381
 
369
382
  Default *svg2gcode* uses constant burn mode *M3*. This can be changed by setting option *--no-constantburn* which selects burn mode *M4*. Mode *M4* is not suitable for engravings because it automatically compensates (laser)power for speed. This conflicts with the specific gcode settings given by *image2gcode* (called by *svg2gcode*) for each pixel. In fact some experiments show that *M4* causes loss of quality and image deterioration when speed is increased. On white oak images had too much black and grey which did not go away for substantially higher speed. When switched back to constant burn (*M3*) mode, the same high speed gave excellent images having a sepia (licht yellow brown) color tone.
370
383
 
384
+
@@ -36,9 +36,7 @@ Currently only value *evenodd* of *fill-rule* is supported.
36
36
 
37
37
  ### *WYSIWYG*
38
38
 
39
- As seen above, not all *svg* elements are directly supported, but they are after a *path* conversion within the composer (Inkscape: ```menu Path->Object/Stroke to Path```). Without a *path* conversion *svg2gcode* simply ignores all elements except *path* and *image*. Text (fonts) require another step after *selecting* all text and clicking menu ```Object to Path```. Clicking ```menu Object->Ungroup``` generates a separate *path* for each letter which contains all relevant attributes. (Otherwise Inkscape uses a group tag ```<g``` to set some attributes for all letters within the text that are not repeated for each individual letter.)
40
-
41
- Note that the latest version of *svg2gcode* (3.3.3) has support for ```<g``` tags (attribute inheritance) and is able to correctly convert text without ```Ungroup```.
39
+ As seen above, not all *svg* elements are directly supported, but they are after a *path* conversion within the composer (Inkscape: ```menu Path->Object/Stroke to Path```). Without a *path* conversion *svg2gcode* simply ignores all elements except *path* and *image*. Text (fonts) require another step after *selecting* all text and clicking menu ```Object to Path```. Clicking menu```Object->Ungroup``` <sup>(**)</sup> generates a separate *path* for each letter which contains all relevant attributes. (Otherwise Inkscape uses a group tag ```<g``` to set some attributes for all letters within the text that are not repeated for each individual letter.)
42
40
 
43
41
  You can use *gcode2image* to check the conversion result:
44
42
  ```
@@ -47,12 +45,30 @@ You can use *gcode2image* to check the conversion result:
47
45
  ```
48
46
  The image shown should be the same as the one shown by the composer (Inkscape). This is also a good way to measure the conversion result. Note that ```--grid``` and ```--showorigin``` can give some inteference. To be sure run *gcode2image* without them.
49
47
 
50
- #### Notes:
48
+ #### Contour & fill
49
+
50
+ Inkscape translates a contour of a raster image to an outline and fill. So, if you create a contour via (select bitmap first) ```Path->Trace Bitmap...``` slide the ```Treshold``` of the Trace Bitmap menu to almost 1 (0,995) to make the entire bitmap image black (this is a bit *trial and error*, use ```Update preview``` to get the highest slider value before the whole images is black).
51
+
52
+ You can look at the result xml tree via Inkscapes ```XML editor``` which now shows a path for the outline of the raster image and a style attribue like this:
53
+ ```
54
+ style fill:#000000;stroke-width:0.172652
55
+ ```
56
+ To cut this outline, you can set the *fill* attribute to *none* (via the ```XML editor``` or menu ```Fill and Stroke```) and set a specific *stroke* color, for example *red*. The following command generates gcode to cut the outline.
57
+ ```
58
+ > svg2gcode --color_coded "red = cut" contour.svg contour.gc
59
+ ```
60
+ You can also engrave the whole bitmap image by setting a specific fill color (via menu ```Fill and Stroke```) (in this case there is no need to use option ```color_coded```)
61
+
62
+ #### Notes
63
+
51
64
  - drawing objects - within the composer - must be converted to a```path```to be translated to a gcode sequence
52
65
  - image objects should **not** be converted to a ```path```
53
66
  - images must be linked or embedded using base64 (Inkscape default).
54
67
  - images can be in several formats (my tests included *.png* and *.jpg* image files)
55
68
  - *SVG* source documents must be in unit 'mm' and set to ```1 'user unit' is 1 mm``` (Inkscape default)
69
+
70
+ <sup>(**)</sup> Note that the latest version of *svg2gcode* (3.3.4) has support for ```<g``` tags (attribute inheritance) and is able to correctly convert text without ```Ungroup```.
71
+
56
72
  ### Important Commandline options
57
73
 
58
74
  Option ```--color_coded``` can be used to specify what part(s) of the drawing to cut, engrave or even ignore.
@@ -300,11 +316,8 @@ Note: to get options and defaults:
300
316
  > svg2gcode --help
301
317
  ```
302
318
  #### How do we cut these lines?
303
- Change the *style* attribute line - within file *line_hoek.svg* - to the following:
304
- ```
305
- style="fill:none;stroke:none;stroke-width:.1"
306
- ```
307
- or add 'gcode-pathcut' to the style string:
319
+
320
+ Add 'gcode-pathcut' to the style string:
308
321
  ```
309
322
  style="fill:none;stroke:red;stroke-width:.1;gcode-pathcut:true"
310
323
  ```
@@ -353,3 +366,4 @@ One containing the drawings of the .svg, the other containing the images:
353
366
  ### Burn mode M3/M4:
354
367
 
355
368
  Default *svg2gcode* uses constant burn mode *M3*. This can be changed by setting option *--no-constantburn* which selects burn mode *M4*. Mode *M4* is not suitable for engravings because it automatically compensates (laser)power for speed. This conflicts with the specific gcode settings given by *image2gcode* (called by *svg2gcode*) for each pixel. In fact some experiments show that *M4* causes loss of quality and image deterioration when speed is increased. On white oak images had too much black and grey which did not go away for substantially higher speed. When switched back to constant burn (*M3*) mode, the same high speed gave excellent images having a sepia (licht yellow brown) color tone.
369
+
@@ -1,4 +1,4 @@
1
1
  """
2
2
  svg2gcode: convert an SVG (Scalable Vector Graphic) image to gcode.
3
3
  """
4
- __version__ = "3.3.4"
4
+ __version__ = "3.3.5"
File without changes
File without changes