Files
solidcraft/assets
f1153f462d Drawing export: a sheet exported to a file runs in the background, like the view DXF (#4890) (#10431)
* Drawing export: a sheet exported to a file runs in the background, like the view DXF (#4890 EX2)

A sheet exported to a file through the control channel was drawn and written on the window's
thread, so a large PNG at a high dpi held the window up until it was done. `drawing.export` with a
`path` now goes through `file_load` as `Kind::ExportSheet`, beside the view DXF's `ExportDxf`: on a
copy of the design, off the window thread, with an "Exporting sheet" card. Without a path the
reply holds the document, so it runs at once as before. Cancel on the card says which export it
stopped: it said "DXF export cancelled" for every export while the view DXF was the only one.

`Kind::exports()` holds what the two export kinds share (the copy, never adopting the worker's
session, Cancel waiting for the worker, a drop cancelling it, a finished export staying finished),
in place of seven `ExportDxf` tests and a check on the command's name.

`paper_png`'s band loop reports its rows to the current `solidcraft_kernel::watch` and stops
between bands once it is cancelled. The command writes the file only after the PNG is complete, so a
cancelled export writes nothing. With no watch, every other caller, the bytes are unchanged.
`drawing.export`'s checks and write, its commands and its schema are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Drawing export: a held sheet exported in the background has its views, as on the page (#4890 EX2)

A sheet exported to a file runs on a copy of the session. `Session::scratch` leaves the copy's
drawing-scene cache empty, so a deferred drawing that was held (the model changed since its last
`drawing.update`) exported from the copy with no views or dimensions. The same export without a
path, on the window's session, wrote the lines the sheet page shows.

`Session::scratch_as_shown` is `scratch()` plus `Cache::shown_copy`: the world state the cache last
updated against, each view's and dimension's last drawing, and the serial they were numbered to.
That is what `as_shown` reads. The lines kept for closed drawings, the last answer and a request in
flight stay out, since only the window's page uses them. `file_load` takes that copy for its two
export kinds; inserts, updates and opens keep `scratch()`, which is cheaper and never draws a sheet.

Tests: the engine compares the export (svg and out-of-date list) from the session and from the copy
for a drawing that isn't deferred (also after a view's edit), a deferred one with a view edited
since its update (drawn at once), and a held one, its dimension included, on the sheet last shown
and on a second sheet. The window
test writes a held sheet through the background export and compares the file with the synchronous
export.

Co-authored-by: theironchef <6278036+theironchef@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: theironchef <6278036+theironchef@users.noreply.github.com>
2026-11-06 20:38:51 -05:00
..
2026-11-04 11:39:05 -05:00

Application resources

assets/ is the design resource home for SolidCraft. ATTRIBUTION.md is the file inventory and provenance record. Keep one editable master per resource and place shipped derivatives in exports/.

assets/
  icons/
    app/
      shared/source/                 # original Rust mark and executable ICO encoder
      macos/source/SolidCraft.icon/   # approved Composer project and linked SVGs
      macos/exports/                 # paired Assets.car and icon.icns
      windows/exports/               # executable DIB ICO and installer PNG ICO
      linux/exports/hicolor/         # Linux/FreeBSD package images, 16–512 px
    ui/design/svg/                   # authoritative original UI icon masters
    ui/design/tools/                 # authoring bases, checks and included review app
    ui/source/                       # Rust viewport glyphs, markers and navigation
  branding/web/source/og.png          # shared social preview card
  styles/ui/palettes.rs               # light/dark defaults
  styles/web/loading.css             # web loading/canvas styles
  appearances/library.rs             # built-in visual presets
  materials/library.rs               # physical defaults and colours
  shaders/viewport.wgsl               # original viewport shader
  fonts/<family>/                    # unmodified fonts and OFL licences
  locales/{en,de,ja,ko}.json          # shared offline catalogs
  platforms/{macos,linux,windows}/    # bundle, freedesktop and WiX templates
  platforms/macos/dmg/                # disk image window: layout, dmgbuild settings, background art
  archive/icons/macos-v1/
    source/icon.vectorcraft          # earlier editable work, retained
                                     # redundant historical exports are retired

Editing and regeneration

UI artwork identifies the drawing masters and their consumers. Read the mandatory UI style guide before editing an icon. Edit SVG geometry and its command/UI assignments together; inspect both themes and small sizes. Temporary media and generated reports belong in ignored target/. Palettes and model presets are also editable Rust data.

The current macOS master is icons/app/macos/source/SolidCraft.icon/, including its linked SVG layers and appearance settings. The earlier VectorCraft document is preserved in the archive. No other native design projects were available for the current UI set or preview card. Keep any future .vectorcraft, .ai or other native work and linked inputs under that resource's source/work/, with an attribution row; retain the editable document alongside its exports.

Regenerate all exports of the shared Windows/Linux/FreeBSD mark together:

cargo xtask app-icons

For macOS, use Xcode with Icon Composer support:

mkdir -p target/resources/macos-icon
xcrun actool assets/icons/app/macos/source/SolidCraft.icon \
  --compile target/resources/macos-icon --platform macosx \
  --minimum-deployment-target 11.0 --app-icon SolidCraft \
  --output-partial-info-plist target/resources/macos-icon/icon-info.plist \
  --output-format human-readable-text
cp target/resources/macos-icon/Assets.car assets/icons/app/macos/exports/Assets.car
cp target/resources/macos-icon/SolidCraft.icns assets/icons/app/macos/exports/icon.icns

Review and commit source changes and required exports together. Temporary renders, tool caches and package staging belong under ignored target/ or dist/. Normal builds use the committed exports and require no design applications. The CLI still supports arbitrary PNG/ICO exports with solidcraft-cli icon.

Platform bindings

Platform Resources and output paths
macOS Composer master and paired exports; bundle installs Assets.car and SolidCraft.icns
Windows executable solidcraft-executable.ico: original DIB/mask representations at 16/24/32/48/64/128/256 px
Windows installer solidcraft.ico: PNG representations at 16/20/24/32/40/48/64/128/256 px; SOLIDCRAFT_ICONS override retained
Linux, Nix, deb/rpm, tar, Flatpak, Snap Copy canonical hicolor images; icon name stays io.tangencylabs.solidcraft
AppImage Uses the Linux 256 px image and .DirIcon alias
FreeBSD Shares Linux hicolor images and freedesktop metadata
Web HTML/Trunk and manifest.webmanifest stay in apps/solidcraft-web/; copies the Japanese font/licence to fonts/ and the Noto Sans Arabic, KR, SC and TC fonts with their licences to fonts/<family>/ (fetched when a drawing's text needs them), uses the collected CSS, and copies the Linux 32/256/512 px images to icons/ for the favicon and installed app
Docs and link previews xtask book copies the shared card to the existing /solidcraft/og.png public path

Code and provenance

Resources remain compiled by their owning layer through existing APIs: ui-egui::icons::paint_icon and Tokens at L5, model presets in L2 doc, and sketch fonts at L1. State, projection, interaction, commands and GPU bindings stay in their current modules. Embedded data uses CARGO_MANIFEST_DIR; application code needs no runtime resource registry or repository lookup.

cargo xtask assets requires an exact attribution row for every collected file except Markdown documentation, and continues checking file assets elsewhere in the repository. This includes native work, Rust masters, catalogs, shaders and platform templates. Packaging selects explicit current files and fails when required inputs are absent. Archived artwork has no production consumers.

Dependency-owned egui fonts and vendored renderer shaders stay with their libraries; their licences remain in THIRD-PARTY-LICENSES.txt and ATTRIBUTION.md. System fonts, optional packs, user fonts/canvases/decals/materials and native OS controls retain external ownership. Root licence/notice texts stay canonical.