Commit Graph
1852 Commits
Author SHA1 Message Date
Tanish Manku 7316bbf019 Stack u1: the removal test writes its script lines as escapes 2026-11-20 03:15:47 -07:00
Tanish Manku 5aa29f371c Stack u1: STRETCH removes the object named at Remove objects, not another lying on it
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.
2026-11-20 02:57:01 -07:00
Tanish Manku 25c2de3abd Merge remote-tracking branch 'origin/main' into stack/u1 2026-11-20 02:57:01 -07:00
Tanish Manku 171ac51127 Merge pull request #3312 from storytold/stack/d2
TRIM/EXTEND stack: land #2548, #2550, #2648, #2693, #2104, #3183, #2759
2026-11-20 02:49:14 -07:00
Tanish Manku 5e4bbe5947 Merge pull request #3309 from storytold/stack/u3
Paper units stack: land #3257, #2888, #1866 (metric sheets in mm, model plots in the paper's units)
2026-11-20 02:37:59 -07:00
Tanish Manku a1d92d9952 Merge pull request #3308 from storytold/stack/u2
Interface stack: land #1279, #1452, #1867, #2443, #3077 (the interface can always be restored)
2026-11-20 02:37:13 -07:00
Tanish Manku b61a19d962 Merge pull request #3306 from storytold/fix/f06-budgets
Bound the geometry a drawing can expand into (F-06a, b, c)
2026-11-20 02:36:34 -07:00
Tanish Manku bf1d872e5f Merge pull request #3304 from storytold/stack/t1
Security stack 1: land #1276, #2820, #2821, #2765 (handles, SHX cache, SVG and LISP input, oversized images)
2026-11-20 02:36:09 -07:00
Tanish Manku 276424aee3 Stack d2: Esc after BREAK's pick clears it; trim self-cuts near open ends and two-arc loops; crossing pick before a near cut
- 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.
2026-11-20 01:47:21 -07:00
Tanish Manku ab214cf272 Stack u2: dropping a tiny saved window rewrites app.ron through a temporary file
A failed write (a full disk) now leaves app.ron as it was, keeping the other
saved settings, instead of truncating it.
2026-11-20 01:45:31 -07:00
Tanish Manku 8ab61bce22 Stack t1: a kept object never takes the handle of an unmodeled entity, and entget no longer walks every handle in the drawing
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.
2026-11-20 01:43:38 -07:00
Tanish Manku cec00d458b Stack u3: resubmitting a layout's own paper keeps its paper units
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.
2026-11-20 01:40:36 -07:00
Tanish Manku cc812a5558 Stack u1: a double-click on a hatch opens Hatch Edit without starting a grip edit
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.
2026-11-20 01:06:09 -07:00
Tanish Manku 05d4e64ad2 Merge pull request #3298 from storytold/docs/roadmap-priorities
docs: alpha gate revised from user reports; priorities in three tiers
2026-11-20 01:04:02 -07:00
Tanish Manku 60233f87ff docs: gate criteria check object content; tier 3 items are carved out of the beta checklist 2026-11-19 19:13:56 -07:00
Dylan M. Taylor 23a599dcd6 Merge pull request #3026 from cdwilson127/fix/3011-mcp-find-text-query
MCP: find_text takes `query` as its filter; stylesmanager set replies with what changed
2026-11-19 19:44:39 -05:00
Dylan M. Taylor a1f5481cf9 Merge pull request #3035 from cdwilson127/fix/2988-getvar-point
LISP: getvar returns a point list for point system variables (LIMMIN, SNAPBASE, INSBASE, ...)
2026-11-19 19:43:25 -05:00
Tanish Manku 80c6e07415 render: budget the points wide polylines sample (#1922 F-06a)
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.
2026-11-19 15:52:33 -07:00
Tanish Manku 8d78cd0959 io: budget the points hatch boundary curves are read into (#1922 F-06c)
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.
2026-11-19 15:52:33 -07:00
Tanish Manku fba309f8a6 render: budget the points one drawing builds (#1922 F-06b)
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.
2026-11-19 15:52:33 -07:00
Tanish Manku d1cb40332b Stack u2: #3077: collapse the nested if (clippy) 2026-11-19 15:42:50 -07:00
Dylan M. Taylor e072b680d6 Merge pull request #3297 from storytold/feat/share-lin-pat-parser
doc: share .lin and .pat text parsers via craft-dxf
2026-11-19 17:40:27 -05:00
Tanish Manku 198c36b406 Merge #2765: images refuse oversized data before decoding 2026-11-19 15:33:03 -07:00
Tanish Manku 2101a81d62 Merge #2821: hostile-input fixes for SVG import and AutoLISP step accounting
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.
2026-11-19 15:32:44 -07:00
Tanish Manku 2827ccb6c8 Merge #2820: SHX fonts: a points bound on the glyph cache 2026-11-19 15:31:26 -07:00
Tanish Manku 8ec1e9a0a5 Stack t1: #1276: the reader's band reservations end with the read
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.
2026-11-19 15:30:55 -07:00
Tanish Manku b184454275 Stack t1: #1276: run the exhausted-handles DXF round trip (#1921)
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.
2026-11-19 15:30:10 -07:00
Tanish Manku 077c054d18 Stack t1: #1276: bound the writer's handle walk
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.
2026-11-19 15:29:58 -07:00
Tanish Manku 5eafcc93bb Stack t1: #1276: records added on save after the top handle take free handles
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.
2026-11-19 15:29:48 -07:00
Tanish Manku 7c366f7b5a Merge #1276: a handle at the top of the range leaves new objects their own
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.
2026-11-19 15:29:11 -07:00
Tanish MankuandAldo Zarate d1d2e5788a Stack u1: #1555: tests for clicks made while moving in STRETCH, MOVE and TRIM
#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>
2026-11-19 15:25:16 -07:00
Tanish Mankuandaustin62jake fa4b6d136d Stack u1: #1555: a slow click on a grip makes it hot
#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>
2026-11-19 15:25:16 -07:00
Tanish Manku 9787da7015 Stack u1: #1748: rustfmt the Right-Click Customization window's mode groups 2026-11-19 15:25:04 -07:00
Tanish Manku 8b19ba1ff9 Stack u3: #1866: a model plot on an inch sheet is in inches whatever MEASUREMENT says
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.
2026-11-19 15:23:13 -07:00
Tanish Manku 6ff59c0ada Merge #3183: TRIM/EXTEND: Space enters an option at the mode, projection and edge prompts 2026-11-19 15:23:01 -07:00
Tanish Manku d49ea7e586 Stack u1: #1748: Default and Edit modes decide only with the time-sensitive right-click off
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.
2026-11-19 15:22:58 -07:00
Tanish Manku 7001f74839 Merge #1866
# Conflicts:
#	crates/render/src/paper.rs
2026-11-19 15:22:40 -07:00
Tanish Manku 0b060ec96a Stack u3: #2888: a paper from the page's device sets the layout's paper units too
#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.
2026-11-19 15:22:16 -07:00
Tanish Manku 9a4347a08d Merge #1748: a quick right-click is Enter between commands too
# Conflicts:
#	contributors/people.toml
#	crates/ui-egui/src/canvas.rs
#	crates/ui-egui/src/context_menu.rs
#	crates/ui-egui/src/options.rs
#	docs/ui-parity.md
2026-11-19 15:21:49 -07:00
Tanish Manku c6bb366ad4 Merge #2888 2026-11-19 15:20:43 -07:00
Tanish Manku 4831f26ca6 docs: alpha gate revised from user reports; priorities in three tiers 2026-11-19 15:20:38 -07:00
Tanish Manku 01a2f973c9 Merge #3257 2026-11-19 15:20:25 -07:00
Tanish Manku 48a18c882b Merge #2070: show pickbox-only cursor at command object-selection prompts
# Conflicts:
#	crates/ui-egui/src/canvas.rs
2026-11-19 15:19:55 -07:00
Tanish Mankuandgraficaeusebio-cloud b7d5ed3401 Stack u2: #1279: test that Options reset also brings back the status bar and command line
Carried over from #1283's test, which also covered the status bar.

Co-authored-by: graficaeusebio-cloud <224763601+graficaeusebio-cloud@users.noreply.github.com>
2026-11-19 15:19:53 -07:00
Tanish Manku 1341b42127 Merge #1555: Canvas: clicks count when the button goes down, even while the mouse moves
# Conflicts:
#	crates/ui-egui/tests/it/main.rs
2026-11-19 15:19:39 -07:00
Tanish Manku 6b767073d8 Stack u2: #1279: Options reset keeps the user's shortcuts and remembered folders
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.
2026-11-19 15:18:53 -07:00
Tanish Manku 7bcfe25938 Stack u2: #1452: a Chinese label for MENUBAR's Menu Bar
main requires a Chinese label for every command (chinese_menus_and_commands_are_fully_translated);
the new MENUBAR command's label had none.
2026-11-19 15:18:13 -07:00
Tanish Manku 129dd86ef2 Stack d2: #2648: an arc's pick off its sweep goes through seg_param
#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.
2026-11-19 15:17:16 -07:00
Tanish Manku 3886fb952d Merge #3077 2026-11-19 15:17:16 -07:00
Tanish Manku 6c9eedd7e1 Merge #2443 2026-11-19 15:17:16 -07:00