svg2gcode icon indicating copy to clipboard operation
svg2gcode copied to clipboard

<use> elements are not supported

Open karimpanacci opened this issue 9 months ago • 1 comments

I generated an SVG file with the Rust text2svg library, I tried to convert the SVG file to gcode, if it downloads the text2svg library via crates.io it works fine, if instead it uses the version on github: https://github.com/tizee/text2svg/commit/bf8331320d9d70931c4901fdf54a86d43c190e27

and then I try to use the svg file on svg2gcode I get the following file:

G21
G90

this is the svg file that doesn't work: Image

this is the working svg file: Image

I tried to use svg2gcode both through library and through web interface, obviously the result does not change.

I tried to insert both files in the following site: https://validator.w3.org/check

but the file seems to be compliant with the standards.

karimpanacci avatar May 26 '25 17:05 karimpanacci

The first SVG you shared has <use> in it, which should be possible to support but isn't currently implemented.

https://github.com/sameer/svg2gcode/blob/e0c2812e6782a319abf7869bcb8a1de3001a8769/lib/src/converter/visit.rs#L363

sameer avatar Jul 22 '25 15:07 sameer