Skip to content

Fix #550: an SVG of chosen artboards holds only their art - #558

Merged
bflatastic merged 1 commit into
mainfrom
fix/issue-546
Oct 8, 2026
Merged

bflatastic merged 1 commit into
mainfrom
fix/issue-546

Conversation

@bflatastic

Copy link
Copy Markdown
Member

An SVG exported for one artboard of many now holds that artboard's art, not the whole document's.

Fixes #550
Part of #546

  • fileio::export::art_over: the document with only the objects whose visual bounds reach an artboard, at any depth of layers and sublayers (objects reaching in stay whole; a clipping layer keeps all its objects). The SVG encoder uses it for each artboard the export names (Use Artboards with a range or All, Export for Screens). With no artboard named (Save As SVG) the whole document is written, as before.
  • Tests: engine — range 3, All and a single artboard each hold only their artboard's shapes, an un-named export holds both; UI — Export As with Use Artboards and Range 1 / 3 writes exactly one file in SVG, DXF, PDF and PNG, and the SVG and DXF hold the art only when it is on that artboard. An SVG Options test that exported an empty artboard now picks artboard 1.
  • Docs: the SVG useArtboards option text and docs/mcp.md; ROADMAP Last updated.

#546 (DXF) is not fixed here: I couldn't reproduce lost art. In an 80-artboard document, Export As → DXF with Use Artboards and Range 80 (and the same through document.export, including an Image Trace object on artboard 80) writes one drawing with that artboard's fills as solid HATCHes, origin at its corner, extents right. Ways the reporter could see "only the outline":

  • DXF R12: R12 has no fills, so filled areas are written as outlines (the export notes this in the status bar).
  • Placed raster images: written as IMAGE entities that link a PNG/JPEG written next to the .dxf. A viewer that can't find or show the linked file shows only the image frame.
  • CAM/laser viewers that ignore HATCH: they show nothing of fill-only art (traced art has no strokes).

The reporter's file, or the DXF version they picked, would settle it.

Checks

  • Rebased on origin/main af7a523.
  • cargo test -p vectorcraft-engine -p vectorcraft-ui-egui, cargo clippy -p vectorcraft-engine -p vectorcraft-ui-egui --all-targets -- -D warnings, cargo fmt --all, cargo xtask wasm.

🤖 Generated with Claude Code

Exporting one artboard of many to SVG wrote the whole document's art into
that artboard's file, the other artboards' art outside its viewBox: an
editor opening it showed every artboard's art. A file for an artboard
named in the export (Use Artboards with a range or All, Export for
Screens) now holds the objects over that artboard only, at any depth of
layers, as DXF's crop leaves them; objects reaching into it stay whole
and a clipping layer keeps all of its objects. An SVG with no artboard
named (Save As) still holds the whole document.

Part of #546: Export As with a range writes the chosen artboard alone in
SVG, DXF, PDF and PNG, each file with that artboard's art (tested from
the dialogs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bflatastic
bflatastic merged commit 2139c4d into main Oct 8, 2026
bflatastic added a commit that referenced this pull request Oct 8, 2026
Land #558 (fix #550: an SVG of chosen artboards holds only their art)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Export to SVG ignores selected range of artboards

1 participant