From c43383798150ec2f7f47dd81a2c93c99ced78ec4 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 17:30:38 -0800 Subject: [PATCH] Shapes: Curvature Circle docs say when a smooth mark counts and when drawn circles are reachable shape.curvatureCircle's description and docs/mcp.md now say a smooth mark only overrides the corner test when both handles are pulled out and no segment of no length lies before the anchor. The tool and docs/mcp.md say the pointer reaches the drawn circles again once another tool is chosen. --- crates/engine/src/cmd/create.rs | 2 +- crates/geom/src/curvature.rs | 3 ++- crates/tools/src/curvature_circle.rs | 4 ++-- docs/mcp.md | 9 +++++---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/crates/engine/src/cmd/create.rs b/crates/engine/src/cmd/create.rs index 2b9cba3761..89752c1b33 100644 --- a/crates/engine/src/cmd/create.rs +++ b/crates/engine/src/cmd/create.rs @@ -82,7 +82,7 @@ pub fn specs() -> Vec { "Curvature Circle", [], None, - "{id, subpath?=0, segment, t: 0..1, convex?=false} → {id, cx, cy, radius, nominal}: a circle with the current paint that touches path `id` at `t` on the segment and bends as the path bends there (its circle of curvature), on the side the path bends toward, or on the other side with convex; a segment that is the usual cubic of a circular arc of 90° or less gives a circle of that arc's own radius (nominal: true), on the concave side the arc's own circle; not pixel-aligned even while Align New Objects to Pixel Grid is on; a straight stretch, a cusp, a corner anchor (t 0 or 1 where two segments meet at an angle of more than half a degree and the anchor is not marked smooth, or where they turn by 90° or more; segments of no length between them are passed over), a guide, or a circle reaching past the canvas is an error, and nothing is drawn", + "{id, subpath?=0, segment, t: 0..1, convex?=false} → {id, cx, cy, radius, nominal}: a circle with the current paint that touches path `id` at `t` on the segment and bends as the path bends there (its circle of curvature), on the side the path bends toward, or on the other side with convex; a segment that is the usual cubic of a circular arc of 90° or less gives a circle of that arc's own radius (nominal: true), on the concave side the arc's own circle; not pixel-aligned even while Align New Objects to Pixel Grid is on; a straight stretch, a cusp, a corner anchor (t 0 or 1 where two segments meet at an angle of more than half a degree and the anchor is not marked smooth with both handles pulled out, or where they turn by 90° or more; segments of no length between them are passed over, and an anchor reached past one is treated as not marked smooth), a guide, or a circle reaching past the canvas is an error, and nothing is drawn", has_doc, curvature_circle ), diff --git a/crates/geom/src/curvature.rs b/crates/geom/src/curvature.rs index de5e68e54b..1c88328fd5 100644 --- a/crates/geom/src/curvature.rs +++ b/crates/geom/src/curvature.rs @@ -80,7 +80,8 @@ pub fn curvature_circle(c: CubicBez, t: f64, convex: bool) -> Result Result { let n = sp.segment_count(); diff --git a/crates/tools/src/curvature_circle.rs b/crates/tools/src/curvature_circle.rs index 6a0ffe05ea..b484651181 100644 --- a/crates/tools/src/curvature_circle.rs +++ b/crates/tools/src/curvature_circle.rs @@ -11,8 +11,8 @@ //! the side the path bends toward; with Shift held at the press, on the other side. On a straight //! stretch, at a cusp, at a corner, or where the circle would reach past the canvas, the pointer //! shows "Straight segment", "Cusp", "Corner" or "Circle too large" instead, and a click draws -//! nothing. The pointer passes over the circles the tool drew until an edit, Undo or Redo is made -//! outside the tool. +//! nothing. The pointer passes over the circles the tool drew until another tool is chosen or an +//! edit, Undo or Redo is made outside the tool. use std::collections::HashSet; diff --git a/docs/mcp.md b/docs/mcp.md index 1d26800ea0..a6e66eeaa8 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -6733,8 +6733,9 @@ result is `{id, cx, cy, radius, nominal}`, where `nominal` is true for such an a The circle is not pixel-aligned, even while [Align New Objects to Pixel Grid](#align-new-objects-to-pixel-grid) is on. The command returns an error and draws nothing on a straight segment or the turning point of an S curve, at a cusp, at an anchor whose handle is drawn back onto it, at a corner anchor (`t` 0 or 1 where two segments meet at an angle -of more than half a degree and the anchor is not marked smooth, or where they turn by 90° or more; segments of no -length between them are passed over), when the circle would reach past the canvas (4,000,000 pt from the +of more than half a degree and the anchor is not marked smooth with both handles pulled out, or where they turn by +90° or more; segments of no length between them are passed over, and an anchor reached past one is treated as not +marked smooth), when the circle would reach past the canvas (4,000,000 pt from the origin), when `t` is not from 0 to 1, when `id` is a guide, and when the path, subpath or segment does not exist. The Curvature Circle tool, after the Circle tool in the Ellipse tool's toolbar group, draws with this command. The @@ -6745,8 +6746,8 @@ it touches and, with Measurement Labels on, its radius by the pointer, followed radius. A click draws the circle, and a press dragged 2 screen points or more, or canceled with Escape, draws nothing; Shift held at the press puts the circle on the other side of the path. On a straight segment, at a cusp, at a corner anchor, or where the circle would reach past the canvas, the pointer shows "Straight segment", "Cusp", "Corner" or -"Circle too large", and a click draws nothing. The pointer passes over the circles the tool drew until an edit, Undo -or Redo is made outside the tool. +"Circle too large", and a click draws nothing. The pointer passes over the circles the tool drew until another tool +is chosen or an edit, Undo or Redo is made outside the tool. ```json {"name":"run_command","arguments":{"command":"shape.curvatureCircle","params":{"id":12,"segment":0,"t":0.5}}}