mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-29 01:34:29 +01:00
Parametric Shape: rectangles, ellipses, polygons, stars and rings cut as slices
addon.pathtools.shape.create and addon.pathtools.shape.set take sliceStart and sliceEnd, in degrees clockwise from the shape's top (0 to 360). The shape is cut from the start clockwise to the end and back through its center; a ring's slice runs back along its hole. The angles are measured as if the shape were as high as it is wide, so 45 degrees is a rectangle's top right corner and a slice keeps its place when the shape is stretched along its own axes. The same start and end leave the whole shape, rounded corners are rounded before the cut, and the arrow, cross, heart, gear and speech bubble ignore both values. A value outside 0 to 360 is refused. The values are kept with the shape's other numbers and with the Parametric Shape Tool's options.
This commit is contained in:
1 parent
3d88485fa6
commit
7e2ee5ae03
7 files changed
+303
-16
No files matched your search
+9
-5
@@ -16120,16 +16120,20 @@ Commands:
|
||||
60,000,000 pairs of segments to compare in all, when the curves are too tangled to find where they cross, or when
|
||||
checking `points` against the paths would take more than 60,000,000 comparisons. These rules are VectorCraft's own.
|
||||
→ `{ids, removed}`: the paths left of those trimmed, and the stretches removed.
|
||||
- `addon.pathtools.shape.create {center, kind?, width?, height?, rotation?, count?, a?, b?, radius?}` draws a parametric
|
||||
shape with the current paint, selected. `kind`: `rectangle`, `ellipse`, `polygon` (default), `star`, `ring`, `arrow`,
|
||||
`cross`, `heart`, `gear` or `bubble` (a speech bubble). `width` and `height` are 0.01 to 16,384 pt (100);
|
||||
`rotation` is in degrees clockwise (0: upright, a polygon's first corner up); `count` is a polygon's sides, a star's
|
||||
- `addon.pathtools.shape.create {center, kind?, width?, height?, rotation?, count?, a?, b?, radius?, sliceStart?,
|
||||
sliceEnd?}` draws a parametric shape with the current paint, selected. `kind`: `rectangle`, `ellipse`, `polygon`
|
||||
(default), `star`, `ring`, `arrow`, `cross`, `heart`, `gear` or `bubble` (a speech bubble). `width` and `height`
|
||||
are 0.01 to 16,384 pt (100); `rotation` is in degrees clockwise (0: upright, a polygon's first corner up); `count` is a polygon's sides, a star's
|
||||
points or a gear's teeth (3 to 1,000); `radius` rounds the corners (0 to 16,384 pt; no corner passes the middle of a
|
||||
side). `a` and `b` are the kind's own values, fractions of its size: star, inner radius (0.01 to 1, 0.5); ring, the
|
||||
hole (0.01 to 0.99, 0.5); arrow, head length and shaft width (0.05 to 0.95, 0.4 each); cross, the bar's offset (−0.9
|
||||
to 0.9, 0; negative is up) and the arms' thickness (0.05 to 0.95, 1/3); heart, the notch's depth and the point's
|
||||
roundness (0 to 1; 0.4 and 0); gear, tooth height (0.01 to 0.9, 0.2); bubble, the tail's height (0.05 to 0.9, 0.25)
|
||||
and where its tip is across (−1 to 1, −0.4). → `{id, shape}`.
|
||||
and where its tip is across (−1 to 1, −0.4). `sliceStart` and `sliceEnd` (0 to 360, both 0) cut a rectangle,
|
||||
ellipse, polygon, star or ring as a slice: the angles are degrees clockwise from the shape's top, measured as if the
|
||||
shape were as high as it is wide (45° is a rectangle's top right corner), and the slice runs clockwise from the start
|
||||
to the end and back through the center; a ring's slice runs back along its hole. The same start and end leave the
|
||||
whole shape, rounded corners are rounded before the cut, and the other kinds ignore both values. → `{id, shape}`.
|
||||
- `addon.pathtools.shape.set {id, …}` changes a parametric shape's numbers (the same keys; a new `kind` takes its own
|
||||
defaults for the values not given) and redraws it in place. With `reference` (0 to 8 on the 9-point grid of the
|
||||
bounding box as `object.setBounds` measures it, rotated with rotated objects) and no `center`, that point of the box
|
||||
|
||||
@@ -2977,7 +2977,8 @@ Appearance matches the outline and the pixels, saves keep it, a file's junk para
|
||||
|
||||
The add-on's Parametric Shape Tool (2026-10-30) draws ten kinds of shape that stay editable as numbers (rectangle,
|
||||
ellipse, polygon and star with 3 to 1,000 sides or points, ring, arrow, cross, heart, gear, speech bubble; corner radius
|
||||
limited to the middle of a side): a drag from the centre sizes and turns one, the arrow keys change its count and values
|
||||
limited to the middle of a side; the rectangle, ellipse, polygon, star and ring cut as a slice between a start and an
|
||||
end angle, through the center): a drag from the centre sizes and turns one, the arrow keys change its count and values
|
||||
while dragging, handles edit a selected one, a double-click places one with the last settings, and its panel edits the
|
||||
numbers (its W and H keep the point chosen in the shared reference point locator in place, and the center when anchors
|
||||
are direct-selected). A shape is a plain path
|
||||
|
||||
Reference in new issue
Block a user