When the refit keeps an anchor at a closed path's old start, Simplify
and Smooth now start the path at that anchor, even where a segment of
the refit crosses the path at the same point. Before, a crossing
segment that came first could be split there instead, adding an anchor
and changing the segment the path starts along.
When a direct-selected run holds a closed path's first anchor, Simplify
and Smooth now look for the new start on that run alone, so an
unselected segment that passes through the old start is not split.
When the first anchor stays, the path already starts there and is left
as it is.
When several refit points tie for nearest to a closed path's old start,
the earliest-along-the-path tie rule now places each distinct point on
the old path once, so many segments meeting at one point no longer
search every old segment once each. The tie rule is unchanged. Also
"the same way around" in the docs.
Simplify and Smooth refit a closed path from its first corner and kept
that order, so the path's first anchor moved and its dashes started
somewhere else. A refit now starts at the old first anchor when it keeps
one there, otherwise at a new anchor where the refit passes nearest that
point while the result still has fewer anchors than the path had, and
otherwise at the refit's nearest anchor. Its direction stays the same.
A direct-selected run across the start follows the same rule; before,
the path started at the run's end anchor.
The Smooth tool's start_nearest moves into vectorcraft-pathops, and both
commands call it with the limit on anchor count above.
The touching-run search looked up the sample before each angle with a
linear scan over the run, so a long run of samples within the tolerance
cost time in proportion to the square of its length. It now collects the
run's sample angles once and uses partition_point, which gives the same
sample at every angle.
When two or more neighboring sampled normal angles all came out within the
touching tolerance, the root search took the run as one place where the
outlines touch and returned a single line at its middle. A point just
outside a circle, with both of its tangents on neighboring samples, then
got one line that misses the circle instead of two.
The search now looks between each pair of those samples for a value that
leaves the tolerance, and finds the roots between those places: a crossing
where the sign changes, a dip where it does not. A run that stays within
the tolerance, as at a corner, still gives one line.
When the same segment appears more than once among the second segments,
its roots were found once per copy, and each copy's places were checked
against every second segment. The sorted places now drop exact repeats
before they are checked. Places that differ, however close, are all kept,
so the circles found do not change.
With a radius, each second segment is searched on its own, and each
circle is then checked against all of them. Before, one search over the
nearest of the second segments found one circle where two segments
touched circles between the same two places tried along the first
segment, so the tool could not pick the other.
Follows #8526.
Bridging many circles refused a selection with more than 8000 pairs
within reach before the necks too thin for the shape's precision were
dropped, so a selection that leaves fewer than 8000 bridges was refused.
The 8000 limit now counts the pairs that are left; the bound on the
candidate pairs to check stays.
The progress doc no longer says two circles are bridged at any
distance: Reach does not limit them, but the radius can still be too
small to bridge them.
A point counts as on the path's outline when it is less than the
touching tolerance from it, with its distance from the path's center in
place of the distance between centers. The params text, docs/mcp.md and
the progress doc now say so, and say that every Tangents choice in the
dialog gives the same lines for a point.
Tests: a point half the tolerance inside and outside a circle gets the
one line there, and farther off gets none or two; a point placed on a
turned outline gets a line as long as the outline is wide along it; the
dialog previews the same two lines for every Tangents choice and keeps
them as one step, and a point inside changes nothing and says why.
- A canceled press on the second segment (a canceled touch, a second
finger) draws nothing and leaves the first segment picked. A canceled
press that picked the first segment leaves no segment picked. Before
this change a canceled press worked as Escape and forgot the first
segment.
- Shift pressed or let go during a click on the second segment, before
the pointer moves far enough to start a drag, counts at the release:
the circle is looked for again with or without the tool's radius.
- A session test sends the tool's release with a command that fails and
checks that the first segment stays picked.
- The radius option's test checks that a value outside 0.01 to 1000000,
or one that is not a number, leaves the radius as it is.
Docs: docs/target-app-parity.md lists every kind of circle the tool
leaves out: circles whose nearest point on the second segments is not on
the circle, circles that cross the first segment, circles that touch
both segments at one point, circles without a finite radius above 0, and
circles too small or too large for three of their points to give them
back. A circle found twice is kept once. docs/mcp.md says that in a
drag the circle touching nearest the press is drawn, and that the
radius option is not checked yet.
Part of #7178.
- 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.
A point worked out on an outline lies a rounding error inside or outside
it. The new test places a point at 37 angles on a turned ellipse, and on
each anchor and three places along each segment of a turned and moved
Bezier circle, and checks that each gets exactly one line through it.
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.
The bridge's distance and arc-center math no longer squares lengths, so
circles larger than about 1e154 pt are bridged instead of refused, and
an outline that would not fit in f64 is refused instead of written with
non-finite anchors.
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 crossing search splits curves into pieces until each lies within
0.0001 pt of its chord, and takes the place where two chords cross.
Where a line meets an arc at under a degree, that place sat up to
0.025 pt along the arc from the real crossing, so Trim at Crossings,
its hover and Add Points at Crossings cut there.
Each place found is now moved onto both curves with Newton's method on
a(s) = b(t). The move is kept only when it stays within both segments,
ends closer than 1e-9 pt, and moves no farther than a piece bent by
0.0001 pt can shift a crossing at that angle; otherwise the place stays
as it was.
The crossing search took a crossing only where the straight pieces it
splits two curves into actually cross. A line trimmed at a curve ends
where that search found the crossing, up to about 0.0001 pt off the
curve. Once the curve was cut as well, its segments were split
differently, the line's end could fall just short of them, and the end
no longer counted as a place on the curve. Trim at Crossings then
removed the curve past that line, to the next crossing or the whole
path.
An open end of a path that lies within 0.001 pt of another path now
meets it at the nearest point there, at any angle. Corners of a path
and closed paths keep the exact test, and paths that lie along each
other still don't cross. Trim at Crossings and its hover, Add Points
at Crossings (with and without cut) and the Join tool's trim and join
of crossing paths use this search. The params text of Trim at
Crossings and Add Points at Crossings and docs/mcp.md say so.
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.
With three or more circles and no pair that can be bridged, the error
suggested a larger radius or gap when the largest one bridged a single
pair on its own, even when that pair's neck was still too thin to unite
among the other circles. The suggestion now uses the same rules as the
many-circle bridge (`bridges_any` in `vectorcraft-pathops`).
The command's params text, `docs/mcp.md` and `docs/ui-parity.md` now say
that a pair within reach also gets no bridge when its neck would be
thinner than the precision its shape is united at.
The bridge module defined a second Circle with the same fields and derives as tangent_circle::Circle, and pathtools re-exported the tangent one as TangentCircle. The bridge now imports the existing type, pt::Circle names it again as on main, and the tangent circle command's annotation is back to pt::Circle.
With three or more circles, a pair just inside the arcs' limit can have
a neck far thinner than the precision the shapes are united at, and the
union could drop it while the pair still counted as joined. Each set of
connected circles is now united at a precision fine enough for its
smallest circle, and a pair whose neck is narrower than twice that gets
no bridge, the same as a pair too far apart for the arcs.
The centerline was left out whenever the two centers were less than 1e-9
points apart, so two separate paths a billionth of a point wide got their
tangents but no centerline. Centers now count as one point only when they
are closer than a billionth of the larger path's size.
The convexity check compared points sampled along each segment and the
curvature inside each segment, but not the corner where one segment meets
the next. A segment that leaves its start a little the wrong way could make
an inward corner that neither check saw. Each join is now checked by the
directions the two segments meet it in, skipping segments of no length.
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.
The thin-ellipse test now also turns the figure 30 degrees and checks
that each line still ends at the ellipse's tip. A determinant four
times its rounding is accepted and one equal to its rounding is
refused, so the limit is tested on both sides.
The comment on the limit said the opposite of the rule: an ellipse is
measured exactly when its determinant is larger than the rounding of
its entries. The segment counter used by the tests is declared next to
the function it counts, and the estimate in the work test is corrected
to about 8,000 measurements per tangent.