* SVG export: preserve document unit in viewBox and width/height (#864)
When exporting SVG documents with physical units (mm, cm, in, pc), emit
the physical unit suffix on the root <svg width=... height=...>
attributes while keeping viewBox numbers and inner coordinates in 1:1 points
per SVG 1.1 coords §7.10. This avoids the 75% scaling mismatch when opening
drawings in external tools such as Inkscape or LightBurn, and preserves
the document unit setting across save/open round trips. Unitless documents
(points, pixels) continue to emit unitless dimensions.
Tested via export_physical_units_writes_unit_suffixes in vectorcraft-svg
and full round-trip svg_round_trip_preserves_document_units in vectorcraft-engine.
Ran cargo xtask ci (fmt, clippy, tests, xtask gates).
* SVG export: preserve nonzero width and viewBox on extreme small dimensions
- Export Selection to HP-GL checks the selection and starts Pen Table
from its pens, as the export writes it, and `exportSelection` is no
longer remembered for the next whole-document export.
- Pen Table with options or an artboard choice the export refuses keeps
One Pen per Color and shows the error, instead of starting from one
black pen that corrected options would keep. `automatic_pens` returns
that error.
- `automatic_pens` refuses `rect`, as `check` and the export do.
- A save panel shown in line that is canceled keeps the dialog open,
and a canceled save panel keeps the options remembered before.
Rows dragged to the trash before isolation mode started went to
layer.delete at once when none needed a question. ui.layerDelete now
returns an error for any row outside the isolated art, given or dropped,
and deletes nothing. OK in its question with no rows given deletes the
highlighted rows the panel lists, not every highlighted row.
- OK and Delete on one or several existing points are refused when those
points changed in any way since the dialog opened (place, widths,
stroke weight, or pairing as a discontinuous point), or when another
document is active.
- OK with no width changed checks the selection before it closes.
- An untouched Total Width above 100000 pt no longer blocks OK; a value
set above 100000 pt is still refused.
- A width set into a field that OK refuses stays there when another
field is set afterward, and a negative width typed for several points
is refused at OK instead of becoming 0.
- `ui.widthPointEdit` refuses `index` together with `t`.
- Double-clicking a selected width point passes every selected entry,
so points at nearly one place are all edited.
An isolated ruler guide left the Layers panel with no rows, since the
panel lists no object row for a ruler guide. object.isolate now returns
"ruler guides can't be isolated" and isolation mode stays as it was.
The Sizer's and the Sprayer's Average compare each instance's size on the page, so a set that
holds instances of different symbols meets at their mean drawn size. A symbol without a recorded
size is measured by its art, once per command. With Size: Average and no instance under the brush,
a sprayed instance has its symbol's own size whatever `scale` is, and new instances are spaced by
the size they are placed at. With Use Pressure Pen, a drag sample at the same position is kept when
the pressure changes by 0.05 or more.
- With Show Layers Only on, an isolated group or object is listed as the
top row instead of leaving the panel empty.
- Duplicate Selection in the panel menu sends the rows the panel lists,
so a highlighted row outside the isolated art is not copied.
- In isolation mode the Hide, Outline and Lock Others pairs in the panel
menu and the row menu are off, and Alt-clicks on an eye or a lock
change nothing. Locate Layer is off while a group or object is
isolated.
- OK in Delete Selection's question deletes nothing when isolation mode
started while it asked and a row it asked about is outside the
isolated art.
- The isolated row shows no drop place for an Alt-drag onto itself, and
a guide is not dropped on a layer outside the isolated art.
- Each document's isolation mode is followed on its own, so a document
first shown in isolation mode opens its isolated row.
- The isolation test steps out of a sublayer one level at a time, as
Exit Isolation Mode now does.
OK closes the dialog and renames nothing when another document has
become the active one, or when the color group at the group's place in
the list no longer has the name and swatches the dialog opened with.
swatch.renameGroup makes a drag still in progress an undo step of its
own first, so canceling or undoing the drag leaves the rename.
ui.colorGroupOptions without group opens on the color group selected
alone in the Swatches panel, as long as the panel's selection still
belongs to the active document and art.
The panel's selection follows renames in a command.batch only up to the
first step that may switch documents or replace a group. Ungroup Color
Group and Delete Swatch take the names they removed out of the
selection.
The es catalog had the missing `group` and no colour group `{group}`
rows twice after the last merge of main; the duplicates are removed.
- When any solid's mapped art passes the shared limits, every solid in
the effect draws without its mapped art, so Invisible Geometry hides
all of them or none.
- A revolved group lists its surfaces with the members' shared curve
sampling, and an extruded group lists none past the faces of one
object.
- Commands refuse art on walls, bevels and Revolve's side whose curves,
cut into straight pieces at the map's scale and placed about the
surface's center, pass 400,000 points. Caps are not counted.
- Each contour's bounds test counts as a cut, in Map Art and in the side
graphics.
- On a facet whose curved edge bows out of its cell, the art reaches the
whole facet.
- A bevel as deep as the solid leaves no walls, and its bevels take the
numbers after the caps.
- Surfaces past the face limit are refused as the side is.
- threeD.mapArt keeps a deleted symbol only while the request leaves
`symbol` out.