svg2gcode 2.6.1__tar.gz → 2.6.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-2.6.1 → svg2gcode-2.6.3}/PKG-INFO +1 -1
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/__init__.py +1 -1
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/compiler/_compiler.py +14 -6
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/compiler/interfaces/_gcode.py +7 -1
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/LICENSE +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/README.md +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/pyproject.toml +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/README.md +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/__main__.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/.DS_Store +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/__init__.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/compiler/__init__.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/compiler/interfaces/__init__.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/compiler/interfaces/_abstract_interface.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/compiler/interfaces/_fan_controlled_gcode.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/formulas.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/geometry/__init__.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/geometry/_abstract_chain.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/geometry/_abstract_curve.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/geometry/_circular_arc.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/geometry/_cubic_bazier.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/geometry/_elliptical_arc.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/geometry/_line.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/geometry/_line_segment_chain.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/geometry/_matrix.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/geometry/_quadratic_bazier.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/geometry/_raster_image.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/geometry/_smooth_arc_chain.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/geometry/_vector.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/svg_parser/__init__.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/svg_parser/_parser_methods.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/svg_parser/_path.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/svg2gcode/svg_to_gcode/svg_parser/_transformation.py +0 -0
- {svg2gcode-2.6.1 → svg2gcode-2.6.3}/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: 2.6.
|
|
3
|
+
Version: 2.6.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>
|
|
@@ -77,8 +77,12 @@ class Compiler:
|
|
|
77
77
|
def gcode_file_header(self):
|
|
78
78
|
# add generator info and boundingbox for this code
|
|
79
79
|
|
|
80
|
+
params = ''
|
|
81
|
+
for k,v in self.params.items():
|
|
82
|
+
params += f"; {k}: {v},\n"
|
|
83
|
+
|
|
80
84
|
gcode = [ f"; svg2gcode {__version__} ({str(datetime.now()).split('.')[0]})",
|
|
81
|
-
f"; arguments: {
|
|
85
|
+
f"; arguments: \n{params}",
|
|
82
86
|
f"; GRBL 1.1, unit={self.settings['unit']}, {self.settings['distance_mode']} coordinates\n" ]
|
|
83
87
|
|
|
84
88
|
if self._boundingbox:
|
|
@@ -281,9 +285,6 @@ class Compiler:
|
|
|
281
285
|
img_background = Image.new(mode = "RGBA", size = img.size, color = (255,255,255))
|
|
282
286
|
img = Image.alpha_composite(img_background, img)
|
|
283
287
|
|
|
284
|
-
if self.settings['showimage']:
|
|
285
|
-
img.show()
|
|
286
|
-
|
|
287
288
|
# Note that the image resize action below is based on the following:
|
|
288
289
|
# - the image data (linked file or embedded) has a certain source resolution (number of pixels WidthxHeight)
|
|
289
290
|
# - image attributes 'width' and 'height' are in user units
|
|
@@ -302,6 +303,9 @@ class Compiler:
|
|
|
302
303
|
img = img.resize((int(float(img_attrib['width'])/float(pixelsize)),
|
|
303
304
|
int(float(img_attrib['height'])/float(pixelsize))), Image.Resampling.LANCZOS).convert("L")
|
|
304
305
|
|
|
306
|
+
if self.settings['showimage']:
|
|
307
|
+
img.show()
|
|
308
|
+
|
|
305
309
|
# convert to nparray for fast handling
|
|
306
310
|
return np.array(img)
|
|
307
311
|
|
|
@@ -328,8 +332,12 @@ class Compiler:
|
|
|
328
332
|
speedmoves = img_attrib['gcode_speedmoves'] if 'gcode_speedmoves' in img_attrib else self.settings["rapid_move"]
|
|
329
333
|
|
|
330
334
|
# set header for this image
|
|
331
|
-
self.gcode += [f"; image name: {img_attrib['id']}
|
|
332
|
-
f
|
|
335
|
+
self.gcode += [f"; image name: {img_attrib['id']},\n"
|
|
336
|
+
f"; pixelsize: {pixelsize},\n"
|
|
337
|
+
f"; speed: {speed},\n"
|
|
338
|
+
f"; maxpower: {maxpower},\n"
|
|
339
|
+
f"; speedmoves: {speedmoves},\n"
|
|
340
|
+
f"; noise level: {noise}\n"]
|
|
333
341
|
|
|
334
342
|
# set X/Y-axis precision to number of digits after the decimal separator
|
|
335
343
|
XY_prec = len(str(pixelsize).split('.')[1])
|
|
@@ -36,7 +36,13 @@ class Gcode(Interface):
|
|
|
36
36
|
# G94 (set Feed rate to 'unit'/min)
|
|
37
37
|
# note that G0 mode hase a machine defined movement speed ('Feed Rate') and is the default motion mode upon power up and reset.
|
|
38
38
|
# note that some or all gcodes above might be machine defaults, this is to make sure they are
|
|
39
|
-
return ";
|
|
39
|
+
return ("\n; Machine settings:\n"
|
|
40
|
+
"; rapid movement,\n"
|
|
41
|
+
"; XY plane,\n"
|
|
42
|
+
"; cutter compensation off,\n"
|
|
43
|
+
"; coordinate system 1,\n"
|
|
44
|
+
"; move 'unit'/min\n"
|
|
45
|
+
"G0 G17 G40 G54 G94\n")
|
|
40
46
|
|
|
41
47
|
def set_movement_speed(self, speed):
|
|
42
48
|
self._next_speed = speed
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|