mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-19 12:38:18 +00:00
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.
This commit is contained in:
@@ -82,7 +82,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"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
|
||||
),
|
||||
|
||||
@@ -80,7 +80,8 @@ pub fn curvature_circle(c: CubicBez, t: f64, convex: bool) -> Result<CurvatureCi
|
||||
/// the next or previous segment at a corner, the path has no single direction: that is a
|
||||
/// [`NoCircle::Corner`]. A segment `sp` lacks is a [`NoCircle::Cusp`]. Segments with no length
|
||||
/// between the two are passed over, and a closed subpath with one segment of length meets itself.
|
||||
/// The anchor is smooth when it is marked smooth with handles that turn by less than 90°, or when
|
||||
/// The anchor is smooth when it is marked smooth, with both handles pulled out and no segment of no
|
||||
/// length passed over to reach it, and the path turns there by less than 90°, or when
|
||||
/// the two segments leave it within [`SMOOTH_TURN`] of one direction.
|
||||
pub fn curvature_circle_on(sp: &SubPath, seg: usize, t: f64, convex: bool) -> Result<CurvatureCircle, NoCircle> {
|
||||
let n = sp.segment_count();
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
+5
-4
@@ -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}}}
|
||||
|
||||
Reference in New Issue
Block a user