Add Bounding Rectangle… and Add Bounding Circle… open the command dialog
with Offset (0 to 4,000,000 pt), One per Object (`each`) and Preview, so
the menu sets what the commands take. Cancel removes the preview without
a step of history, and an Offset that takes the shape past the canvas
edge leaves the dialog open with the error.
- The canvas check reuses `sanity::rect_in_range`; the params text and
docs/mcp.md say the limit holds along each axis.
- Tests: the dialog (defaults, preview, Cancel, OK with and without an
Offset and One per Object, the canvas error, the catalog rows); a circle
just inside the limit; one edge past the limit is refused.
- Catalogs: the two menu labels with "…" and "One per Object" in all 28;
the four messages in bg, bs and id as well.
`transform` read `reflect` with `as_str`, `copy` with `as_bool` and
passed `origin` through unchecked. A `reflect` of `42` or `true`
skipped the reflect step and reported success for the steps before it,
a `copy` of `"yes"` transformed the original instead of a copy, and an
`origin` that was not two numbers fell back to the selection centre.
The handler now checks all three before it selects `ids` or runs a
step, and returns an error that names the argument. A null value of
any of the three is left out. The tool description and the
`transform` row in docs/mcp.md say so.
Fixes#6448
When every shape is left out because it would have no size, for example
Add Bounding Rectangle on a straight horizontal line, the error is now
"the shape would have no size" instead of "nothing to enclose", which
stays for objects with no outline. A shape that would reach more than
4,000,000 pt from the origin, for example with a very large `offset`,
is refused with "the shape would reach past the edge of the canvas"
before anything is drawn. Both messages are in the 24 catalogs that
translate messages.
The params text of addon.pathtools.boundingCircle now names the
sublayer rules that docs/mcp.md states: sublayers that clip their
contents count by their clipping paths, other sublayers by their shown
objects. Both commands' params text lists the errors.
The menu items open no dialog and draw one shape around the whole
selection with no offset. docs/ui-parity.md, docs/target-app-parity.md,
docs/mcp.md and the ROADMAP line now say so, and name `each` and
`offset` as command parameters only.
New tests: the menu items in vectorcraft-ui-egui, the canvas-edge error
in vectorcraft-engine, and shapes::convex_hull in vectorcraft-geom.
A point counts as on the path's outline when it is less than the
touching tolerance from it, with its distance from the path's center in
place of the distance between centers. The params text, docs/mcp.md and
the progress doc now say so, and say that every Tangents choice in the
dialog gives the same lines for a point.
Tests: a point half the tolerance inside and outside a circle gets the
one line there, and farther off gets none or two; a point placed on a
turned outline gets a line as long as the outline is wide along it; the
dialog previews the same two lines for every Tangents choice and keeps
them as one step, and a point inside changes nothing and says why.