mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-14 19:26:56 -04:00
#1144: Live Corners round corners between curved segments too
A corner is now any anchor that isn't smooth where two sides meet at an angle, straight or curved, as in Illustrator. The cut meets each side at its setback measured along the curve, leaves both sides along their tangents there, and each curved side is trimmed to what the cuts at its ends leave of it. The largest radius is still the one taking the cut halfway along the shorter side, measured along the curve. Corners between straight sides draw exactly as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
b08482d640
commit
fbc1c494b2
15 files changed
+208
-66
No files matched your search
+1
-1
@@ -127,7 +127,7 @@ Ranked; detail in [docs/roadmap.md](docs/roadmap.md) and [docs/gaps.md](docs/gap
|
||||
|
||||
| Date | What landed |
|
||||
|---|---|
|
||||
| 2026-10-11 | Effect › Brush Strokes: Accented Edges, Angled Strokes, Crosshatch, Dark Strokes, Ink Outlines, Spatter, Sprayed Strokes, Sumi-e (G2). Command parameters from agents and files checked before anything changes (paint, place, cuts, dashes, crop, asset ids, anchors, paths, distort; #984–#999); command dialogs keep whole numbers whole, so Create Object Mosaic takes the tiles typed (#1000); stepper arrows take Shift (×10) and Ctrl/Cmd (÷10) like the arrow keys (#991). Exports and Rasterize supersample Art Optimized edges, so shapes meeting edge to edge leave no seam (#983). Character and paragraph styles take leading, kerning, mojikumi and the other attributes left out at their defaults (#1001). Drawing, typing and pasting with no layer shown and unlocked is refused instead of adding art to a hidden or locked layer (#1002). MCP `add_text` gives type on or in a path the colour asked for (#1003). MCP `screenshot` of a connected app renders the artboard asked for (#1004). `vectorcraft-cli run` ends quietly when its reader closes early (#1005). Select › All on Active Artboard selects on the artboard made active, not always the first (#1006). Reverse Gradient keeps off-centre midpoints, mirrored (#1007). A polar grid with no radial dividers draws none (#1008). Use Precise Cursors also covers the Pen's join pointer (#1009). SVGs with one absolute and one unitless root side import at their size, unstretched (#1010). DXF US survey inches, yards and miles open at their size and name (#1011). A file placed into a document with no other links follows its first change even while the app sits idle (#1031). PDF import keeps the style a font name says when the file doesn't embed the font (#1023). Shift selects ruler guides and art together, and Delete removes both (#1022). Open filled paths are hit by their fill on every side, the rotate cursor bows around the corner it is at, the flip icons match their flips, the Color Picker previews on the selection, and Properties › Transform reaches Scale Corners and Scale Strokes & Effects (#1036). Offset Path and the other booleans finish on outlines where the sweep used to loop until memory ran out (linesweeper 0.5, #1028). Floating panel groups stack into sets that move together, collapse to their tabs and dock as extra dock columns that scroll (#1020). Ruler guides live on layers: listed in the Layers panel, shown, hidden, locked, duplicated, merged and deleted with their layer, and moved between layers (#1021). A `.ai` whose editing data uses global process colours (`Xk`/`XK`) or pattern fills keeps its sublayers: the colours come in as global swatches at their tint, the patterns as pattern swatches (#1025). A `.ai` in PostScript form opens through its layers, read from the program itself, also when it names the prolog defining its operators without including it, as Rhino and other CAD apps write it (#1027). A fill or stroke chosen while the Type tool has characters selected colours just those characters (#1063). Scaled type shows its scaled font size, leading, baseline shift and horizontal scale in the Character panel, and a size typed there is the size you get (#1034). Character panel menu › Proportional Metrics sets Japanese and Chinese full-width glyphs on the font's proportional widths in horizontal type (#966). Align, Distribute, Move, Arrange, Lock, Hide, Ungroup and other Object commands that would change nothing no longer record an undo step or mark the document changed (#1060). Spot colours defined in Lab open with their Lab values from `.ai` and PDF files, instead of as wrong RGB colours or their CMYK equivalents (#1032). Build scripts leave a generated source they wouldn't change untouched, so the next build doesn't compile most of the workspace again where file times lose their sub-second part (#1051). A fill colour recolours the gradient mesh point last clicked with the Mesh tool or Direct Selection, and a Mesh tool click on a mesh's point selects that mesh (#1052). The All Tools drawer stays two tools wide instead of filling a wide window (#1054). Text Wrap's Make, Release and Options refuse a list of object ids with a malformed or unknown id instead of skipping it (#1055). A freeform gradient line with a malformed point index is refused instead of being shortened to the indices that are valid (#1056). The Corners dialog (`ui.corners`) refuses a malformed object id or a listed anchor that isn't a corner instead of editing the selection or the other corners (#1057). New View refuses a centre that isn't exactly [x, y] and a rotation that isn't a number, instead of trimming the one and saving the other as 0° (#1058). The command sweeps try junk scale, spacing and artboard values too, which they had skipped since before those bugs were fixed (#1059). EPS and PostScript `arc` and `arcn` with huge angles no longer hang the import, and an arc whose angles are whole turns apart is empty, as the PostScript reference defines it (#1062). Align and DisLine truncated
|
||||
| 2026-10-11 | Effect › Brush Strokes: Accented Edges, Angled Strokes, Crosshatch, Dark Strokes, Ink Outlines, Spatter, Sprayed Strokes, Sumi-e (G2). Command parameters from agents and files checked before anything changes (paint, place, cuts, dashes, crop, asset ids, anchors, paths, distort; #984–#999); command dialogs keep whole numbers whole, so Create Object Mosaic takes the tiles typed (#1000); stepper arrows take Shift (×10) and Ctrl/Cmd (÷10) like the arrow keys (#991). Exports and Rasterize supersample Art Optimized edges, so shapes meeting edge to edge leave no seam (#983). Character and paragraph styles take leading, kerning, mojikumi and the other attributes left out at their defaults (#1001). Drawing, typing and pasting with no layer shown and unlocked is refused instead of adding art to a hidden or locked layer (#1002). MCP `add_text` gives type on or in a path the colour asked for (#1003). MCP `screenshot` of a connected app renders the artboard asked for (#1004). `vectorcraft-cli run` ends quietly when its reader closes early (#1005). Select › All on Active Artboard selects on the artboard made active, not always the first (#1006). Reverse Gradient keeps off-centre midpoints, mirrored (#1007). A polar grid with no radial dividers draws none (#1008). Use Precise Cursors also covers the Pen's join pointer (#1009). SVGs with one absolute and one unitless root side import at their size, unstretched (#1010). DXF US survey inches, yards and miles open at their size and name (#1011). A file placed into a document with no other links follows its first change even while the app sits idle (#1031). PDF import keeps the style a font name says when the file doesn't embed the font (#1023). Shift selects ruler guides and art together, and Delete removes both (#1022). Open filled paths are hit by their fill on every side, the rotate cursor bows around the corner it is at, the flip icons match their flips, the Color Picker previews on the selection, and Properties › Transform reaches Scale Corners and Scale Strokes & Effects (#1036). Offset Path and the other booleans finish on outlines where the sweep used to loop until memory ran out (linesweeper 0.5, #1028). Floating panel groups stack into sets that move together, collapse to their tabs and dock as extra dock columns that scroll (#1020). Ruler guides live on layers: listed in the Layers panel, shown, hidden, locked, duplicated, merged and deleted with their layer, and moved between layers (#1021). A `.ai` whose editing data uses global process colours (`Xk`/`XK`) or pattern fills keeps its sublayers: the colours come in as global swatches at their tint, the patterns as pattern swatches (#1025). A `.ai` in PostScript form opens through its layers, read from the program itself, also when it names the prolog defining its operators without including it, as Rhino and other CAD apps write it (#1027). A fill or stroke chosen while the Type tool has characters selected colours just those characters (#1063). Scaled type shows its scaled font size, leading, baseline shift and horizontal scale in the Character panel, and a size typed there is the size you get (#1034). Character panel menu › Proportional Metrics sets Japanese and Chinese full-width glyphs on the font's proportional widths in horizontal type (#966). Align, Distribute, Move, Arrange, Lock, Hide, Ungroup and other Object commands that would change nothing no longer record an undo step or mark the document changed (#1060). Spot colours defined in Lab open with their Lab values from `.ai` and PDF files, instead of as wrong RGB colours or their CMYK equivalents (#1032). Build scripts leave a generated source they wouldn't change untouched, so the next build doesn't compile most of the workspace again where file times lose their sub-second part (#1051). A fill colour recolours the gradient mesh point last clicked with the Mesh tool or Direct Selection, and a Mesh tool click on a mesh's point selects that mesh (#1052). The All Tools drawer stays two tools wide instead of filling a wide window (#1054). Text Wrap's Make, Release and Options refuse a list of object ids with a malformed or unknown id instead of skipping it (#1055). A freeform gradient line with a malformed point index is refused instead of being shortened to the indices that are valid (#1056). The Corners dialog (`ui.corners`) refuses a malformed object id or a listed anchor that isn't a corner instead of editing the selection or the other corners (#1057). New View refuses a centre that isn't exactly [x, y] and a rotation that isn't a number, instead of trimming the one and saving the other as 0° (#1058). The command sweeps try junk scale, spacing and artboard values too, which they had skipped since before those bugs were fixed (#1059). EPS and PostScript `arc` and `arcn` with huge angles no longer hang the import, and an arc whose angles are whole turns apart is empty, as the PostScript reference defines it (#1062). Align and DisLine truncated
|
||||
| 2026-10-10 | Initial live Revolve (Effect › 3D and Materials, #846, #605), in its own `three-d` crate. Progress docs re-measured and restructured to the craftrules standard (this page, `docs/target-app-parity.md`, `gaps.md`, `ui-parity.md`, the format, hardware, localization, effects and type checklists). Same day: v0.8.0; Effect › Distort, Pixelate and Texture filters (13); German interface; Variables (data merge); Graph Type value axes and tick marks; restart when the first frame never reaches the screen (#964) |
|
||||
| 2026-10-09 | Radial Blur, Smart Blur, Unsharp Mask (gap 2 begins); 340 commits, the busiest day |
|
||||
| 2026-10-08 | v0.5.0–v0.7.0; community contributions: Pen and shape-tool modifiers, Layers, Artboards, Japanese composition, Hebrew/Arabic type, interface languages, saved selections |
|
||||
|
||||
@@ -196,7 +196,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Live Shape Properties",
|
||||
[],
|
||||
None,
|
||||
"{id?, ids?, radius?: pt, kind?: \"round\"|\"invertedRound\"|\"chamfer\", corners?: [i…], items?: [{id, corners?: [i…]}] (several objects, each with its own corners, in place of ids and corners: the canvas's corner widgets across a selection), sides?: n, polygonAngle?: degrees (counterclockwise from its first vertex straight up), polygonRadius?: pt (centre to vertex), sideLength?: pt (sets the radius), makeSidesEqual?: true (a polygon scaled unevenly: drops the uneven scale and shear, keeping its centre, angle and mean radius), pieStart?, pieEnd?: degrees (an ellipse's pie, counterclockwise from 3 o'clock; 0 to 360 is the whole ellipse), invertPie?: true (swaps them: the other part of the ellipse)} (Live Corners on any path: radius and kind set its corners (anchors without handles between two straight sides): `corners` (anchor indices of the path with its corners uncut, counting every subpath's anchors in order: a rectangle's 0 top-left, 1 top-right, 2 bottom-right, 3 bottom-left; a polygon's from the first vertex clockwise), else the corners with a Direct-Selected anchor, else every corner; each radius is drawn no larger than half the corner's shorter side allows; a path that isn't a live shape keeps its uncut outline so its corners stay editable, and is plain again once none is cut; sides: a polygon's, which keep the radius they shared; the polygon params apply in that order: sides, makeSidesEqual, polygonAngle, then sideLength or else polygonRadius)",
|
||||
"{id?, ids?, radius?: pt, kind?: \"round\"|\"invertedRound\"|\"chamfer\", corners?: [i…], items?: [{id, corners?: [i…]}] (several objects, each with its own corners, in place of ids and corners: the canvas's corner widgets across a selection), sides?: n, polygonAngle?: degrees (counterclockwise from its first vertex straight up), polygonRadius?: pt (centre to vertex), sideLength?: pt (sets the radius), makeSidesEqual?: true (a polygon scaled unevenly: drops the uneven scale and shear, keeping its centre, angle and mean radius), pieStart?, pieEnd?: degrees (an ellipse's pie, counterclockwise from 3 o'clock; 0 to 360 is the whole ellipse), invertPie?: true (swaps them: the other part of the ellipse)} (Live Corners on any path: radius and kind set its corners (anchors that aren't smooth, where two sides, straight or curved (#1144), meet at an angle): `corners` (anchor indices of the path with its corners uncut, counting every subpath's anchors in order: a rectangle's 0 top-left, 1 top-right, 2 bottom-right, 3 bottom-left; a polygon's from the first vertex clockwise), else the corners with a Direct-Selected anchor, else every corner; each radius is drawn no larger than half the corner's shorter side allows; a path that isn't a live shape keeps its uncut outline so its corners stay editable, and is plain again once none is cut; sides: a polygon's, which keep the radius they shared; the polygon params apply in that order: sides, makeSidesEqual, polygonAngle, then sideLength or else polygonRadius)",
|
||||
has_selection,
|
||||
set_live_shape
|
||||
),
|
||||
|
||||
+183
-44
@@ -1,7 +1,8 @@
|
||||
//! Live Corners on any path: the anchors where two straight sides meet at an angle, and the path
|
||||
//! with those corners cut round, inverted round or chamfered. Rectangles cut theirs the same way.
|
||||
//! Live Corners on any path: the anchors where two sides, straight or curved, meet at an angle,
|
||||
//! and the path with those corners cut round, inverted round or chamfered (a curved side trimmed
|
||||
//! to what the cut leaves of it). Rectangles cut theirs the same way.
|
||||
|
||||
use kurbo::{Point, Vec2};
|
||||
use kurbo::{CubicBez, ParamCurve, ParamCurveArclen, ParamCurveDeriv, Point, Vec2};
|
||||
|
||||
use crate::path::{Anchor, AnchorKind, PathData, SubPath};
|
||||
use crate::shapes::{CornerKind, KAPPA};
|
||||
@@ -11,39 +12,91 @@ const EPS: f64 = 1e-9;
|
||||
/// Sides closer than this to straight on (or folded back), as the sine of their angle, make no corner.
|
||||
const MIN_SINE: f64 = 1e-6;
|
||||
|
||||
/// A corner Live Corners can cut: an anchor without handles between two straight sides that
|
||||
/// meet at an angle.
|
||||
/// How closely arc lengths along curved sides are measured (points).
|
||||
const ARCLEN_ACCURACY: f64 = 1e-6;
|
||||
|
||||
/// A side of a corner: the segment from the corner's anchor to its neighbour, as a cubic leaving
|
||||
/// the corner (a straight side has its handles at its ends).
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub struct Side {
|
||||
pub curve: CubicBez,
|
||||
}
|
||||
|
||||
impl Side {
|
||||
/// Is the side straight, its handles on its ends?
|
||||
fn straight(&self) -> bool {
|
||||
self.curve.p1.distance(self.curve.p0) <= EPS && self.curve.p2.distance(self.curve.p3) <= EPS
|
||||
}
|
||||
|
||||
/// The unit direction the side leaves the corner in: towards its first control point not on
|
||||
/// the corner. `None` when the side has no length.
|
||||
fn direction(&self) -> Option<Vec2> {
|
||||
let c = self.curve;
|
||||
let d = [c.p1, c.p2, c.p3].into_iter().map(|q| q - c.p0).find(|d| d.hypot() > EPS)?;
|
||||
let d = d / d.hypot();
|
||||
d.x.is_finite().then_some(d)
|
||||
}
|
||||
|
||||
/// The side's length.
|
||||
fn length(&self) -> f64 {
|
||||
if self.straight() { self.curve.p0.distance(self.curve.p3) } else { self.curve.arclen(ARCLEN_ACCURACY) }
|
||||
}
|
||||
|
||||
/// The parameter `s` along the side from the corner, the point there and the direction the
|
||||
/// side runs on in (away from the corner).
|
||||
fn at_length(&self, s: f64, u: Vec2) -> (f64, Point, Vec2) {
|
||||
let c = self.curve;
|
||||
if self.straight() {
|
||||
let len = c.p0.distance(c.p3);
|
||||
let t = if len > EPS { (s / len).clamp(0.0, 1.0) } else { 0.0 };
|
||||
return (t, c.p0 + u * s, u);
|
||||
}
|
||||
let t = c.inv_arclen(s, ARCLEN_ACCURACY).clamp(0.0, 1.0);
|
||||
let d = c.deriv().eval(t).to_vec2();
|
||||
let dir = if d.hypot() > EPS { d / d.hypot() } else { u };
|
||||
(t, c.eval(t), dir)
|
||||
}
|
||||
}
|
||||
|
||||
/// A corner Live Corners can cut: an anchor that isn't smooth, where two sides (straight or
|
||||
/// curved) meet at an angle (#1144).
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub struct Corner {
|
||||
/// The anchor's index in its path, counting the anchors of every subpath in order.
|
||||
pub index: usize,
|
||||
/// Where the sides meet.
|
||||
pub at: Point,
|
||||
/// Unit directions along the sides: towards the previous anchor, then towards the next one.
|
||||
/// Unit directions the sides leave the corner in: towards the previous anchor, then towards
|
||||
/// the next one.
|
||||
pub u: Vec2,
|
||||
pub v: Vec2,
|
||||
/// The sides' lengths, in the same order.
|
||||
/// The sides' lengths (along curves), in the same order.
|
||||
pub lu: f64,
|
||||
pub lv: f64,
|
||||
/// The sides themselves, leaving the corner, in the same order.
|
||||
pub side_u: Side,
|
||||
pub side_v: Side,
|
||||
}
|
||||
|
||||
impl Corner {
|
||||
/// The corner of anchor `i` of `sp`, whose index in the path is `index`; `None` when the
|
||||
/// anchor is an end of an open subpath, has handles or is smooth, when a side curves or has
|
||||
/// no length, or when the sides run straight on.
|
||||
/// anchor is an end of an open subpath or is smooth, when a side has no length, or when the
|
||||
/// sides leave it straight on.
|
||||
fn of(sp: &SubPath, i: usize, index: usize) -> Option<Self> {
|
||||
let n = sp.anchors.len();
|
||||
let (prev, next) = if sp.closed { ((i + n).checked_sub(1)? % n, (i + 1) % n) } else { (i.checked_sub(1)?, i + 1) };
|
||||
let (a, prev, next) = (sp.anchors.get(i)?, sp.anchors.get(prev)?, sp.anchors.get(next)?);
|
||||
if a.kind == AnchorKind::Smooth || a.has_in() || a.has_out() || prev.has_out() || next.has_in() {
|
||||
if a.kind == AnchorKind::Smooth {
|
||||
return None;
|
||||
}
|
||||
let (du, dv) = (prev.p - a.p, next.p - a.p);
|
||||
let (lu, lv) = (du.hypot(), dv.hypot());
|
||||
let side_u = Side { curve: CubicBez::new(a.p, a.h_in, prev.h_out, prev.p) };
|
||||
let side_v = Side { curve: CubicBez::new(a.p, a.h_out, next.h_in, next.p) };
|
||||
let (u, v) = (side_u.direction()?, side_v.direction()?);
|
||||
let (lu, lv) = (side_u.length(), side_v.length());
|
||||
if !(lu > EPS && lv > EPS && lu.is_finite() && lv.is_finite()) {
|
||||
return None;
|
||||
}
|
||||
let c = Self { index, at: a.p, u: du / lu, v: dv / lv, lu, lv };
|
||||
let c = Self { index, at: a.p, u, v, lu, lv, side_u, side_v };
|
||||
(c.sin() > MIN_SINE).then_some(c)
|
||||
}
|
||||
|
||||
@@ -92,32 +145,47 @@ impl Corner {
|
||||
d.dot(self.u + self.v) * self.sin() / (2.0 + 2.0 * self.cos())
|
||||
}
|
||||
|
||||
/// The two anchors replacing the corner when cut with `radius` (> 0, fitted): where the cut
|
||||
/// meets the arriving side, then the leaving one.
|
||||
fn cut(&self, radius: f64, kind: CornerKind) -> [Anchor; 2] {
|
||||
let t = self.setback(radius);
|
||||
let (start, end) = (self.at + self.u * t, self.at + self.v * t);
|
||||
/// The cut of radius `radius` (> 0, fitted): where it meets each side, `setback` along it,
|
||||
/// and the cut's own curve between them, its handles leaving the sides smoothly.
|
||||
fn cut(&self, radius: f64, kind: CornerKind) -> Cut {
|
||||
let s = self.setback(radius);
|
||||
let (tu, start, du) = self.side_u.at_length(s, self.u);
|
||||
let (tv, end, dv) = self.side_v.at_length(s, self.v);
|
||||
let cos = du.dot(dv);
|
||||
let (h_out, h_in) = match kind {
|
||||
// An arc of `radius` tangent to both sides, turning by 180° less the angle.
|
||||
// An arc tangent to both sides, turning by 180° less the angle between them there.
|
||||
CornerKind::Round => {
|
||||
let h = radius * arc_handle(-self.cos());
|
||||
(start - self.u * h, end - self.v * h)
|
||||
let h = radius * arc_handle(-cos);
|
||||
(start - du * h, end - dv * h)
|
||||
}
|
||||
// An arc centred on the corner through both ends, spanning the angle.
|
||||
CornerKind::InvertedRound => {
|
||||
let h = t * arc_handle(self.cos());
|
||||
(start + square_to(self.u, self.v) * h, end + square_to(self.v, self.u) * h)
|
||||
let h = s * arc_handle(cos);
|
||||
(start + square_to(du, dv) * h, end + square_to(dv, du) * h)
|
||||
}
|
||||
CornerKind::Chamfer => (start, end),
|
||||
};
|
||||
[Anchor { p: start, h_in: start, h_out, kind: AnchorKind::Corner }, Anchor { p: end, h_in, h_out: end, kind: AnchorKind::Corner }]
|
||||
Cut { tu, tv, start, h_out, h_in, end }
|
||||
}
|
||||
}
|
||||
|
||||
/// A corner cut: the parameters where it meets its sides (from the corner), its two new anchors
|
||||
/// and the handles between them.
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
struct Cut {
|
||||
tu: f64,
|
||||
tv: f64,
|
||||
start: Point,
|
||||
h_out: Point,
|
||||
h_in: Point,
|
||||
end: Point,
|
||||
}
|
||||
|
||||
/// The unit direction square to unit `a`, on `b`'s side.
|
||||
fn square_to(a: Vec2, b: Vec2) -> Vec2 {
|
||||
let w = b - a * a.dot(b);
|
||||
w / w.hypot()
|
||||
let l = w.hypot();
|
||||
if l > EPS { w / l } else { Vec2::ZERO }
|
||||
}
|
||||
|
||||
/// The handle length, per unit of radius, of a cubic drawing a circular arc that spans an angle
|
||||
@@ -126,6 +194,7 @@ fn arc_handle(cos: f64) -> f64 {
|
||||
if cos.abs() < 1e-12 {
|
||||
return KAPPA;
|
||||
}
|
||||
let cos = cos.clamp(-1.0, 1.0);
|
||||
let (sin_half, cos_half) = (((1.0 - cos) / 2.0).max(0.0).sqrt(), ((1.0 + cos) / 2.0).max(0.0).sqrt());
|
||||
4.0 / 3.0 * sin_half / (1.0 + cos_half)
|
||||
}
|
||||
@@ -143,24 +212,55 @@ pub fn path_corners(path: &PathData) -> Vec<Corner> {
|
||||
|
||||
/// `path` with each of its corners ([`path_corners`]) cut by the radius in `radii` and the kind in
|
||||
/// `kinds` at its anchor index (missing: 0 and round), each radius no larger than fits
|
||||
/// ([`Corner::fitted`]). A cut corner becomes two anchors; a closed subpath whose first corner
|
||||
/// is cut starts where that cut ends, so the cut closes it. Also returns, per subpath, the
|
||||
/// anchor index in `path` each anchor comes from.
|
||||
/// ([`Corner::fitted`]). A cut corner becomes two anchors, and a curved side between corners is
|
||||
/// trimmed to what is left of it; a closed subpath whose first corner is cut starts where that
|
||||
/// cut ends, so the cut closes it. Also returns, per subpath, the anchor index in `path` each
|
||||
/// anchor comes from.
|
||||
pub fn cut_corners(path: &PathData, radii: &[f64], kinds: &[CornerKind]) -> (PathData, Vec<Vec<usize>>) {
|
||||
let corners = path_corners(path);
|
||||
let mut corners = corners.iter().peekable();
|
||||
let (mut subpaths, mut sources) = (Vec::with_capacity(path.subpaths.len()), Vec::with_capacity(path.subpaths.len()));
|
||||
let mut first = 0;
|
||||
for sp in &path.subpaths {
|
||||
let (mut anchors, mut from) = (Vec::with_capacity(sp.anchors.len()), Vec::with_capacity(sp.anchors.len()));
|
||||
let n = sp.anchors.len();
|
||||
// The cut of each anchor, if any.
|
||||
let cuts: Vec<Option<Cut>> = (0..n)
|
||||
.map(|i| {
|
||||
let index = first + i;
|
||||
let c = corners.next_if(|c| c.index == index)?;
|
||||
let radius = c.fitted(radii.get(index).copied().unwrap_or(0.0));
|
||||
(radius > EPS).then(|| c.cut(radius, kinds.get(index).copied().unwrap_or_default()))
|
||||
})
|
||||
.collect();
|
||||
// Each segment from anchor j, trimmed to the part the cuts at its ends leave: its handles
|
||||
// (out of its first anchor, into its last), `None` when it is untouched.
|
||||
let trimmed: Vec<Option<(Point, Point)>> = (0..n)
|
||||
.map(|j| {
|
||||
let k = (j + 1) % n;
|
||||
let (a, b) = (sp.anchors.get(j)?, sp.anchors.get(k)?);
|
||||
let (from, to) = (cuts.get(j).copied().flatten(), cuts.get(k).copied().flatten());
|
||||
if (from.is_none() && to.is_none()) || (k == 0 && !sp.closed) {
|
||||
return None;
|
||||
}
|
||||
// A straight segment stays straight, its handles on its ends.
|
||||
if !a.has_out() && !b.has_in() {
|
||||
return Some((from.map_or(a.p, |c| c.end), to.map_or(b.p, |c| c.start)));
|
||||
}
|
||||
let (s0, s1) = (from.map_or(0.0, |c| c.tv), to.map_or(1.0, |c| 1.0 - c.tu));
|
||||
let sub = CubicBez::new(a.p, a.h_out, b.h_in, b.p).subsegment(s0..s1.max(s0));
|
||||
Some((sub.p1, sub.p2))
|
||||
})
|
||||
.collect();
|
||||
let (mut anchors, mut from) = (Vec::with_capacity(n), Vec::with_capacity(n));
|
||||
let mut closing = None;
|
||||
for (i, a) in sp.anchors.iter().enumerate() {
|
||||
let index = first + i;
|
||||
let corner = corners.next_if(|c| c.index == index);
|
||||
let radius = corner.map_or(0.0, |c| c.fitted(radii.get(index).copied().unwrap_or(0.0)));
|
||||
match corner {
|
||||
Some(c) if radius > EPS => {
|
||||
let [start, end] = c.cut(radius, kinds.get(index).copied().unwrap_or_default());
|
||||
let h_in = trimmed.get((i + n - 1) % n).copied().flatten().map_or(a.h_in, |(_, h)| h);
|
||||
let h_out = trimmed.get(i).copied().flatten().map_or(a.h_out, |(h, _)| h);
|
||||
match cuts.get(i).copied().flatten() {
|
||||
Some(c) => {
|
||||
let start = Anchor { p: c.start, h_in, h_out: c.h_out, kind: AnchorKind::Corner };
|
||||
let end = Anchor { p: c.end, h_in: c.h_in, h_out, kind: AnchorKind::Corner };
|
||||
if i == 0 && sp.closed {
|
||||
closing = Some(start);
|
||||
} else {
|
||||
@@ -170,8 +270,8 @@ pub fn cut_corners(path: &PathData, radii: &[f64], kinds: &[CornerKind]) -> (Pat
|
||||
anchors.push(end);
|
||||
from.push(index);
|
||||
}
|
||||
_ => {
|
||||
anchors.push(*a);
|
||||
None => {
|
||||
anchors.push(Anchor { h_in, h_out, ..*a });
|
||||
from.push(index);
|
||||
}
|
||||
}
|
||||
@@ -180,7 +280,7 @@ pub fn cut_corners(path: &PathData, radii: &[f64], kinds: &[CornerKind]) -> (Pat
|
||||
anchors.push(a);
|
||||
from.push(first);
|
||||
}
|
||||
first += sp.anchors.len();
|
||||
first += n;
|
||||
subpaths.push(SubPath::new(anchors, sp.closed));
|
||||
sources.push(from);
|
||||
}
|
||||
@@ -246,11 +346,7 @@ mod tests {
|
||||
false,
|
||||
));
|
||||
assert_eq!(path_corners(&open).iter().map(|c| c.index).collect::<Vec<_>>(), [2, 3]);
|
||||
// A curve on either side, or handles on the anchor, leave it alone.
|
||||
let mut sp = SubPath::polyline(&[Point::new(0.0, 0.0), Point::new(100.0, 0.0), Point::new(100.0, 100.0), Point::new(0.0, 100.0)], true);
|
||||
sp.anchors[1].h_out = Point::new(110.0, 10.0);
|
||||
let p = PathData::single(sp);
|
||||
assert_eq!(path_corners(&p).iter().map(|c| c.index).collect::<Vec<_>>(), [0, 3]);
|
||||
// Smooth anchors aren't corners.
|
||||
assert!(path_corners(&shapes::ellipse(Rect::new(0.0, 0.0, 10.0, 10.0))).is_empty());
|
||||
// A second subpath counts on from the first one's anchors.
|
||||
let two = PathData::new(vec![
|
||||
@@ -262,6 +358,49 @@ mod tests {
|
||||
assert_eq!(cut.anchor_count(), 7);
|
||||
}
|
||||
|
||||
/// The square `0..100` with its right side bulging out as a curve (#1144).
|
||||
fn bulging_square() -> PathData {
|
||||
let mut sp = SubPath::polyline(&[Point::new(0.0, 0.0), Point::new(100.0, 0.0), Point::new(100.0, 100.0), Point::new(0.0, 100.0)], true);
|
||||
sp.anchors[1].h_out = Point::new(140.0, 30.0);
|
||||
sp.anchors[2].h_in = Point::new(140.0, 70.0);
|
||||
PathData::single(sp)
|
||||
}
|
||||
|
||||
/// Corners where a curve meets a line are cut too: the cut ends on the path, leaves both
|
||||
/// sides smoothly, and what is left of the curve still follows it (#1144).
|
||||
#[test]
|
||||
fn corners_next_to_curves_are_cut_along_them() {
|
||||
let path = bulging_square();
|
||||
let corners = path_corners(&path);
|
||||
assert_eq!(corners.iter().map(|c| c.index).collect::<Vec<_>>(), [0, 1, 2, 3]);
|
||||
let side = kurbo::CubicBez::new(Point::new(100.0, 0.0), Point::new(140.0, 30.0), Point::new(140.0, 70.0), Point::new(100.0, 100.0));
|
||||
// The curved side is longer than its chord, and limits its corners by its length.
|
||||
assert!(corners[1].lv > 100.0 + 1.0);
|
||||
let (cut, from) = cut_corners(&path, &[10.0; 4], &[]);
|
||||
assert_eq!(from, [vec![0, 1, 1, 2, 2, 3, 3, 0]]);
|
||||
let sp = &cut.subpaths[0];
|
||||
let on_side = |p: Point| (0..=1000).map(|i| side.eval(f64::from(i) / 1000.0).distance(p)).fold(f64::MAX, f64::min);
|
||||
// Corner 1's cut ends on the curve and corner 2's starts on it, and the trimmed curve
|
||||
// between them stays on the original one.
|
||||
let (a, b) = (sp.anchors[2], sp.anchors[3]);
|
||||
assert!(on_side(a.p) < 0.1 && on_side(b.p) < 0.1);
|
||||
let trimmed = kurbo::CubicBez::new(a.p, a.h_out, b.h_in, b.p);
|
||||
for t in [0.25, 0.5, 0.75] {
|
||||
assert!(on_side(trimmed.eval(t)) < 0.1);
|
||||
}
|
||||
// Every cut leaves its sides smoothly: each anchor's handles are in line.
|
||||
for (i, x) in sp.anchors.iter().enumerate() {
|
||||
let (into, out) = if x.has_in() && x.has_out() {
|
||||
(x.p - x.h_in, x.h_out - x.p)
|
||||
} else if x.has_out() {
|
||||
(x.p - sp.anchors[(i + sp.anchors.len() - 1) % sp.anchors.len()].p, x.h_out - x.p)
|
||||
} else {
|
||||
(x.h_in - x.p, x.p - sp.anchors[(i + 1) % sp.anchors.len()].p)
|
||||
};
|
||||
assert!(into.normalize().cross(out.normalize()).abs() < 1e-6 && into.dot(out) > 0.0, "anchor {i}");
|
||||
}
|
||||
}
|
||||
|
||||
/// Inverted round and chamfer cuts end where the round one does, at any angle.
|
||||
#[test]
|
||||
fn kinds_share_their_ends() {
|
||||
@@ -272,8 +411,8 @@ mod tests {
|
||||
assert_eq!(ends(CornerKind::Chamfer), round);
|
||||
// The inverted arc stays on the circle about the corner.
|
||||
let c = path_corners(&star)[0];
|
||||
let [s, e] = c.cut(3.0, CornerKind::InvertedRound);
|
||||
let bez = kurbo::CubicBez::new(s.p, s.h_out, e.h_in, e.p);
|
||||
let cut = c.cut(3.0, CornerKind::InvertedRound);
|
||||
let bez = kurbo::CubicBez::new(cut.start, cut.h_out, cut.h_in, cut.end);
|
||||
let r = c.setback(3.0);
|
||||
for t in [0.25, 0.5, 0.75] {
|
||||
use kurbo::ParamCurve;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Live Corners: the widgets inside the corners of the selected paths. The Selection tool shows
|
||||
//! them on live rectangles and polygons, Direct Selection on any path (a star, a pen path) at each
|
||||
//! corner anchor: one without handles between two straight sides. Dragging one rounds (or
|
||||
//! corner anchor: one that isn't smooth, where two sides, straight or curved, meet at an angle. Dragging one rounds (or
|
||||
//! sharpens) the corners whose widgets show together, on every selected path (#938): every corner
|
||||
//! of a path selected whole, those with a selected anchor when Direct Selection picked some. Alt-clicking a widget cycles their corner
|
||||
//! kind (round, inverted round, chamfer); double-clicking one opens the Corners dialog. The
|
||||
@@ -701,7 +701,7 @@ mod tests {
|
||||
assert!(red, "six arcs at the limit");
|
||||
}
|
||||
|
||||
/// A pen path's middle corner shows a widget; its ends and curved corners don't.
|
||||
/// A pen path's corners show widgets, curved ones too (#1144); its ends don't.
|
||||
#[test]
|
||||
fn a_pen_path_shows_widgets_on_its_corners_only() {
|
||||
let mut sp = vectorcraft_geom::SubPath::polyline(
|
||||
@@ -713,7 +713,7 @@ mod tests {
|
||||
let s = selected(id);
|
||||
let p = paint();
|
||||
let w = CornerWidgets::for_tool(&cx(&d, &s, &p), true).unwrap();
|
||||
assert_eq!(w.corners(), [1]);
|
||||
assert_eq!(pts(&w), [Point::new(290.0, 110.0)]);
|
||||
assert_eq!(w.corners(), [1, 2]);
|
||||
assert_eq!(pts(&w)[0], Point::new(290.0, 110.0));
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ pub fn open(app: &mut VectorcraftApp, p: &Value) -> Result<Value, String> {
|
||||
};
|
||||
// Every corner given is one of the path's: none is left out of the edit.
|
||||
if corners.is_empty() || !corners.iter().all(|k| live.corner(*k).is_some()) {
|
||||
return Err("give corners of the path: anchors between two straight sides".into());
|
||||
return Err("give corners of the path: anchors where its sides meet at an angle".into());
|
||||
}
|
||||
let (radius, kind) = live.style(&corners);
|
||||
let mut fields = json!({"id": id.0, "corners": corners});
|
||||
|
||||
@@ -3429,7 +3429,7 @@ theme Appearance Erscheinungsbild
|
||||
@msg freeform point {i} needs `at` [x, y] and a valid `color` Freiformpunkt {i} braucht `at` [x, y] und eine gültige `color`
|
||||
@msg freeform line {i} must be an array of point indices Freiformlinie {i} muss ein Array von Punktindizes sein
|
||||
@msg give both `start` and `end` [x, y] (or neither) geben Sie sowohl `start` als auch `end` [x, y] an (oder keines von beiden)
|
||||
@msg give corners of the path: anchors between two straight sides geben Sie Ecken des Pfads an: Ankerpunkte zwischen zwei geraden Seiten
|
||||
@msg give corners of the path: anchors where its sides meet at an angle geben Sie Ecken des Pfads an: Ankerpunkte, an denen seine Seiten im Winkel aufeinandertreffen
|
||||
@msg give horizontal or vertical geben Sie horizontal oder vertical an
|
||||
@msg give the path `id` and the width point `index` geben Sie die `id` des Pfads und den `index` des Breitenpunkts an
|
||||
@msg guides are locked die Hilfslinien sind gesperrt
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3530,7 +3530,7 @@ axis Both Ambos
|
||||
@msg freeform point {i} needs `at` [x, y] and a valid `color` el punto de forma libre {i} necesita `at` [x, y] y un `color` válido
|
||||
@msg freeform line {i} must be an array of point indices la línea de forma libre {i} debe ser una lista de índices de puntos
|
||||
@msg give both `start` and `end` [x, y] (or neither) indica `start` y `end` [x, y] (o ninguno de los dos)
|
||||
@msg give corners of the path: anchors between two straight sides indica esquinas del trazado: puntos de ancla entre dos lados rectos
|
||||
@msg give corners of the path: anchors where its sides meet at an angle indica esquinas del trazado: puntos de ancla donde sus lados se unen en ángulo
|
||||
@msg give horizontal or vertical indica horizontal o vertical
|
||||
@msg give the path `id` and the width point `index` indica el `id` del trazado y el `index` del punto de anchura
|
||||
@msg guides are locked las guías están bloqueadas
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3527,7 +3527,7 @@ axis Both Les deux
|
||||
@msg freeform point {i} needs `at` [x, y] and a valid `color` le point de forme libre {i} nécessite `at` [x, y] et une `color` valide
|
||||
@msg freeform line {i} must be an array of point indices la ligne de forme libre {i} doit être un tableau d’indices de points
|
||||
@msg give both `start` and `end` [x, y] (or neither) indiquez à la fois `start` et `end` [x, y] (ou aucun des deux)
|
||||
@msg give corners of the path: anchors between two straight sides indiquez des angles du tracé : des points d’ancrage entre deux côtés droits
|
||||
@msg give corners of the path: anchors where its sides meet at an angle indiquez des angles du tracé : des points d’ancrage où ses côtés se rejoignent en angle
|
||||
@msg give horizontal or vertical indiquez horizontal ou vertical
|
||||
@msg give the path `id` and the width point `index` indiquez l’`id` du tracé et l’`index` du point de largeur
|
||||
@msg guides are locked les repères sont verrouillés
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3530,7 +3530,7 @@ axis Both Entrambi
|
||||
@msg freeform point {i} needs `at` [x, y] and a valid `color` il punto a forma libera {i} richiede `at` [x, y] e un `color` valido
|
||||
@msg freeform line {i} must be an array of point indices la linea a forma libera {i} deve essere un array di indici di punti
|
||||
@msg give both `start` and `end` [x, y] (or neither) specifica sia `start` sia `end` [x, y] (o nessuno dei due)
|
||||
@msg give corners of the path: anchors between two straight sides specifica angoli del tracciato: punti di ancoraggio tra due lati diritti
|
||||
@msg give corners of the path: anchors where its sides meet at an angle specifica angoli del tracciato: punti di ancoraggio in cui i suoi lati si incontrano ad angolo
|
||||
@msg give horizontal or vertical specifica horizontal o vertical
|
||||
@msg give the path `id` and the width point `index` specifica l'`id` del tracciato e l'`index` del punto di larghezza
|
||||
@msg guides are locked le guide sono bloccate
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3745,7 +3745,7 @@ theme Appearance 外観
|
||||
@msg no blend options ブレンドオプションがありません
|
||||
@msg bad color {v} カラー {v} が正しくありません
|
||||
@msg Corners edits the corners of a path 「コーナー」で編集できるのはパスの角だけです
|
||||
@msg give corners of the path: anchors between two straight sides パスの角 (2 本の直線の辺に挟まれたアンカーポイント) を指定してください
|
||||
@msg give corners of the path: anchors where its sides meet at an angle パスの角 (辺が角度をなして交わるアンカーポイント) を指定してください
|
||||
@msg select one path, or give its `id` パスを 1 つ選択するか、その `id` を指定してください
|
||||
@msg the drawing is no longer loaded 図面はもう読み込まれていません
|
||||
@msg No saved selections (Select → Save Selection…) 保存した選択範囲はありません (選択 → 選択範囲を保存…)
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3526,7 +3526,7 @@ axis Both Оба
|
||||
@msg freeform point {i} needs `at` [x, y] and a valid `color` произвольной точке {i} нужны `at` [x, y] и допустимый `color`
|
||||
@msg freeform line {i} must be an array of point indices произвольная линия {i} должна быть массивом индексов точек
|
||||
@msg give both `start` and `end` [x, y] (or neither) укажите и `start`, и `end` [x, y] (или ни одного)
|
||||
@msg give corners of the path: anchors between two straight sides укажите углы контура: опорные точки между двумя прямыми сторонами
|
||||
@msg give corners of the path: anchors where its sides meet at an angle укажите углы контура: опорные точки, в которых его стороны сходятся под углом
|
||||
@msg give horizontal or vertical укажите horizontal или vertical
|
||||
@msg give the path `id` and the width point `index` укажите `id` контура и `index` точки ширины
|
||||
@msg guides are locked направляющие заблокированы
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3513,7 +3513,7 @@ axis Both Обидві
|
||||
@msg freeform point {i} needs `at` [x, y] and a valid `color` довільній точці {i} потрібні `at` [x, y] та допустимий `color`
|
||||
@msg freeform line {i} must be an array of point indices довільна лінія {i} має бути масивом індексів точок
|
||||
@msg give both `start` and `end` [x, y] (or neither) вкажіть `start`, `end` [x, y] (або жодного)
|
||||
@msg give corners of the path: anchors between two straight sides вкажіть кути контуру: опорні точки між двома прямими сторонами
|
||||
@msg give corners of the path: anchors where its sides meet at an angle вкажіть кути контуру: опорні точки, у яких його сторони сходяться під кутом
|
||||
@msg give horizontal or vertical вкажіть horizontal або vertical
|
||||
@msg give the path `id` and the width point `index` вкажіть `id` контуру та `index` точки ширини
|
||||
@msg guides are locked напрямні заблоковані
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 659 and column 40.
|
+3
-2
@@ -1434,8 +1434,9 @@ size. The journal entry of a scaling command records the `strokes` and `corners`
|
||||
## Live Corners
|
||||
|
||||
`object.setLiveShape {id?, ids?, radius?, kind?, corners?, items?}` sets the corners of any path (one undo step): a live
|
||||
rectangle's or polygon's, a star's, a pen path's. A corner is an anchor without handles between two straight sides
|
||||
(not an open path's ends, not a smooth anchor, not one the sides run straight on through). `radius` (pt) and `kind`
|
||||
rectangle's or polygon's, a star's, a pen path's. A corner is an anchor where two sides, straight or curved, meet at an angle
|
||||
(not an open path's ends, not a smooth anchor, not one the sides run straight on through); a curved side is trimmed to
|
||||
what the cut leaves of it. `radius` (pt) and `kind`
|
||||
(`round`, `invertedRound` or `chamfer`) go to the `corners` given, else to the corners holding a Direct-Selected
|
||||
anchor (`select.anchors`), else to every corner. `corners` are anchor indices of the path with its corners uncut,
|
||||
counting every subpath's anchors in order: a rectangle's 0 top-left, 1 top-right, 2 bottom-right, 3 bottom-left; a
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Parity with Adobe Illustrator
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (Type advanced: proportional vertical metrics (`vpal`) done, #966; Shape Builder: #893 fixed, merged regions of crossing lines no longer keep seams; scores unchanged while #937 is open; #1034: document-point character controls after object/group scaling; full readiness recomputed as the standard's additive weighted sum, ~62%; per-audience hours; essentials-user score ~75% added; ready-for-real-work re-examined: 50% → 55%, mainstream 65% added; earlier the same day: full re-measure against Illustrator 2026 30.x; merged the ROADMAP's parity estimate, honest assessment and "Shipped so far" into this file) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026)
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (Drawing tools: Live Corners round corners between curved sides, #1144; Type advanced: proportional vertical metrics (`vpal`) done, #966; Shape Builder: #893 fixed, merged regions of crossing lines no longer keep seams; scores unchanged while #937 is open; #1034: document-point character controls after object/group scaling; full readiness recomputed as the standard's additive weighted sum, ~62%; per-audience hours; essentials-user score ~75% added; ready-for-real-work re-examined: 50% → 55%, mainstream 65% added; earlier the same day: full re-measure against Illustrator 2026 30.x; merged the ROADMAP's parity estimate, honest assessment and "Shipped so far" into this file) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026)
|
||||
|
||||
The authoritative parity assessment. [`ROADMAP.md`](../ROADMAP.md) summarizes it; [`gaps.md`](gaps.md) is
|
||||
the work list made from it. Deep areas have their own checklists: [UI and interaction](ui-parity.md),
|
||||
@@ -68,7 +68,7 @@ dominate; 3D, graphs and automation are specialist). They sum to 105. Feature de
|
||||
| Area | Weight | Done | Main gaps | One agent (h) | Kind |
|
||||
|---|---:|---:|---|---:|---|
|
||||
| Selection, transform & align tools | 6 | 85% | Free Transform/Scale/Reflect along a rotated box, Start Global Edit, transform nuances | 4–6 | estimated |
|
||||
| Drawing tools (Pen, Curvature, Pencil, shapes, Shaper) | 7 | 85% | Shaper construction widget, Pencil/Pen nuances, Blob Brush options, Touch Type, Dimension tool, Live Corners on curved corners; see [ui-parity.md](ui-parity.md) | 8–13 | estimated |
|
||||
| Drawing tools (Pen, Curvature, Pencil, shapes, Shaper) | 7 | 85% | Shaper construction widget, Pencil/Pen nuances, Blob Brush options, Touch Type, Dimension tool, Live Corners' Relative rounding; see [ui-parity.md](ui-parity.md) | 8–13 | estimated |
|
||||
| Path operations, Pathfinder, Shape Builder, Live Paint | 5 | 80% | Shape Builder misses planar regions in real files (#937), its gap detection and options; Live Paint Gap Options | 4–8 | estimated (lowered from 86%: open issues) |
|
||||
| Colour, swatches, gradients, patterns, mesh, recolor | 7 | 92% | 30.0's gradient dither, perceptual blending and gradient presets; freeform and mixed spot/process gradients in SVG/PDF | 4–7 | estimated (lowered from 96%: target moved) |
|
||||
| Strokes, brushes, width profiles | 5 | 88% | Art brush Overlap, Pattern brush auto corners, brush libraries, pen pressure on macOS, tilt/bearing/rotation | 8–15 | estimated |
|
||||
@@ -297,7 +297,7 @@ about 1–1.5 agent-hours each, so the other rows (estimated on the older scale)
|
||||
| Area | Weight | Done | Missing (main items) | One agent (h) |
|
||||
|---|---:|---:|---|---:|
|
||||
| Selection, transform & align tools | 6 | 85% | Free Transform/Scale/Reflect along a rotated box, Start Global Edit, transform nuances (the rotated persistent bounding box is done) | 4–6 |
|
||||
| Drawing tools | 7 | 85% | rough-square Shaper recognition and orientation steps corrected; editable Shaper Groups landed; remaining: Shaper construction widget/gesture refinements, pencil and the remaining pen modifier nuances, the freehand Tool Options' Keep selected, Alt to the Smooth tool, Blob Brush Merge Only with Selection and brush angle/roundness, Touch Type, Live Corners on corners between curved sides (and Relative rounding) | 8–13 |
|
||||
| Drawing tools | 7 | 85% | rough-square Shaper recognition and orientation steps corrected; editable Shaper Groups landed; remaining: Shaper construction widget/gesture refinements, pencil and the remaining pen modifier nuances, the freehand Tool Options' Keep selected, Alt to the Smooth tool, Blob Brush Merge Only with Selection and brush angle/roundness, Touch Type, Live Corners' Relative rounding | 8–13 |
|
||||
| Path operations, Pathfinder, Shape Builder, Live Paint | 5 | 86% | Live Paint gap options, Shape Builder gap detection, options (Tool Options dialog, clicking a stroke in merge mode) and Shift-drag marquee | 3–6 |
|
||||
| Colour, swatches, gradients, patterns, mesh, recolor | 7 | 96% | freeform and mixed spot/process gradients in SVG/PDF (exported as stops or process colours), pattern fills in Expand | 2–4 |
|
||||
| Strokes, brushes, width profiles | 5 | 90% | the Art brush's Overlap, auto-generated Pattern brush corners and new tile art in Pattern Brush Options (Brush Options for every brush type done), brush libraries (generated in code), pen pressure on macOS (the windowing layer reports none there), brushes driven by pen tilt, bearing and barrel rotation (6D art pens) | 8–15 |
|
||||
@@ -406,7 +406,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- **Cutting:** Eraser, Scissors, Knife, Mirror & Cut, Line Cut and Rectangle Cut (real geometry, compound paths keep their holes).
|
||||
- **Transform:** Rotate, Reflect, Scale, Shear (click or Alt-click snaps the reference point to anchors and centres; Alt-click opens the tool's dialog, and a drag with Alt down at the release, from the press or pressed mid-drag, transforms a copy), Reshape, Free Transform (free and perspective distort and shear, switched by the keys held during a handle drag).
|
||||
Align, Distribute, Distribute Spacing, Reflect and Shear return an error for any `horizontal`, `vertical`, `to`, `axis`, `bounds` or `spacing` value they don't take, listing the choices, and Align returns one when a call gives neither `horizontal` nor `vertical`; nothing moves and no undo step is recorded.
|
||||
- **Live Corners:** drag a live rectangle's corner widgets (Selection or Direct Selection) to round all corners, with a radius readout; with Direct Selection, select corner anchors to show and round just those corners (#381). Each corner keeps its own radius and kind (Round, Inverted Round, Chamfer): Alt-click a widget to cycle the kind, double-click it for the Corners dialog, and the Properties and Transform radius fields set the selected corners (`object.setLiveShape {corners, radius, kind}`). Corners stay circular when the rectangle is scaled unevenly or along its own sides when rotated (the radius keeps its size, or scales by the mean scale with Scale Corners on); only a shear distorts them. On a rectangle that isn't square every corner is the same circle: a radius past half the shorter side stops there for all of them, the widgets sit on the corners as drawn and turn the edited corners red at that limit, CSS export writes the drawn radii, and rectangles saved stretched by older versions get circular corners when their corners are next set (#442). Live Corners work on any path's corners too, as on a rectangle's (#511): a star's, a live polygon's (which also shows them to the Selection tool, has a Corner Radius field in the Properties and Transform panels and keeps its radius as its sides change) and a pen path's, wherever two straight sides meet at an anchor. Direct Selection shows the widgets of every corner, or of the corners holding selected anchors; each corner is a circle tangent to both sides, drawn no larger than takes its cut halfway along its shorter side; a path keeps its uncut outline so its corners stay editable, and the same command, dialog, angle preference and View › Hide Corner Widget apply.
|
||||
- **Live Corners:** drag a live rectangle's corner widgets (Selection or Direct Selection) to round all corners, with a radius readout; with Direct Selection, select corner anchors to show and round just those corners (#381). Each corner keeps its own radius and kind (Round, Inverted Round, Chamfer): Alt-click a widget to cycle the kind, double-click it for the Corners dialog, and the Properties and Transform radius fields set the selected corners (`object.setLiveShape {corners, radius, kind}`). Corners stay circular when the rectangle is scaled unevenly or along its own sides when rotated (the radius keeps its size, or scales by the mean scale with Scale Corners on); only a shear distorts them. On a rectangle that isn't square every corner is the same circle: a radius past half the shorter side stops there for all of them, the widgets sit on the corners as drawn and turn the edited corners red at that limit, CSS export writes the drawn radii, and rectangles saved stretched by older versions get circular corners when their corners are next set (#442). Live Corners work on any path's corners too, as on a rectangle's (#511): a star's, a live polygon's (which also shows them to the Selection tool, has a Corner Radius field in the Properties and Transform panels and keeps its radius as its sides change) and a pen path's, wherever two sides meet at an angle at an anchor that isn't smooth: curved sides too, trimmed to what the cut leaves of them (#1144). Direct Selection shows the widgets of every corner, or of the corners holding selected anchors; each corner is a circle tangent to both sides, drawn no larger than takes its cut halfway along its shorter side; a path keeps its uncut outline so its corners stay editable, and the same command, dialog, angle preference and View › Hide Corner Widget apply.
|
||||
- **Pen:** Alt pressed in the middle of dragging out an anchor splits its handles and keeps the curve already shaped into it (only the outgoing handle follows the pointer); Space held while dragging out an anchor moves it, handles and all. A press on the first anchor of the path being drawn closes it whatever the drag then does: the drag shapes the closing curve (symmetric handles, Alt breaks them) and the release closes the path wherever it ends (#501). Clicking the last anchor of the path being drawn retracts its outgoing handle (convert cursor), and dragging from it pulls out a new one on its own. Auto Add/Delete: over a selected path, a click on a segment adds an anchor and a click on an anchor deletes it (add and delete cursors); Shift held, or Preferences › General › Disable Auto Add/Delete, starts a new path instead. Alt held over a handle end or an anchor of a selected path (the one being drawn too) works as the Anchor Point tool, with its convert cursor: dragging a handle moves it alone, clicking a smooth anchor makes it a corner, dragging an anchor pulls out new symmetric handles, dragging a segment reshapes it; drawing then goes on. Cmd (Ctrl) held drags with the selection tool chosen last, Direct Selection until one is (handles, anchors and segments of the path being drawn or another), and the Pen then goes on drawing its path while that stays selected; the pointer shows that tool's while Cmd is held. The same holds for agents (`pointer_gesture` with `mods.cmd`), as the borrowing now lives in the engine (#494).
|
||||
- **Path editing (#494):** the handles shown are the handles that drag: Direct Selection drags those of a path selected as a whole (as the Pen leaves it), the Anchor Point tool and Pen+Alt no longer grab handles that Show handles when multiple anchors are selected hides, a handle shorter than the tolerance leaves its anchor to be picked, and the anchor tools pick within Selection & Anchor Display › Tolerance. A dragged segment keeps a smooth anchor at either end smooth. With Direct Selection, the Pen, the Curvature and the anchor tools, a path selected as a whole shows all its anchors selected, and the Control bar and the Properties panel offer Convert (corner, smooth) for them too; Remove and Cut wait for anchors direct-selected (#504). A handle drag gathers its snap targets once per drag (it took 21 ms per pointer move on a 20,000-path document, now 1 ms; `vectorcraft-cli perf` measures handle and segment drags on a 5,000-anchor path).
|
||||
- **Graphs:** Column, Stacked Column, Bar, Stacked Bar, Line, Area, Scatter, Pie and Radar graph tools with Graph Data and Graph Type. A series starts in greyscale; Group Selection's fill and stroke are kept separately on the graph and reapplied when its data, type or size changes, and through save, open and undo. Graph Type's Override Calculated Values (both `axisMin` and `axisMax`) uses exactly that value-axis range, split into the tick count (5 when automatic). Line graphs take Edge-to-Edge Lines (off by default: the points sit at the centres of their categories; graphs saved before the option keep their edge-to-edge lines), and radar graphs follow Mark Data Points and Connect Data Points. Blank cells (an empty CSV cell or `null`) are values left out, not zeros: columns, bars and stacked segments skip them, lines and scatter lines break around them and the value axis ignores them, while area, pie and radar draw them as 0; a number in straight quotes is a label, and the data window writes it back quoted. Graph types combine: Graph Type on series picked with Group Selection (or `series` indexes) draws them as their own type, with column, stacked column, line and area mixing on the vertical value axis and bar and stacked bar on the horizontal one; stacked columns take one slot of the cluster, lines draw in front of columns and areas behind. The value axis goes on the left, the right or both sides (column, stacked column, line, area and scatter graphs; bar graphs keep theirs along the bottom), and Separate Scales gives the series assigned to the right axis a scale of their own with its own tick values. Each value axis takes tick marks of no, short or full (across the plot) length and a count per division, and a prefix and suffix for its numbers; the category axis takes tick marks too (none by default), at or between its labels. Graph Design, Column and Marker artwork remain open.
|
||||
@@ -460,6 +460,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-11 | minor | Drawing tools: Live Corners on corners between curved sides (#1144) leaves the missing list; score and hours unchanged at this rounding (estimated) |
|
||||
| 2026-10-11 | minor | Type advanced: Proportional Metrics in vertical type (`vpal`, #966) leaves the missing list; score and hours unchanged at this rounding (estimated) |
|
||||
| 2026-10-11 | minor | Shape Builder #893 fixed (planar-map faces share their corners exactly, so merges leave no seams); Path operations stays 80% and Shape Builder 70% while #937 is open (estimated) |
|
||||
| 2026-10-10 | minor | Merged main: initial live Revolve landed (#846). 3D 0% → ~8% (50–85 h), menu stubs 28 → 27; depth, readiness and totals unchanged within rounding |
|
||||
|
||||
+3
-2
@@ -1,6 +1,6 @@
|
||||
# UI and interaction parity
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (several artboards selected at once, #1139; earlier: the Edit Toolbar drawer, #1018) · **Target:** Adobe Illustrator 2026 (30.x)
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (Live Corners round corners between curved sides, #1144; earlier: several artboards selected at once, #1139) · **Target:** Adobe Illustrator 2026 (30.x)
|
||||
|
||||
How VectorCraft's tools, handles, snapping and panels behave next to Illustrator's. A vector illustrator's
|
||||
trust is in the details: where a handle lands, what Shift and Alt do mid-drag, what a smart guide snaps to,
|
||||
@@ -70,7 +70,7 @@ tools, never checked side by side) isn't captured row by row.
|
||||
| Convert selected anchors to corner/smooth from the Control bar and Properties | done | |
|
||||
| Cut path at selected anchors, Remove Anchor Points, Delete removes segments | done | |
|
||||
| Live Corners widgets (radius readout, Alt-click cycles kind, double-click the Corners dialog) | done | clicking a widget without pre-selecting the anchor (#908) missing |
|
||||
| Corners between curved sides, Relative rounding | missing | |
|
||||
| Corners between curved sides (#1144), Relative rounding | partial | Relative rounding missing |
|
||||
| Isolation mode by double-click, breadcrumbs, Esc to exit | done | |
|
||||
| "Magnetic" moves of selected anchors with a modifier (#955 request) | missing | not an Illustrator feature as documented; under discussion |
|
||||
|
||||
@@ -169,6 +169,7 @@ re-measure of the panels added since.
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-11 | minor | Live Corners: corners between curved sides round too, the curve trimmed to what the cut leaves (#1144); score unchanged (estimated) |
|
||||
| 2026-10-11 | minor | Artboards: Shift-click selects several, which move, copy and delete together (#1139); score unchanged (estimated) |
|
||||
| 2026-10-11 | minor | Edit Toolbar opens the All Tools drawer beside the toolbar instead of a centred dialog, dims the tools the toolbar holds, and edits the toolbar by drag and drop while it is open (#1018); score unchanged (estimated) |
|
||||
| 2026-10-11 | minor | Direct Selection: dragging a path selected whole by an anchor moves it whole; Alt-drag copies by an anchor too, toggles during the drag and snaps onto the original (#1104); score unchanged (estimated) |
|
||||
|
||||
Reference in new issue
Block a user