Path Precision Tools: the bounding shapes' menu items open a dialog with Offset and One per Object

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.
This commit is contained in:
dotCooCoo
2026-11-18 08:17:22 -08:00
parent 8e09fe6e53
commit 91cacaa6ed
39 changed files with 249 additions and 54 deletions
+8 -6
View File
@@ -13432,9 +13432,9 @@ Commands:
Preview; with a point selected, every Tangents choice gives the same lines. → `{ids, external, internal,
centerline, warning?}` (`centerline`: the centerline's id, or null).
- `addon.pathtools.boundingRectangle {each?, offset?}` draws a live rectangle on the geometric bounding box of the
selected objects, strokes and effects left out (Object › Plug-ins › Path Precision Tools › Add Bounding Rectangle,
selected objects, strokes and effects left out (Object › Plug-ins › Path Precision Tools › Add Bounding Rectangle…,
#6966). `addon.pathtools.boundingCircle {each?, offset?}` draws the smallest live circle that holds the outlines of
the selected objects (Add Bounding Circle). The circle reads paths and compound paths by their curves, clip groups
the selected objects (Add Bounding Circle…). The circle reads paths and compound paths by their curves, clip groups
and sublayers that clip their contents by their clipping paths, other sublayers by their shown objects, images by
their corners, and type and other objects by the corners of their bounding box. It splits each curve into pieces
until every piece's control points lie within 0.01 pt of its chord, fits the circle to the ends of the pieces, and
@@ -13442,8 +13442,9 @@ Commands:
most; a piece that still bends more counts by its control points, which can make the circle slightly larger than the
smallest one. `offset` (0 or more, default 0) adds space: a rectangle grows by `offset` on each side and a circle's
radius grows by `offset`. `each: true` draws one shape around each selected object instead of one around the whole
selection. The two menu items open no dialog: they draw one shape around the whole selection with no offset, and
`each` and `offset` are set only through the commands.
selection. The menu items Add Bounding Rectangle… and Add Bounding Circle… open a dialog with Offset (0 to 4,000,000
pt, default 0), One per Object (`each`, default off) and Preview; OK draws the shapes as one undo step, and Cancel
removes the preview without a step of history.
Each shape gets the current paint and goes on top of the current layer, or of the isolated group, as other new art
does; inside an isolated compound path it goes beside the compound path and does not join it. The new shapes are
@@ -13451,8 +13452,9 @@ Commands:
a shape with no size: the rectangle around a straight horizontal or vertical line, or the circle around a single
point, unless `offset` is more than 0. With `each`, the result's `skipped` counts those objects. It is an error, with
the document unchanged, when no shape is left to draw ("the shape would have no size" when a shape with no size was
left out, else "nothing to enclose"), when a shape would reach more than 4,000,000 pt from the origin ("the shape
would reach past the edge of the canvas", for example with a very large `offset`), and when `offset` is below 0.
left out, else "nothing to enclose"), when an edge of a shape (of a circle's bounding box) would lie more than
4,000,000 pt from the origin along either axis ("the shape would reach past the edge of the canvas", for example
with a very large `offset`), and when `offset` is below 0.
→ `{id: the first shape, ids, skipped?}`
```json
+1 -1
View File
@@ -2793,7 +2793,7 @@ A VectorCraft addition, so no area score moves. Object › Plug-ins › Path Pre
## Path Precision Tools add-on: Add Bounding Rectangle and Add Bounding Circle (2026-11-17)
A VectorCraft addition, so no area score moves. Object › Plug-ins › Path Precision Tools › Add Bounding Rectangle (`addon.pathtools.boundingRectangle`) draws a live rectangle on the selection's geometric bounding box, and Add Bounding Circle (`addon.pathtools.boundingCircle`) draws the [smallest enclosing circle](https://en.wikipedia.org/wiki/Smallest-circle_problem) of the selected outlines, with curves flattened to within 0.01 pt and the radius 0.01 pt larger, so the circle holds the curves. Both use the current paint, go on top of the current layer or the isolated group, and are one undo step; shapes with no size are skipped (#6966). The menu items draw one shape around the whole selection with no offset; the commands also take `each` (one shape per object) and `offset`. Tests: `shapes::tests` in `vectorcraft-geom` (`enclosing`, `convex_hull`), `cmd::addons::pathtools::bounding::tests` in `vectorcraft-engine` and `addons::pathtools::tests` in `vectorcraft-ui-egui` (`add_bounding_rectangle_and_circle`). Commands: `docs/mcp.md` › Path Precision Tools add-on.
A VectorCraft addition, so no area score moves. Object › Plug-ins › Path Precision Tools › Add Bounding Rectangle (`addon.pathtools.boundingRectangle`) draws a live rectangle on the selection's geometric bounding box, and Add Bounding Circle (`addon.pathtools.boundingCircle`) draws the [smallest enclosing circle](https://en.wikipedia.org/wiki/Smallest-circle_problem) of the selected outlines, with curves flattened to within 0.01 pt and the radius 0.01 pt larger, so the circle holds the curves. Both use the current paint, go on top of the current layer or the isolated group, and are one undo step; shapes with no size are skipped (#6966). The commands take `each` (one shape per object) and `offset`, and the menu items Add Bounding Rectangle… and Add Bounding Circle… open a dialog with Offset, One per Object and Preview. Tests: `shapes::tests` in `vectorcraft-geom` (`enclosing`, `convex_hull`), `cmd::addons::pathtools::bounding::tests` in `vectorcraft-engine` and `addons::pathtools::tests` in `vectorcraft-ui-egui` (`add_bounding_rectangle_and_circle_open_a_dialog_with_offset_and_one_per_object`). Commands: `docs/mcp.md` › Path Precision Tools add-on.
## Path Precision Tools add-on: Expand Dashes into Paths (2026-11-01)
+1 -1
View File
@@ -517,7 +517,7 @@ next unit in the order a right-click on a ruler lists them, from Feet back to Po
| Path Precision Tools add-on (VectorCraft addition): Object › Plug-ins › Path Precision Tools › Expand Dashes into Paths turns each selected path's dashed stroke into separate open paths, one per dash, laid out as the stroke draws them (pattern, offset, Align Dashes to Corners and Path Ends), each keeping the stroke with the dashes off; one undo step | done | #4922; `addon.pathtools.expandDashes` (in `crates/engine/src/cmd/addons/pathtools.rs`, using the renderer's dash layout) and its tests; not a feature of the reference app, so it is not scored |
| Path Precision Tools add-on (VectorCraft addition): Object › Plug-ins › Path Precision Tools › Smooth Bridge… (Radius as a percentage of the smaller circle's radius, Keep Originals; Preview) joins two selected circles into one outline with two concave arcs that touch both circles, in place of the circles or above them; one undo step | done | `addon.pathtools.bridge`, `crates/pathops/src/addons/pathtools/bridge.rs`, `crates/ui-egui/src/addons/pathtools/bridge.rs` and their tests; a VectorCraft addition, so it is not scored |
| Path Precision Tools add-on (VectorCraft addition): Object › Plug-ins › Path Precision Tools › Tangent Circle… draws the circles that touch two selected paths or compound paths at a radius, or three of them, each touching the outlines without crossing them; Radius (two shapes), a Circle menu (All or one by number) and Preview; one undo step | done | `addon.pathtools.tangentCircle` (in `crates/engine/src/cmd/addons/pathtools/tangent_circle.rs`, geometry in `crates/pathops/src/addons/pathtools/tangent_circle.rs`) and its tests; a VectorCraft addition, so it is not scored |
| Path Precision Tools add-on (VectorCraft addition): Object › Plug-ins › Path Precision Tools › Add Bounding Rectangle and Add Bounding Circle draw a live rectangle on the selection's geometric bounding box, or the smallest live circle that holds its outlines, around the whole selection with no offset, without a dialog; one undo step | done | `addon.pathtools.boundingRectangle` and `addon.pathtools.boundingCircle` (in `crates/engine/src/cmd/addons/pathtools/bounding.rs`, the circle in `crates/geom/src/shapes.rs`, `enclosing_circle`; `each` and `offset` are command parameters only) and their tests, with the menu items' test `add_bounding_rectangle_and_circle_draw_around_the_whole_selection` in `crates/ui-egui/src/addons/pathtools/tests.rs`; a VectorCraft addition, so it is not scored |
| Path Precision Tools add-on (VectorCraft addition): Object › Plug-ins › Path Precision Tools › Add Bounding Rectangle… and Add Bounding Circle… draw a live rectangle on the selection's geometric bounding box, or the smallest live circle that holds its outlines, from a dialog with Offset, One per Object (a shape around each object instead of one around the whole selection) and Preview; one undo step | done | `addon.pathtools.boundingRectangle` and `addon.pathtools.boundingCircle` (in `crates/engine/src/cmd/addons/pathtools/bounding.rs`, the circle in `crates/geom/src/shapes.rs`, `enclosing_circle`; the dialog is the command dialog, `crates/ui-egui/src/dialogs/command.rs`) and their tests, with the menu items' test `add_bounding_rectangle_and_circle_open_a_dialog_with_offset_and_one_per_object` in `crates/ui-egui/src/addons/pathtools/tests.rs`; a VectorCraft addition, so it is not scored |
| Path Precision Tools add-on (VectorCraft addition): Effect › Path Effects lists its live effects (Dashes to Geometry, Add Anchors, Extend Path, Close Path, Smooth Anchors, Retract Handles, Reverse Direction, Simplify Anchors, Split at Anchors), each with the effect dialog's live Preview except Reverse Direction, which has no options, and listed in the Appearance panel like any effect | done | `addon.path.*`, `crates/effects/src/addons/path.rs`, `crates/ui-egui/src/addons/pathtools.rs` and their tests; not a feature of the reference app, so it is not scored |
| Path Precision Tools add-on (VectorCraft addition): Object › Plug-ins › Path Precision Tools selects its four tools (Anchor Eraser Brush, Extend Path, Measure & Inspect, Parametric Shape), which the All Tools drawer lists under their own heading but neither toolbar shows as shipped, opens the Anchor Inspector panel (the selected anchor's X/Y and handle lengths and angles as fields; Make Smooth, Make Corner, Equalize Handles, Remove Points Keep Shape, Add Points, the three ways to close) and the Parametric Shape panel (kind, count, W/H, rotation, the kind's own values and corner radius of the selected parametric shape, or of the tool's next one), and runs Add Points at / Split at Crossings and Convert to Parametric Shape; the Parametric Shape Tool draws ten re-editable kinds from the centre (↑/↓ and ←/→ change their numbers while dragging) and edits a selected one with handles; a double-click on the brush or Extend Path tool opens its options | done | `addon.pathtools.*`, `crates/tools/src/addons/`, `crates/ui-egui/src/addons/pathtools.rs`, `crates/ui-egui/src/addons/pathtools/shape.rs` and their tests; not a feature of the reference app, so it is not scored |
| Path Precision Tools add-on (VectorCraft addition): Object › Plug-ins › Path Precision Tools selects its six tools (Anchor Eraser Brush, Extend Path, Measure & Inspect, Parametric Shape, Corner Tool, Slide Anchor Along Path), which the All Tools drawer lists under their own heading but neither toolbar shows as shipped, opens the Anchor Inspector panel (the selected anchor's X/Y and handle lengths and angles as fields; Make Smooth, Make Corner, Equalize Handles, Remove Points Keep Shape, Add Points, the three ways to close) and the Parametric Shape panel (kind, count, W/H, rotation, the kind's own values and corner radius of the selected parametric shape, or of the tool's next one), and runs Add Points at / Split at Crossings and Convert to Parametric Shape; the Parametric Shape Tool draws ten re-editable kinds from the centre (↑/↓ and ←/→ change their numbers while dragging) and edits a selected one with handles; the Corner Tool cuts editable corners on any path (hover shows the anchor, a click uses its radius and kind, a drag sizes the corner, Shift whole values; a corner's marker selects it and loads its values, drags to resize, to 0 or double-clicked removes it; never past what fits; Alt-marquee cuts every anchor inside) with a Corners section in the Anchor Inspector (radius, kind, selected count, Apply to Selected Anchors); Slide Anchor Along Path drags an anchor along its curve with the segments beside it refitted, Shift snapping where the tangent is a multiple of 45°; a double-click on the brush or Extend Path tool opens its options | done | `addon.pathtools.*`, `crates/tools/src/addons/`, `crates/ui-egui/src/addons/pathtools.rs`, `crates/ui-egui/src/addons/pathtools/` and their tests; not a feature of the reference app, so it is not scored |