Closed fdev31 closed 1 day ago
After some bisection, it broke after this commit:
1e966276174d097870e0b82482af5a5dc6e49446 is the first bad commit
commit 1e966276174d097870e0b82482af5a5dc6e49446
Author: Johannes Noordanus <johannes_noordanus@icloud.com>
Date: Sat Aug 3 23:26:56 2024 +0200
Fix of several alpha channel issues, fix of color inversion, fix of fill (fonts)
Looks like the following change in _compiler is the culprit:
# line stroke isn't set: cut path
self.body.extend([f"\n; no stroke color: cut path '{name_id}'"])
render_pathwidth(line_chain, [0], None, None, boundingbox)
Has changed into:
# line stroke isn't set: ignore path
self.body.extend([f"\n; no stroke color set: ignore path '{name_id}'"])
#render_pathwidth(line_chain, [0], None, None, boundingbox)
seems that the issue is that the stroke detected in the first place, but on older versions it would still work thanks to this code.
Additional note, the new versions seem to have some invalid syntax:
/tmp/code/svg2gcode/svg2gcode/svg_to_gcode/compiler/_compiler.py:556: SyntaxWarning: invalid escape sequence '\d'
fill_opacity = re.search("fill-opacity:(\d*\.)?\d+", style_str)
/tmp/code/svg2gcode/svg2gcode/svg_to_gcode/compiler/_compiler.py:559: SyntaxWarning: invalid escape sequence '\d'
"(\d*\.)?\d+", fill_opacity.group(0)
/tmp/code/svg2gcode/svg2gcode/svg_to_gcode/compiler/_compiler.py:570: SyntaxWarning: invalid escape sequence '\d'
stroke_width = re.search("stroke-width:(\d*\.)?\d+", style_str)
/tmp/code/svg2gcode/svg2gcode/svg_to_gcode/compiler/_compiler.py:573: SyntaxWarning: invalid escape sequence '\d'
"(\d*\.)?\d+", stroke_width.group(0)
/tmp/code/svg2gcode/svg2gcode/svg_to_gcode/compiler/_compiler.py:577: SyntaxWarning: invalid escape sequence '\d'
stroke_opacity = re.search("stroke-opacity:(\d*\.)?\d+", style_str)
/tmp/code/svg2gcode/svg2gcode/svg_to_gcode/compiler/_compiler.py:580: SyntaxWarning: invalid escape sequence '\d'
"(\d*\.)?\d+", stroke_opacity.group(0)
/tmp/code/svg2gcode/svg2gcode/svg_to_gcode/compiler/_compiler.py:601: SyntaxWarning: invalid escape sequence '\d'
fill_opacity = re.search("fill-opacity:(\d*\.)?\d+", curve.path_attrib)
/tmp/code/svg2gcode/svg2gcode/svg_to_gcode/compiler/_compiler.py:604: SyntaxWarning: invalid escape sequence '\d'
"(\d*\.)?\d+", fill_opacity.group(0)
/tmp/code/svg2gcode/svg2gcode/svg_to_gcode/compiler/_compiler.py:664: SyntaxWarning: invalid escape sequence '\['
colors = re.sub("(,|\[|\]|'| )", "", colors.replace(",", "|"))
prefixing the strings with r
seems to fix the warnings.
Ok, I figured there was something wrong with the input file. Closing the ticket. Thank you for the great work!
Ok, I'm having this issue again: no stroke color set: ignore path 'path7'
not sure what triggers it yet, so I'll dump all my setup:
svg2gcode /tmp/sara.svg /tmp/cut.gcode --constantburn --pixelsize 0.06 --pathcut --splitfile --cuttingspeed 1000
svg2image.toml
constantburn = true
pixelsize = 0.06
xmaxtravel= 400
ymaxtravel= 400
imagespeed = 6000
cuttingspeed = 6000
imagepower = 300
cuttingpower = 1000
overscan = 5
source image:
Now the cutting is handled in a different way, my bad.
After a long time without using the engraver, I wanted to use grblhud & svg2image again but got issues from the start:
The output file doesn't contain any real info but have warnings such as "; no stroke color set: ignore path 'path1'"
I can reproduce it just with a circle converted to a path.