Importing an SVG leads to weirdness

So, I’ve been experimenting with my first laser project at a local makerspace, and ran into an oddity.

I developed an SVG, partially composed of images and partly with vectors. Perfectly normal SVG—Inkscape can read it, Affinity Designer can read it, Adobe Illustrator can read it.

Lightburn, however, while it can read it, it doesn’t do what the others do.

The SVG image can be had here:

When I import it into Lightburn (v0.9.09), though, the vectors are scaled up 283%. The images are not, though their top-left corner is in the correct place. And I have no idea why. Does anyone?

In addition, even though the images are rendered with the exact shade of orange that Lightburn would classify as a layer, they get imported as black, and I have no idea why that would be, either.

Some answers would be cheerfully appreciated. Thanks.

When I open the SVG in Inkscape and set the units to mm, the numbers match the LB mm figures, which implies that the vectors are not scaling up, but that there’s an interpretation error between the programs.

That’s the only moderately useful tidbit I can provide as my experience with manipulating images is limited to LB exclusively, other than tracing bitmaps in Inkscape.

Yeah, it opened weird for me too.
One of the first things I notice is that the default units is px, which may or may not be part of the problem, I dunno.
But it seems like it may not the best choice for something that gets sent to a laser or milling/cutting machinery that wants a “real” dimension.

Hm. I’ll see what I can do to fix that.

I’m not sure if it makes any difference at all to your project, or how the calculation from px to inches or mm works, but it just seems a little weird to me to work in px for something intended to be a specific physical size.

When Inkscape is installed px is it’s default “dimension” and if you want it to default to inches or mm every time you open it you can change it on a blank document (along with all your other preferences) and save it in the Inkscape shared templates directory as “default.svg” and it should always open that way for you.

Except I wasn’t working in Inkscape, and the dimensions I was using was inches. So I need to do some investigating, because it should have been in actual units as opposed to “px”.

It’s just weird that other programs can open it, seemingly with no problem, but not Lightburn.

LightBurn’s SVG import was written from scratch, by me, and supports only the parts of the SVG spec that I’ve seen actually used in the wild. No one creating artwork for CAD uses px as a unit, because that’s display resolution dependent.

Your SVG width & height values are indicated as “100%”. “Normal” SVGs are specified with real units, so that’s likely the issue. I don’t think I’ve ever seen an SVG with size specified this way.

Images are always drawn as black and white - they’re just outlined with the layer color when selected, otherwise they look strange.

OK, I’ll be the first to ask… what program did you use to create it?

Elements were in Adobe Illustrator, exported as SVG (except for PNG for the shirt background). This was then assembled in an Affinity Designer document (where it was easier to do the overall layout) and then exported again to SVG. I double-checked to see if Illustrator could read back in the finished result; it did so with no issues. Affinity Designer had no problem rereading the SVG. Chrome doesn’t seem to have an issue with it, nor does any other program.

The holidays are cramping my investigative time, but I’ll get to this within a couple of days.

Looks like there has been some issues with the SVG format used by Affinity products.

It’ll be the same here - I’m out of the office until the 30th, but things will pick up after that. We’ll be in and out of the forums, but everyone will be trying to get some downtime.

1 Like

2 posts were split to a new topic: Affinity export SVG to LightBurn weirdness

Finally managed to chase this down. This is fixed and will be in the next release:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.