Add Bounding Rectangle… and Add Bounding Circle… open the command dialog
with Offset (0 to 4,000,000 pt), One per Object (`each`) and Preview, so
the menu sets what the commands take. Cancel removes the preview without
a step of history, and an Offset that takes the shape past the canvas
edge leaves the dialog open with the error.
- The canvas check reuses `sanity::rect_in_range`; the params text and
docs/mcp.md say the limit holds along each axis.
- Tests: the dialog (defaults, preview, Cancel, OK with and without an
Offset and One per Object, the canvas error, the catalog rows); a circle
just inside the limit; one edge past the limit is refused.
- Catalogs: the two menu labels with "…" and "One per Object" in all 28;
the four messages in bg, bs and id as well.
When every shape is left out because it would have no size, for example
Add Bounding Rectangle on a straight horizontal line, the error is now
"the shape would have no size" instead of "nothing to enclose", which
stays for objects with no outline. A shape that would reach more than
4,000,000 pt from the origin, for example with a very large `offset`,
is refused with "the shape would reach past the edge of the canvas"
before anything is drawn. Both messages are in the 24 catalogs that
translate messages.
The params text of addon.pathtools.boundingCircle now names the
sublayer rules that docs/mcp.md states: sublayers that clip their
contents count by their clipping paths, other sublayers by their shown
objects. Both commands' params text lists the errors.
The menu items open no dialog and draw one shape around the whole
selection with no offset. docs/ui-parity.md, docs/target-app-parity.md,
docs/mcp.md and the ROADMAP line now say so, and name `each` and
`offset` as command parameters only.
New tests: the menu items in vectorcraft-ui-egui, the canvas-edge error
in vectorcraft-engine, and shapes::convex_hull in vectorcraft-geom.
At a corner anchor the tool now shows "Corner" instead of "Cusp", and
`shape.curvatureCircle` returns "the path has a corner there, so it has
no single curvature".
- A closed subpath whose only segment with length loops back to its
start (a teardrop) has a corner at its tip, from both ends of the loop.
- An anchor marked smooth whose out handle points back along its in
handle is a corner.
- The guide error and the new corner error have rows in the 24 catalogs
that translate every message.
- A test covers a Smart Guides snapping tolerance larger than 5 screen
points, with Smart Guides off and on.
- The release returns shape.circleThroughPoints followed by a Notify,
and the tool forgets the first segment only when it is told, so a
command that fails leaves the segment picked (as the Direct Selection
tool's FRAME_PICKED notice follows its command).
- The preview leaves out circles that three of their points cannot give
back, so the note shows where a click would draw nothing.
- A double-click draws nothing more: the canvas sends it after the
second click's release, which drew the circle.
- The re-exports for the tool are a separate `pub use` in the pathops
pathtools module, whose module comment is unchanged.
- Circles of one radius at places tried close together along the
first segment are no longer taken for repeats: a repeat also touches
the first segment at the same point. At a radius of 1,000,000 pt the
513 places along a 100 pt line were cut to 86.
- A test checks the note's row in every complete catalog.
Docs: a drag's circle may touch the first segment anywhere along it;
the circles that are left out; an out-of-range radius option leaves
the radius as it is. The ROADMAP, target-app-parity and ui-parity
entries move next to related entries, and docs/mcp.md is rewrapped to
120 columns.
Part of #7178.
The Curvature Circle tool, after the Circle tool in the Ellipse tool's
flyout, draws the circle that touches a path at a point and bends as the
path bends there, with shape.curvatureCircle. The pointer snaps to the
nearest path that is not a guide within 5 screen points, or within the
Smart Guides snapping tolerance when that is larger, and the tool shows
the circle as a dashed outline (solid once it is more than 50,000 screen
points around), its center, a line from the center to the point it
touches and, with Measurement Labels on, its radius. A click draws the
circle in one undo step, on the side the path bends toward; Shift held at
the press puts it on the other side. A press dragged 2 screen points or
more, or canceled with Escape, draws nothing.
A segment that is the usual cubic of a circular arc of 90° or less gives
a circle with the arc's own radius, shown with an asterisk, so a click on
a circle drawn with the Ellipse tool draws that circle. On a straight
segment, at a cusp or a corner anchor, or where the circle would reach
past the canvas, the pointer shows "Straight segment", "Cusp" or "Circle
too large", and a click draws nothing. An anchor is a corner when the
segments meet there at more than half a degree and it is not marked
smooth; segments of no length between them are passed over. The tool's
icon is new and drawn for VectorCraft.
shape.curvatureCircle takes the path, subpath, segment, t and convex, and
returns the circle's center and radius and whether the radius is an
arc's own. A guide is refused.
draw2::candidate_paths skips the selected paths with a hash set, so it
takes time linear in the number of paths on each pointer move.
Part of #7178.
The Tangent Circle Tool (tangentCircle) joins the add-on's tools, in
Object > Plug-ins > Path Precision Tools and the All Tools drawer. A click
on a path segment picks it; a click on a second segment draws the circle
that is tangent to the first segment at the point clicked and touches
the second. The segments beside the second one count with it, and of
the circles found the one touching them nearest the pointer is drawn.
- Shift on the second click uses the tool's radius (36 pt to start, set
in its options), anywhere along the first segment.
- A drag from the second segment sets the radius to the drag's length;
Shift steps it by 1, 2 or 5 times a power of 10 pt, at least 4 screen
pixels, and Cmd/Ctrl pressed during the drag moves it by a tenth.
- Before the click the circle shows with its center, its radii to the
touch points and its radius, or a translated note says there is none.
The preview follows a pan, a zoom or an edit under a still pointer.
- The circle is drawn with shape.circleThroughPoints, so Align New
Objects to Pixel Grid leaves it tangent; one undo step. A circle that
its three points cannot give back in floating point is not drawn, and
the first segment stays picked. Escape, an edit outside the tool or
another document forgets the first segment.
The geometry is circles_through and circles_of_radius in the pathops
crate: the distance to the second segments is sampled along the first
segment's normal (or along the segment, for a radius) and the places
where it equals the radius are taken, including touches between samples.
Part of #7178.
Docs: docs/mcp.md, docs/ui-parity.md, docs/target-app-parity.md, ROADMAP.
Object › Plug-ins › Path Precision Tools › Add Bounding Rectangle runs
addon.pathtools.boundingRectangle, which draws a live rectangle on the
selection's geometric bounding box, strokes left out. Add Bounding
Circle runs addon.pathtools.boundingCircle, which draws the smallest
live circle that holds the outlines of the selected objects. Paths and
compound paths count by their curves, clip groups and clipping
sublayers by their clipping paths, other sublayers by their shown
objects, images by their corners, and type and other objects by the
corners of their bounding box. Each curve is split until its pieces lie
within 0.01 pt of their chords (1,024 pieces at most, after which a
piece counts by its control points), and the circle's radius is 0.01 pt
larger than the smallest circle around those points, so it holds the
curves.
`offset` adds space around the objects, and `each` draws one shape
around each selected object instead of one around them all. Objects
with no outline, such as an empty group, and shapes with no size (the
rectangle around a straight horizontal line, the circle around a single
point) are not drawn; with `each`, `skipped` counts them.
The shapes get the current paint and go on top of the current layer or
of the isolated group, as Tangent Circle's circles do; inside an
isolated compound path they go beside it. The new shapes are selected,
and one undo removes them all.
The smallest circle is computed in the geometry crate
(shapes::enclosing_circle) from the convex hull of the points with a
fixed shuffle, relative to one of the points so small art far from the
origin keeps its exact circle. While the command gathers points from a
large selection, it keeps only the corners of their convex hull, which
bounds the memory it takes.
Docs: docs/mcp.md, docs/ui-parity.md, docs/target-app-parity.md,
ROADMAP. Menu labels in all 28 catalogs and messages in the 24
catalogs with complete messages.
Common Tangents (addon.pathtools.commonTangents) now also takes a point,
a path of one anchor, together with a convex closed path. The lines run
from the point to where they touch the path: two from a point outside
it, one from a point on its outline (centered on the point and as long
as the path is wide along it, or the whole straight side the point lies
on), and none from a point inside, which leaves the document unchanged
and returns a warning. Centerline adds the line from the point to the
path's center. Every Tangents value gives the same lines; two points
are refused.
The geometry treats the point as an outline whose support value is
p . n, so the existing root search finds the lines.
Docs: docs/mcp.md, docs/target-app-parity.md, ROADMAP. The new warning
has a row in every catalog.
The Circle tool, in the Ellipse tool's flyout, draws a circle with
shape.circleThroughPoints. A drag from one point to another, or a click
on each, draws the circle with the two points as the ends of a diameter.
A click on a first point, then a press on a second point dragged to a
third, draws the circle through the three. Shift keeps the second point
at 45° steps from the first. For a circle on two points, Alt rounds the
diameter to the nearest ruler tick at the current zoom in the General
unit. Each point snaps to Smart Guides. Until the release the tool shows
the circle as a dashed outline (solid once it is more than 50,000 screen
points around), a cross at its center, a line from the center to each
point and, with Measurement Labels on, the diameter by the pointer.
Three different points on one line, or a circle past the canvas, show
"Circle too large" by the pointer instead, and the release draws
nothing. Escape, a dropped press, and an edit, Undo or Redo made outside
the tool drop the first point. A second press within 3 screen points of
the first point, or one that snaps to it, places nothing when let go
there, and draws the circle on the diameter it drags out when dragged.
Each circle is one undo step. The tool's icon is new and drawn for
VectorCraft.
shape.circleThroughPoints also takes two points, or two selected anchor
points, as the ends of a diameter. Its two errors about the number of
points now say "two or three", in every catalog that translates them.
Part of #7178.
With no panels docked on the left and a toolbar made with New Toolbar docked there, a drop on
the canvas's left edge docks Tools at the window's edge, left of the toolbar's lane. The strip
that lit up during the move was the canvas's edge, right of the lane. The window's edge now
lights up instead.
The window.toolsBesideCanvas params text, docs/control-protocol.md, docs/target-app-parity.md and
the UiState doc comment now say that a drop with no panels docked on the left, or in the column
both edges share beside panels collapsed to icons, leaves Window › Toolbars › Keep Tools Beside
the Canvas as it is. ROADMAP's progress log gets a line for the changed drop rule.
The test of a release where the move started now presses on the title bar, moves past the drag
threshold so the move starts, and releases within the travel limit over the canvas's edge; it
fails without that limit.
Fold Preview (Object › Plug-ins › Packaging Tools, and the Fold Lines panel's button) shows the
document's blank folded about its largest panel, or the panel double-clicked. Creases and
perforations fold 90° away from the printed side and partial cuts 90° toward it. Each panel
samples a raster of the print, with the fold lines and non-printing layers left out, through its
projective map, with a depth buffer; the back shows the board's inside color. The window has a
Fold slider, seven view presets, orbit, zoom, pan and perspective, and its status line reports a
joint that does not close and panels that pass through each other.
- addon.packaging.fold returns each panel's frame, the hinges with their angle and gap, and the
collisions. A closing hinge's gap is measured with every hinge folded all the way.
- ui.foldPreview sets the window and rejects values of the wrong kind or out of range; saved
settings out of range are brought into range.
- The print renders off the UI thread where a worker exists and once per document revision. The
fold and the view image are worked out again only when the document, the settings or the
window's size change.
Object › Plug-ins › Packaging Tools › Check Fold Lines, and the Fold Lines
panel's Check button, check the fold lines of the selection, or of the
document while nothing is selected (`addon.packaging.check`).
- Cut lines bound the material: each connected piece that encloses an
area is one blank, its largest closed cut line is the outline, and a
closed cut line inside it is a hole. A slot drawn as a rectangle across
the outline leaves the same material as a notch drawn in it, and an
outline drawn as several open cut lines works too.
- Creases, partial cuts and perforations divide a blank into panels; the
pieces between the same two panels form one hinge.
- 15 issue codes, errors and warnings, each naming its lines; cut line
ends within a tolerance (0.1 pt, 0.01 to 10) are joined and reported as
a gap. With `select`, the lines the issues name are selected.
- The panel lists the issues in the interface language, with a summary
line; clicking an issue or its Select button selects its lines. The
list is kept until the document changes.
`vectorcraft_pathops::adjacency` maps paths as live_paint does and keeps,
for each edge, every input it lies on and the faces on both sides; the
blank model is `vectorcraft_three_d::fold::blanks`. The engine now depends
on vectorcraft-three-d directly.
Docs: docs/mcp.md (Check Fold Lines), crates/pathops/README.md, ROADMAP.
Smooth Bridge now takes three or more circles. Every two whose outlines
are within a reach of each other are bridged, the bridges that connect
are united into one shape each, and a circle bridged to no other stays
as it is.
- `addon.pathtools.bridge` takes `gap` (0 to 1000 pt) in place of
`radius`: the arcs' radius is the smaller circle's radius plus the
gap, so each arc stays the gap away from a circle of the smaller
circle's size about the arc's center. In a triangular grid of equal
circles that gap apart, the channels around an empty place keep one
width. Giving both is an error.
- `reach` (0 to 10000 pt, 10 by default) sets how far apart two circles'
outlines may be for a bridge between them. It applies to three or
more circles; two are bridged at any distance, and the dialog's Reach
field is unavailable then. Pairs are found through a grid of cells,
so each circle is compared only with its near neighbors. Holes
smaller than 1% of the smallest circle's area are filled.
- A pair within reach but too far apart for the radius or gap gets no
bridge. One circle inside another, no pair that can be bridged, no
two circles within reach, more than 2000 circles and more than 8000
bridges are refused with a message. An id given twice counts once.
- Each shape replaces its circles, painted as the topmost of them, or
with `keepOriginals` goes directly above that circle. One undo step;
the shapes and the circles left alone are selected, and the result is
`{ids, alone}`, with `id` as well for two circles.
- `smooth_bridge` refuses circles whose sizes overflow when squared;
it returned a path whose points were not numbers.
- The selection message becomes "select two or more circles to bridge".
- The dialog adds Constant Gap (a Gap field in place of Radius) and
Reach.
Docs: docs/mcp.md, docs/ui-parity.md, docs/target-app-parity.md,
ROADMAP.
With Smart Guides and Snap to Tangent on, an Alt+Shift drag with the
Ellipse tool snaps the circle's radius so that the circle touches a
nearby path, when the radius comes within the snapping tolerance of that
size. The touch point is where the line from the center meets a straight
segment or a curve square, inside a segment or at an anchor where the
path runs smoothly, including an anchor where a curve's handle lies on
the anchor. A circle can touch another circle from outside or from
inside. Corners, open path ends and curves around the same center are
not offered.
The touch point shows the "tangent" label, the radius is measured along
the Constrain Angle's axes, and Space moves the circle at the size it
snapped to, which it keeps when Space is let go. When an anchor, center or crossing is near the pointer, or
the dragged corner snapped onto one, the circle is not resized. An
ellipse without Shift is not snapped. Snap to Grid and pixel snapping
place the point instead, also when turned on during the drag, and
turning Snap to Tangent off during the drag stops the snap. A press
with a small jitter is still a click rather than a drag. Each pointer move
measures at most 256 segments near that radius.
Object › Plug-ins › Path Precision Tools › Tangent Circle…
(`addon.pathtools.tangentCircle`) draws the circles that touch two
selected paths or compound paths at a set radius, or that touch three of
them. A circle touches a shape when it meets the outline without
crossing it, with the whole outline outside the circle or inside it: at
a smooth point it is tangent there, and at a corner or an open end it
passes through that point. Circles, ellipses at any angle and other
closed or open paths all work; the members of a compound path count as
one outline.
When every shape is a circle, the circles are found in closed form (up
to eight for three circles, the problem of Apollonius) and then moved
onto the drawn Bézier circles, which differ from true circles by up to
0.0273% of the radius. Other shapes are searched on a grid, and the
centers left are refined with Newton's method on the curves. With three
shapes, circles up to 64 times the diagonal of the box around the
shapes' anchors and handles are found.
The circles are listed by radius, then top to bottom, then left to
right. The dialog takes the radius (with two shapes; 36 pt to start)
and previews every circle found or one picked by number; OK draws them
with the current paint as one undo step, selected. No circle, more than
64 circles (shapes touched along a whole curve, such as two concentric
circles), shapes at one point or too small for the radius, more than
2000 segments and a search past its limits are errors that leave the
document unchanged.
The Tangent Circle and Circle: rows are in every catalog, and the
command's messages in the catalogs that translate messages.
Docs: docs/mcp.md (Path Precision Tools add-on),
docs/target-app-parity.md, docs/ui-parity.md and ROADMAP.
With Smart Guides and Snap to Tangent on, a Line Segment drag pressed
anywhere on a convex closed path with curves and dragged to within the
snapping tolerance of another such path lands on a common tangent of the
two. Both ends move to where the line touches the paths, the start sliding
along the first path. The line is the tangent whose touch point on the
second path is nearest the pointer, so moving the pointer around that path
switches between the outer tangent and the one crossing between the paths.
Each end shows the "tangent" label when Anchor/Path Labels is on, and the
line is drawn as a guide when Alignment Guides is on.
Before this change the start of a Line Segment drag always stayed where it
was pressed. It still does when Shift, Alt or Space is held, when an
anchor, center or crossing lies nearer the pointer than the second path,
when the press snapped to an anchor, center or crossing off the first path,
when Snap to Tangent is off, when Snap to Grid or pixel snapping places
drawn points, or when either path bends inward somewhere or has more than
512 segments.
The tangents come from the Common Tangents geometry. Each pointer move
looks at the 16 nearest closed subpaths within the snapping tolerance and
keeps the tangents of up to 64 pairs for the rest of the drag.
Object › Plug-ins › Path Precision Tools › Common Tangents…
(`addon.pathtools.commonTangents`) adds the common tangent lines of two
selected convex closed paths as separate open paths: external (both
paths on the same side of the line), internal (the lines between them)
or all, and with Centerline the line joining the two centers. An
ellipse drawn with the Ellipse tool is measured as an exact ellipse at
any rotation and scale; any other path must be closed, have one outline
and bend the same way all around, with at most 10000 segments.
Each line runs between the points where it touches the two paths, or
covers a straight side that lies along it. Separate paths have four
tangents, overlapping paths only external ones (two for ellipses), and
a path inside the other none. Paths that touch, from outside or from inside, share
one tangent instead: a line centered on the point where they touch and
as long as the narrower path is wide along it. When there is no tangent
of the kind asked for, nothing changes and the result carries a warning
that says why. The lines take the current stroke and no fill, go
directly above the upper path and are selected, as one undo step. The
dialog has Preview.
The geometry is in vectorcraft-pathops: the tangents are the zeros of
the difference of the two outlines' support values over the normal's
angle, sampled at 720 even steps and at every angle where either
path's touching point passes to another segment, then refined, so the
work per pair is bounded.
Catalog rows for the menu item, the dialog and the messages are in
every catalog.
Docs: docs/mcp.md (Path Precision Tools add-on), docs/target-app-parity.md
and ROADMAP.
The menu tree at 957397e7 has 717 items bound to commands and 2 stubs
(Effect > 3D and Materials > Materials and Help > VectorCraft Help);
Check Spelling now opens its dialog. The count leaves out 239 entries
in the recent-file, recent-font, saved-selection and saved-view slots
and in the Open With, Scripts, Plug-ins, Type > Font, Effect > SVG
Filters and View > Perspective Grid preset submenus. The
feature-breadth rows in ROADMAP.md and target-app-parity.md now give
717/719 (99.7%); the earlier counts stay as dated history.
Object › Plug-ins › Path Precision Tools › Smooth Bridge… joins two
selected circles into one closed outline, like two drops of liquid
pulling apart. The outline goes around each circle on its side away from
the other and along two concave arcs, one on each side, that touch both
circles from outside, so it runs on smoothly into each circle and every
anchor is smooth.
- `addon.pathtools.bridge {radius?, keepOriginals?, ids?}`: `radius` is
the arcs' radius as a percentage of the smaller circle's radius (1 to
1000, 100 by default); a larger radius makes a wider, gentler bridge.
The outline replaces the two circles, painted as the upper one, or
with `keepOriginals` goes directly above the upper circle and the
circles stay. One undo step; the outline is selected.
- Overlapping and touching circles are joined at every radius. One
circle inside the other, circles too far apart for the radius (the
arcs would not reach both circles, or would cross), and anything other
than two circles that can be edited are refused with a message. The
message suggests a larger radius only when one up to 1000% would
bridge the circles.
- The dialog has a Radius field in percent, Keep Originals and Preview.
- `circle_of` and `smooth_bridge` in `vectorcraft-pathops` tell a
circle from other paths and build the outline.
Docs: docs/mcp.md, docs/ui-parity.md, docs/target-app-parity.md,
ROADMAP.
The Languages table listed Indonesian as none and 0%, while
crates/ui-egui/src/i18n/id.tsv ships with 6,947 catalog rows and
Preferences offers it as Bahasa Indonesia. The row now gives the
catalog size and says that status and error messages are partial.
The "Also shipped" list now names Dutch, Danish and Turkish, which
ship full catalogs and are in COMPLETE_MESSAGES.
shape.circleThroughPoints draws the circle whose edge passes through
three points, as a live ellipse with the current paint, in one undo
step. The points come from `points` or, when it is left out, from the
three selected anchor points: anchor points selected with Direct
Selection, or all the anchor points of a path selected whole. The ends
of selected segments do not count. The result gives the circle's
center and radius. The circle is not pixel-aligned, even while Align
New Objects to Pixel Grid is on, so it stays through the points.
Two points that are the same, or three on one line (twice the
triangle's area at most 1e-10 of its longest side squared), are
refused with a message and nothing is drawn. The center is computed
from the corner opposite the longest side, so nearly collinear points
and points far from the origin keep their precision.
With the Ellipse tool, the first two Shift-clicks place points and the
third draws the circle through the three. After two points the tool
previews the circle through the snapped pointer as a dashed outline;
the preview goes when the pointer leaves the canvas. Once a point is
placed, a Shift-click on the selection's handles or shape widgets
places a point too. Escape, a click without Shift, a drag, a press
without Shift on the selection or a shape widget, and an edit, Undo or
Redo made outside the tool remove the points placed so far. A
Shift-click without a drag used to open the size dialog, as a plain
click does; a plain click still opens it, and so does a Shift-click
while the perspective grid shows with an active plane, so that shape
still goes on the plane.
Docs: docs/mcp.md, ROADMAP. Messages translated in the 24 catalogs
with complete messages.