I'm using Inkscape to prepare a file for laser engraving. I place items onto different layers according to the action I want the laser engraver to perform (engrave, cut, etc.) . I then export each layer from Inkscape as a separate SVG file.
Up to now I've been using a custom extension for this (based on a fork of https://github.com/jespino/inkscape-export-layers), but it's a bit hacked together and appears to have broken with the 1.1/1.2 update. However, just as I was starting to look into upgrading it to work with 1.2, I discovered the new built-in "batch export" functionality, which sounded wonderful!
Unfortunately, it seems that when you export multiple layers, Inkscape automatically crops the export to only the extent of features in that layer? So, every output file is of a different width/height. This means that my layers no longer line up and cannot be reconstructed on my laser. In the release notes (Inkscape 1.2 Release Notes ), it states "To have all layers exported at the same size, you'd still need an (invisible) object in each layer with the desired size." but that is not viable for my use-case, since the laser engraver doesn't pay attention to the "visibility" of objects - if they're defined in the SVG, they're going to get plotted.
This seems to be a _nearly_ great feature, but I can't imagine it's much use in its current state. Is there something I'm missing, or is this a feature request that I can help implement? It seems odd to have the choice of page/document/selection boundary when exporting a single image, but not when exporting in batch.
Any help gratefully received, and many thanks in advance
In the meantime, some workarounds might be developed...
Does your laser setup respect/recognize clones, symbols, text polygons or rounded rectangle svg objects? If there is an object type that the laser ignores, they might be placed strategically in each corner of each layer.
I've also seen cases where objects with unset fill or stroke (or none) would not cut.
Many thanks for the swift reply! Adding clones to the corners is an interesting idea - I think you're correct that they are ignored (unset fill or stroke objects are still plotted). However, having to manually position clones on every layer just for that purpose feels ugly, and would make my current workflow slower and more prone to error...
Personally, I would have expected the batch export to use the entire extent of the document as the default behaviour for each layer (or, at the very least, for that to be an option) so I will file a feature request to add that, because I'm sure others would also find that change would makes the batch export functionality much more useful.
In the meantime, I think I'll look into upgrading the previous extension I was using to work with v1.2. If/when I do so, I'll post a link back here for the benefit of anyone else finding this thread in the future :)
I found an existing issue describing exactly the same situation, so I simply added my comment on to that (yay for searching the queue before filing a new feature request!)
But, as it turned out, it wasn't actually too onerous to fix the extension I was using for v1.2 (it seems it had principally become broken due to changes in MAN --batch-process usage).
Hi!
I'm using Inkscape to prepare a file for laser engraving. I place items onto different layers according to the action I want the laser engraver to perform (engrave, cut, etc.) . I then export each layer from Inkscape as a separate SVG file.
Up to now I've been using a custom extension for this (based on a fork of https://github.com/jespino/inkscape-export-layers), but it's a bit hacked together and appears to have broken with the 1.1/1.2 update. However, just as I was starting to look into upgrading it to work with 1.2, I discovered the new built-in "batch export" functionality, which sounded wonderful!
Unfortunately, it seems that when you export multiple layers, Inkscape automatically crops the export to only the extent of features in that layer? So, every output file is of a different width/height. This means that my layers no longer line up and cannot be reconstructed on my laser. In the release notes (Inkscape 1.2 Release Notes ), it states "To have all layers exported at the same size, you'd still need an (invisible) object in each layer with the desired size." but that is not viable for my use-case, since the laser engraver doesn't pay attention to the "visibility" of objects - if they're defined in the SVG, they're going to get plotted.
This seems to be a _nearly_ great feature, but I can't imagine it's much use in its current state. Is there something I'm missing, or is this a feature request that I can help implement? It seems odd to have the choice of page/document/selection boundary when exporting a single image, but not when exporting in batch.
Any help gratefully received, and many thanks in advance
Feel free to add a feature request on the GitLab tracker. https://inkscape.org/forums/beyond/how-to-report-bugs-or-request-new-features/
In the meantime, some workarounds might be developed...
Does your laser setup respect/recognize clones, symbols, text polygons or rounded rectangle svg objects? If there is an object type that the laser ignores, they might be placed strategically in each corner of each layer.
I've also seen cases where objects with unset fill or stroke (or none) would not cut.
Many thanks for the swift reply! Adding clones to the corners is an interesting idea - I think you're correct that they are ignored (unset fill or stroke objects are still plotted). However, having to manually position clones on every layer just for that purpose feels ugly, and would make my current workflow slower and more prone to error...
Personally, I would have expected the batch export to use the entire extent of the document as the default behaviour for each layer (or, at the very least, for that to be an option) so I will file a feature request to add that, because I'm sure others would also find that change would makes the batch export functionality much more useful.
In the meantime, I think I'll look into upgrading the previous extension I was using to work with v1.2. If/when I do so, I'll post a link back here for the benefit of anyone else finding this thread in the future :)
Thanks again.
I found an existing issue describing exactly the same situation, so I simply added my comment on to that (yay for searching the queue before filing a new feature request!)
But, as it turned out, it wasn't actually too onerous to fix the extension I was using for v1.2 (it seems it had principally become broken due to changes in MAN --batch-process usage).
So for the benefit of anyone else, here's a link to my solution in the meantime: https://github.com/playfultechnology/inkscape-export-layers/