mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-31 21:27:00 -06:00
Add-ons: Artwork Cleanup — simplify keeping shape, health check, deep ungroup, rejoin
A built-in add-on under Object › Plug-ins › Artwork Cleanup: - Simplify Anchors (Keep Shape) removes anchors while the outline stays within a tolerance, optionally keeping sharp corners. - Document Health Check finds and fixes 16 kinds of problems in the selection or the document (stray points, duplicate and collinear anchors, tiny handles, nearly closed paths, needless groups, compound paths and clipping groups, unpainted and invisible objects, duplicate objects, art off every artboard, empty artboards…), with Show, Fix Selected and Fix All, each fix one undo step. - Deep Ungroup and Rejoin Path Pieces. The add-on lives in its own modules (pathops, engine and ui-egui addons folders) and leaves the existing commands, tools and menus as they were.
This commit is contained in:
+56
@@ -5652,3 +5652,59 @@ the entry names and decodes the codes that VectorCraft's default shortcuts agree
|
||||
{"name":"run_command","arguments":{"command":"shortcutSet.read","params":{"path":"/Users/me/Studio.kys"}}}
|
||||
{"name":"run_command","arguments":{"command":"importMatches.set","params":{"matches":[{"kind":"name","name":"Group","target":"object.group"},{"kind":"key","name":"901","target":"G"}]}}}
|
||||
```
|
||||
|
||||
## Artwork Cleanup add-on
|
||||
|
||||
Artwork Cleanup is a built-in add-on: its commands are `addon.cleanup.*`, and in the desktop app it lives in Object ›
|
||||
Plug-ins › Artwork Cleanup and in its panel (`window.panel {panel: "artworkCleanup"}`).
|
||||
|
||||
`addon.cleanup.simplify {tolerance?, protectCorners?, ids?}` removes the anchors each selected path can do without and
|
||||
refits the handles beside each one, so the outline keeps its shape. `tolerance` runs from 1 to 100 (20 by default); the
|
||||
outline stays within tolerance × 0.02 pt of where it was, measured against the original outline, so removals don't add
|
||||
up. With `protectCorners`, anchors where the path turns by more than 30° stay. Open ends always stay. It reports the
|
||||
anchor counts `before` and `after`, as one undo step.
|
||||
|
||||
The health check looks for issues in the selection, or in the whole document while nothing is selected (`scope:
|
||||
"selection"|"document"` picks one). Locked and hidden objects, and the insides of live or generated art (blends,
|
||||
envelopes, graphs, symbols), are left out.
|
||||
|
||||
- `addon.cleanup.check {scope?, kinds?}` changes nothing and lists `findings`: for each kind found, its `count`, the
|
||||
`ids` of the objects it is on (at most 1,000) and, for empty artboards, their indexes.
|
||||
- `addon.cleanup.show {kind, scope?}` selects the objects with that issue.
|
||||
- `addon.cleanup.fix {scope?, kinds?}` fixes the issues as one undo step and reports how many of each kind it fixed.
|
||||
The kinds run in a fixed order, so art removed by one kind can leave a group that a later kind unwraps, and they
|
||||
run again (three rounds at most) while a round still fixes something.
|
||||
|
||||
| Kind | Finds | Fix |
|
||||
|---|---|---|
|
||||
| `emptyText` | Text with no characters, or only spaces | Removes it |
|
||||
| `strayPoints` | Paths of one anchor (not clipping paths) | Removes them |
|
||||
| `unpainted` | Paths and compound paths with no fill and no stroke | Removes them |
|
||||
| `zeroOpacity` | Objects at 0 % opacity | Removes them |
|
||||
| `duplicateObjects` | A path stacked directly on an identical one (geometry, paint, opacity) | Removes the upper one |
|
||||
| `offArtboard` | Top-level objects that touch no artboard | Removes them |
|
||||
| `duplicateAnchors` | Neighbouring anchors within 0.01 pt | Merges them |
|
||||
| `tinyHandles` | Handles shorter than 0.01 pt | Retracts them |
|
||||
| `collinearAnchors` | Corner anchors on a straight run (turning by a sine of 0.005 or less) | Removes them |
|
||||
| `nearPoints` | Anchors within 0.01 pt of anchors of other paths | Snaps them together |
|
||||
| `nearlyClosed` | Open paths whose ends lie within 0.01 pt | Closes them |
|
||||
| `filledOpenPaths` | Open paths with a fill and no stroke | Closes them |
|
||||
| `needlessClipGroups` | Clipping groups whose unpainted clip clips nothing, hides all their art, or is a rectangle round all of it | Removes the group (and the art it hides), or leaves the art |
|
||||
| `needlessCompounds` | Compound paths of one path or none | Leaves the path, painted as the compound was |
|
||||
| `needlessGroups` | Groups of one member or none, with no paint, effects or transparency of their own | Leaves the member |
|
||||
| `emptyArtboards` | Artboards with no art (document scope only; one artboard always stays) | Deletes them |
|
||||
|
||||
`addon.cleanup.deepUngroup {includeClipGroups?, ids?}` takes apart every level of grouping in the selection. Clipping
|
||||
groups stay whole unless `includeClipGroups` is true; their clipping paths then become plain paths. Objects keep the
|
||||
opacity of the groups they were in.
|
||||
|
||||
`addon.cleanup.rejoin {gap?, ids?}` welds the selected open paths whose ends lie within `gap` (0 to 6 pt, 0.1 by
|
||||
default) back into paths. Each end joins one other end: where several are in reach, the one the path turns least to go
|
||||
on into. Pieces may run either way, and a chain whose ends meet closes. Each new path takes the place and paint of its
|
||||
topmost piece.
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"addon.cleanup.check","params":{"scope":"document"}}}
|
||||
{"name":"run_command","arguments":{"command":"addon.cleanup.fix","params":{"kinds":["strayPoints","needlessGroups"]}}}
|
||||
{"name":"run_command","arguments":{"command":"addon.cleanup.simplify","params":{"tolerance":40,"protectCorners":true}}}
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Parity with Adobe Illustrator
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-30 · **Change:** minor (Hardware: a second finger cancels the tool press the first finger began, so a pinch only navigates (#4198); scores unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026)
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-30 · **Change:** minor (Artwork Cleanup, a built-in add-on beyond Illustrator; scores unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026)
|
||||
|
||||
## Feature submission evidence
|
||||
|
||||
@@ -1206,10 +1206,21 @@ applies to fills). Tests: `color::gradient::tests` (perceptual midpoint, expansi
|
||||
`pdf::tests::dithered_perceptual_gradients_export_as_images_with_noise_on_the_fill` and the Gradient panel's
|
||||
`the_method_menu_makes_the_gradient_perceptual`. Scores and hours unchanged.
|
||||
|
||||
## Artwork Cleanup add-on (2026-10-30)
|
||||
|
||||
A VectorCraft addition, not an Illustrator feature, so no area score moves. Object › Plug-ins › Artwork Cleanup and its
|
||||
panel run `addon.cleanup.*`: Simplify Anchors (Keep Shape) on the shared kernel
|
||||
`vectorcraft_pathops::addons::keep_shape`, a health check of 16 kinds of issue on the selection or the document with
|
||||
Show, Fix Selected and Fix All (each one undo step), Deep Ungroup and Rejoin Path Pieces. Tests: `addons::` in
|
||||
`vectorcraft-pathops`, `cmd::addons::cleanup::tests` in `vectorcraft-engine` (each kind found, fixed and clean art left
|
||||
alone; Fix All as one step; scopes; rejoin within the gap only) and `addons::cleanup::tests` in `vectorcraft-ui-egui`
|
||||
(the submenu opens the panel; Check lists what it finds). Commands: `docs/mcp.md` › Artwork Cleanup add-on.
|
||||
|
||||
## Revision history
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-30 | minor | Artwork Cleanup add-on (a VectorCraft addition): evidence added; scores unchanged. |
|
||||
| 2026-10-30 | minor | Hardware: a second finger cancels the tool press the first finger began, and a finger landing while another is down presses nothing, so a pinch only navigates (#4198); evidence added; scores unchanged (estimated). |
|
||||
| 2026-10-30 | minor | File formats: SVG export writes axis-aligned rectangles as `<rect>`, circles and ellipses as `<circle>`/`<ellipse>`, straight lines as `<line>` and other straight-segment paths as `<polygon>`/`<polyline>`, keeping `<path>` where a shape element would draw differently (#4652); evidence added; scores and hours unchanged (estimated). |
|
||||
| 2026-10-30 | minor | UI chrome: with Preferences › Performance › Real-time Drawing and Editing off, a ruler guide dragged out of a ruler or moved shows while it is dragged (#4646); evidence added; score and hours unchanged (estimated). |
|
||||
|
||||
+3
-1
@@ -1,6 +1,6 @@
|
||||
# UI and interaction parity
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-30 · **Change:** minor (Spinners: a held arrow repeats after a pause (#4267); scores unchanged) · **Target:** Adobe Illustrator 2026 (30.x)
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-30 · **Change:** minor (Artwork Cleanup add-on: its panel and Object › Plug-ins submenu; scores unchanged) · **Target:** Adobe Illustrator 2026 (30.x)
|
||||
|
||||
## Feature submission evidence
|
||||
|
||||
@@ -321,6 +321,7 @@ next unit in the order a right-click on a ruler lists them, from Feet back to Po
|
||||
| Preferences › General › Constrain Angle | done | arrow keys and Shift drags along the turned axes; the Rectangle, Rounded Rectangle, Ellipse and grid tools, point and area type and the shape size dialogs draw along them with the bounding box turned; Shift-drawn polygons and stars keep the turned base orientation; the Line Segment tool's Shift steps count from it (#394, <https://helpx.adobe.com/illustrator/desktop/manage-objects/arrange-objects/rotate-objects-by-specific-angles.html>); arcs, spirals, flares and Pen paths are not turned |
|
||||
| Tabs panel: a stop drags from where the press landed, a stop just added included | done | #1458 |
|
||||
| Outline view keeps template layers in Preview, dimmed | done | #1486; a picture placed to be traced stays visible under the outlines |
|
||||
| Artwork Cleanup add-on (VectorCraft addition): Object › Plug-ins › Artwork Cleanup opens its panel, which checks the selection or the document for 16 kinds of issue, lists them with counts, and shows or fixes the picked rows or all of them, each fix one undo step; Simplify Anchors (Keep Shape), Rejoin Path Pieces and Deep Ungroup open their options first | done | `addon.cleanup.*`, `crates/ui-egui/src/addons/cleanup.rs` and its tests; not an Illustrator feature, so it is not scored |
|
||||
|
||||
## Look and feel
|
||||
|
||||
@@ -361,6 +362,7 @@ separate. Scores and hours unchanged. [Behavior and command details](development
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-30 | minor | Artwork Cleanup add-on (a VectorCraft addition): its panel and Object › Plug-ins › Artwork Cleanup; scores and estimates unchanged |
|
||||
| 2026-10-30 | minor | Spinners: a held arrow repeats after a pause (#4267); scores and estimates unchanged |
|
||||
| 2026-10-30 | minor | Control bar: a Replace menu swaps the selected symbol instances' symbol (#4121); scores and estimates unchanged |
|
||||
| 2026-10-30 | minor | Color Mixer popover: the Color panel's menu with its color modes (#4249); scores and estimates unchanged |
|
||||
|
||||
Reference in New Issue
Block a user