The removal prompt picks one object since #2070, so an object given by name
arrives as a point. STRETCH looked the point up itself and could find a
different object lying there. It now asks the session, which returns the
named one.
- BREAK and BREAKATPOINT drop the selection their pick made when cancelled
after it, as Enter does.
- A polyline that is its own cutting edge is cut where it crosses itself near
its open start or end in parameter but not in length (a long first or last
segment).
- A retained piece of two arc spans whose ends meet is closed.
- A crossing window's pick is kept 1e-6 from a segment's end, not the window
tolerance, so it stays before a cut near that end in a large window.
When a save numbers the kept foreign objects, the handles of the entities of
unmodeled types placed after them are now held too, so a kept object cannot
repeat one. AutoLISP's entity groups no longer collect the drawing's handles on
every call: the handles made there only go on the entity's later records, which
are dropped.
The Plot dialog's Apply to Layout sends the layout's paper every time. PAGESETUP
now sets paper units from the paper only when the paper changes, so an explicit
millimetre or inch choice survives an Apply that leaves the paper as it was.
The press on a grip that #2813's fix remembers clicked the grip when the
button came up, also on the second click of a double-click. On a selected
hatch that click lands on the centre grip, so the Hatch Edit dialog opened
with a grip edit running behind it. The second click of a double-click
with no command running no longer clicks a grip, as before the change.
Caught by double_clicking_a_hatch_opens_the_hatch_edit_dialog.
The filled band of a wide polyline and the centre line of a dashed one
sampled every arc segment with no total, as Polyline::tessellate did
before #2723. Both now spend the same MAX_TESSELLATED_POINTS budget per
polyline; past it the remaining arcs are chords.
An elliptic or spline HATCH edge is a few groups in the file but up to
about 4,000 points once read. The edges of one hatch now share at most
4M points and all hatches of one file 16M; past that an ellipse edge is
read as 9 points and a spline edge as its control (or fit) points, and
the read notes say how many hatches were read coarsely.
MAX_BLOCK_EXPANSION counts objects, not their size, so two million block
copies of one finely tessellated object could build billions of points.
Every polyline, triangle, point, ray and image corner is now charged to
one MAX_DISPLAY_POINTS (64M) budget shared by the whole build: parallel
parts, XCLIP parts and viewport contents. Past it nothing more is drawn,
block copies stop being visited and DisplayList::truncated is set, which
now also survives joining the parts of a parallel build. Primitive
offsets are converted with u32::try_from instead of wrapping.
No textual conflict, but main's #2072 (Nov 18) and this PR both fixed the
transformed-ellipse axis: #2072 takes the eigenvector of B*B^T (a drawing-
plane direction), this PR the eigenvector of B^T*B mapped through B. The
clean merge mixed the two (B*B^T's eigenvector mapped through B again).
Kept #2072's computation and this PR's convention that `major` is the axis
from the centre: major = axis * s_max. #2072's test measured `major - centre`
(the old absolute-point convention); it now reads `major` itself.
reserved_handles only bridges a record read before its section is placed.
Kept on the drawing it was cloned with every undo snapshot, one entry per
band handle a file names. Once every record is placed the objects keep their
handles from new ones themselves, so the reader empties it.
The writer now numbers its records past the top of the range in the
reserved band, skipping the drawing's handles, so the save no longer
repeats the model space record's handle.
W::next_handle looped until it found a free handle; with the wrap into the
reserved band it could only end by finding one. Bound it by the count of
handles in use, as Drawing::next_handle is. Not reachable in practice (it
needs four billion objects), so there is no test.
Kept objects and missing application ids are numbered above the largest
handle written. When a file's object holds FFFFFFFFFFFFFFFF that count
saturated, so every added record was written with the object's handle.
Number them past the top in the reserved band instead, skipping handles
already written, with the walk bounded by their count.
Conflict in Drawing::new_handle/next_handle with #2514. The resolution keeps
both rules: next_handle (HANDSEED) skips the handles of the file's objects
CADCraft rewrites (foreign.handles, #2514), and in the reserved band above
HANDLE_LIMIT also every handle an object or a reserved file record holds
(#913, #1921); off the top of the range it continues at the bottom of the
band, and new_handle takes exactly what next_handle reports.
The scan over all spaces and block definitions runs only for a candidate in
the band: below it the seed is kept above every object's handle. The walk is
bounded by the count of held handles, counted only once a handle is skipped.
#1001 names STRETCH and TRIM; #1555's tests cover MOVE, idle picks,
window corners and CPOLYGON. These cases from #1059 check that a click
made while the mouse moves counts where the button went down in
STRETCH (pick and window), MOVE (pick, and a slow drag is a window),
TRIM, with no command running, with PICKDRAG off, at a click-click
window's second corner, and over overlapping objects with selection
cycling. #1059's fast-long-drag case is left out: under the press-first
model a quick release is a click however far the mouse went.
Co-authored-by: Aldo Zarate <azarate@azf.com.mx>
#1555 acts on presses where the button goes down, but leaves grips (no
command running) to egui's click. egui calls a press held longer than
0.8 s a drag, and on a drawing that draws slowly an ordinary click lasts
that long, so the grip ignored it (#2813).
A press on a grip is now remembered and clicks the grip when the button
comes up within the press tolerance, however long it was held; a drag
from it still does nothing. #2853's slow-click tests come along: the
grip case fails without this change, the others pin press-first clicks
across slow frames.
Co-authored-by: austin62jake <340374338+austin62jake@users.noreply.github.com>
apply_model_paper_units could only clear paper_mm, and an unset unit falls back to
MEASUREMENT, so in a drawing with MEASUREMENT 1 a model plot on ANSI A at 1:1 came out in
millimetres, 25.4 times too small (the case CodeRabbit raised and the review confirmed). With
PageSetup::paper_mm now an Option (#3257), the model plot's units are set explicitly.
With #1748 a quick right-click between commands is Enter whenever the
time-sensitive right-click is on, and a longer click opens the shortcut
menu. Main's Right-Click Customization (#2371) still let Default and Edit
modes set to "Repeat last command" take every idle right-click, so a
longer click repeated the command instead of opening the menu.
As in AutoCAD, the modes now apply with the time-sensitive right-click
off, and the window greys them out with it on, as it does Command mode.
The Right-Click Customization tests set the option off where they test
the modes; a new test holds the button with both modes on repeat.
#3257 makes PageSetup::paper_mm an Option: a metric paper now sets Some(true) and an inch
paper None (follow MEASUREMENT), as #2888 intended. The rule ran only for a paper looked up
among the standard sizes, but with a device chosen (the built-in CADCraft PDF/PNG/SVG list
every standard size) Page Setup's paper comes from the device's list, so ISO A0 was still
46.81 x 33.11 inch units there (#2836). The rule now applies to any picked paper that is a
standard size.
The reset now rebuilds the whole interface state so hidden bars come back (#1240), but that
also dropped the user's keyboard shortcuts and the APPLOAD and .pgp folders, which the old
reset and Window > Reset Palettes keep.
#2648 sent an arc pick outside its sweep to the nearer end with its own copy of the rule that
#2693 put in curves::seg_param. TRIM of an arc now uses seg_param, so the rule is in one place.
No change in behaviour: an_arc_picked_just_off_one_end_loses_the_piece_at_that_end covers it.