Files
solidcraft/assets
CamWightandClaude Opus 5.5 08cd8d6442 Drawings: title blocks on sheets, and a drawing can start from or be restyled by a template (#3875) (#7208)
* Drawing sheets: a copy of a title block on the drawing border, saved with the sheet (#3875)

`Sheet.title_block` holds a copy of its definition, as `border` does. Each sheet's check lays it
out on the drawing border, so a sheet without a border, a block wider or taller than the border,
or a change of paper that leaves no room is refused. `drawing.sheet.add` and `drawing.sheet.set`
take `title_block` (a definition, or null for none), a new sheet takes the block of the sheet it
follows, and `drawing.inspect` lists it. A sheet without a block saves no `title_block`, so an
older drawing reads as having none (pending format file `sheet-title-block.rs`).

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

* Drawing sheets: the built-in title block, on every new drawing (#3875)

`title_block::default_block()` is the 180 x 54 mm block of twelve cells approved on #3875, with
the legal owner read from the drawing's `organization` and the general tolerances as text to
change. `drawing.create` starts its sheet with it. The geometry tests read the built-in block
instead of their own copy of it.

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

* Drawing sheets: a title block's lines on paper, drawn after the views (#3875)

`TitleBlockLayout::paper` draws the outline, then every cell edge inside it, each once:
neighbours' shared edges, and edges that meet along one line, are one stroke. The sheet scene
paints the block after the views, and counts its records with the border's, so no view takes
its room. The view tests' drawing leaves the block off, so their scene is still the border and
the views.

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

* Drawing sheets: the title block's projection symbol, in the drawing's projection (#3875)

ISO 5456-2 (Annex A): a truncated cone and its end view, h across the cone's
small end from table A.1's sizes (3.5 to 20 mm), the largest that fits the
cell, lines h/10 wide. The end view is on the right in first angle and on
the left in third. The block only says a cell holds the symbol; the angle
comes from drawing.projection, and the sheet scene redraws when it changes.

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

* Drawing sheets: a title block's fields, and text typed over its cells (#3875)

A title block cell reads its fields from the component the sheet documents (its
name, part properties, material and mass from the bill of materials), the
drawing, the sheet (number and count among the counted sheets) and the newest
revision row; a field with no value shows "-". A key its source doesn't have is
refused when a block is given or read. Sheets save text typed over their cells by
cell name; drawing.inspect lists each text cell with its value beside an override.

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

* Drawing templates as data: a drawing with no model, and ISO built-ins (#3875)

A template is a drawing with no sources, views, dimensions, balloons, revision
rows or documented components, so it is saved and read as a drawing is. A new
drawing is a copy with ids of its own. The built-ins, ISO A4 to A0 for parts and
for assemblies, are made in code when asked for and differ only in their general
tolerances.

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

* Drawing templates: drawing.create from a template, and the preferred ones (#3875)

drawing.create takes template? (default ISO A3, for a part or, for a design with
components, an assembly) and projection? over the template's. The new
drawing.template.list lists the built-ins and marks the one a new drawing starts
from. Preferences add a template for part drawings and one for assembly drawings;
the app fills in the preferred template and projection before drawing.create
runs, so a template named keeps its own projection, instead of changing the
projection after the drawing is made. A saved template this version doesn't know
reads as the default.

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

* Drawing templates: apply one to the drawing open, moving nothing (#3875)

drawing.template.apply {template, dry_run?} gives each sheet the paper, drawing
border and title block of the template's sheet in its place (its last for the
sheets past its own). Text typed over a cell stays while the new block has a
text cell of that name; the cells whose text is dropped are listed. Nothing
moves: the views a new paper leaves outside the drawing space are listed. A dry
run answers the same and changes nothing; applying is one undo step, none when
nothing changes.

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

* Drawing sheets: views a title block covers are listed, never moved (#3875)

A view lying over its sheet's title block is listed with the ones the drawing
space leaves out, after a change of paper or block (drawing.sheet.set) and when
a template restyles a sheet. Where a block sits is one rule, the one a sheet is
checked by (Sheet::title_block_outline), and the overlap of two boxes is one
rule in Aabb2::overlaps, which the title block's own cell check now uses too.

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

* Drawing templates: save one as a file, and start or restyle drawings from it (#3875)

drawing.template.save {path} writes the drawing open as a template: its format,
and nothing it draws or documents. drawing.create and drawing.template.apply take
a .json template file as well as a built-in's name. A file is read as a drawing
is, then held to the template rules; files are read and written through the same
file check and atomic write as the sheet export. A drawing made from a file keeps
its own copy, so a later save changes no drawing.

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

* Drawing sheets: the built-in title block is 180 x 49 mm (#3875)

The top row is 15 mm, Sheet is 30 mm wide, lined up with Mass, and Date of
issue is 32 mm. The top row now holds one line of the legal owner, two of the
general tolerances and the 3.5 mm projection symbol.

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

* Drawing sheets: one operation sets a sheet's title block, and drawing.sheet.set names the typed text it drops (#3875)

A sheet's block was set in two places: drawing.sheet.set kept the typed
text of the text cells the new block still has, and drawing.template.apply
did the same and listed what it dropped. Sheet::set_title_block is now the
one rule both use. drawing.sheet.set's reply gains `lost`, the cells whose
typed text a new block drops, as drawing.template.apply's reply has it, and
its help says that a view over the title block is listed too.

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

* Drawing templates: the built-ins and a new drawing start with the border only; the built-in title block is added by name (#3875)

A template now holds only the ISO border by default. A title block,
tables, references and text are added to a drawing, and a template saved
from it keeps them.

- The ten built-ins (iso-a4-part ... iso-a0-assembly) become five,
  iso-a4 to iso-a0: one sheet with the ISO border. Without the block, the
  part and assembly versions were the same.
- drawing.create with no template starts from iso-a3. The two
  preferences for parts and assemblies become one, drawing_template,
  "Template for new drawings".
- drawing.sheet.add and drawing.sheet.set take title_block: "built-in".
  The built-in block's general tolerances are a part's or, for a design
  with components, an assembly's, through Sheet::set_title_block.
- An old name such as iso-a3-part is refused with the list of names;
  drawings haven't shipped.

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

* Drawing title blocks: a drawing with no number of its own is numbered by the component its sheet documents (#3875)

The identification number cell read the drawing's part number property,
and showed "-" for a drawing that has none, which is every new one. Now
such a drawing shows the name of the component the sheet documents, so a
new drawing of a part is numbered by the part until it is given a number.

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

* Drawing templates: a template saved from a drawing keeps typed text only over plain text cells (#3875)

A template saved from a drawing kept all the text typed over its title
block's cells, including text over a cell that shows a field, such as
the material or the title, which belongs to the design the drawing
documents. Now it keeps the text typed over cells of plain text, such as
the general tolerances, and leaves the rest behind.

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

* Drawing title blocks and tables: a field without a value shows nothing (#3875)

A title block cell or a table row whose field has no value (a property
nobody gave, a row field its row doesn't have, an uncounted sheet's
number) now shows nothing instead of "-".

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

* Drawing title blocks: the built-in block's general tolerances start empty (#3875)

The general tolerances cell of the built-in title block now starts empty for
parts and assemblies alike, rather than ISO 2768-m in the block and a part's
or an assembly's text added by drawing.sheet.set. A shop types its own, or
its template carries them, and an empty cell shows nothing.

- template::PART_TOLERANCES, ASSEMBLY_TOLERANCES, for_assembly and
  built_in_block go: "built-in" is title_block::default_block.
- drawing.template.list's help no longer speaks of part and assembly
  built-ins.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 11:01:13 -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/{liberation-sans,biz-udp-gothic}/ # 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 Japanese font/licence to fonts/, 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.