Commit Graph
1172 Commits
Author SHA1 Message Date
2ez4gcxandClaude Opus 5.5 3532ddf65e fix(doc): look layers and blocks up by name through an index, so crafted files don't open in quadratic time
Drawing::layer scanned every layer, and Drawing::block scanned every block when the exact name
missed. Both run once per entity while a drawing is read, measured and inspected, so a file with N
layers, or with N blocks and N references to blocks it doesn't have, opened in N² comparisons
(40 000 missing-block references: 75.7 s in a dev build; 40 000 layers: 6.8 s).

Drawing::layers is now a NamedList<Layer> and Drawing::blocks a NamedMap<Arc<Block>>. They read
and change as the Vec and BTreeMap they wrap, and keep an index from a keyed hash of the
case-folded name to the first entry of that hash. A hit is checked against the name and falls back
to the scan, so results are the same as before: same case rule, first match in table order, exact
block name first. Every change goes through DerefMut, which drops the index; a clone (undo
snapshot) shares it. The index is built only for tables of 64 entries or more, after 32 scans
since the last change, so code that changes a table between lookups costs what it did.

Part of #1924 (F-04).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:07:49 +07:00
Tanish Manku 33d46f3a00 Merge #2808: EXTRIM: trim everything crossing one cutting edge on the side picked 2026-11-24 21:16:52 -07:00
Tanish Manku a992e3198b Merge #3382: TRIM highlights only the piece a click removes, EXTEND what it adds (fixes #1118) 2026-11-24 21:16:32 -07:00
okereke-dev c7e6b10f42 EXTRIM: find each stretch on the object itself, report one it can't find (review on #2808)
A large arc's flattened outline strays from the arc by up to a millionth of its radius, more
than the tolerance next to a short edge, so a stretch's pick could miss every piece and the
object was still counted as trimmed through. The pick is now brought onto the object's exact
lines and arcs and the pieces are measured exactly; a stretch still not found counts the object
as uncut. The menu entry moves to Additional Tools, and the es/zh rows go (feature PRs add
English only).
2026-11-24 22:38:00 -05:00
Tanish Manku 408927c8a8 Merge #3105: Add Tamil (ta) to the interface languages; pasted table cells keep backslashes and braces as text 2026-11-24 20:32:18 -07:00
Tanish Manku feec896112 Merge #3290: feat(table): paste Excel TSV as native TABLE using craft-csv 2026-11-24 20:31:30 -07:00
okereke-dev e1766b2191 Merge remote-tracking branch 'upstream/main' into feat/extrim 2026-11-24 22:28:22 -05:00
okereke-dev 3c7427d2bb TRIM preview: refresh after a fence point is taken back, and cap the Fence preview
The rollover highlight's cache key now counts the running command's answers, so Undo at the
fence prompt redraws the preview without the cursor moving. A Fence or Crossing preview works
out at most 64 picks; past that it shows no part highlight, and the fence still trims them all.
2026-11-24 22:27:54 -05:00
Tanish Manku 6e48d4b250 Merge pull request #3467 from storytold/stack/u11
Land #3231, #3394, #3457: Dynamic Input Tab cycle, Array window, lone user alias opens its dialog
2026-11-24 20:24:01 -07:00
okereke-dev f8fe736221 Merge remote-tracking branch 'upstream/main' into feat/trim-preview
# Conflicts:
#	crates/engine/src/cmd/modify.rs
#	crates/engine/src/guard.rs
#	crates/engine/src/prompt.rs
#	crates/engine/src/session/interactive.rs
2026-11-24 22:20:54 -05:00
vantruong-dang b8818c78b1 Merge remote-tracking branch 'origin/main' into feat/paste-table-tsv
# Conflicts:
#	crates/engine/src/session/interactive.rs
#	crates/ui-egui/src/clipboard.rs
#	crates/ui-egui/src/menus.rs
2026-11-25 10:14:06 +07:00
Tanish Manku 51b07ec42a Merge pull request #3419 from storytold/land/3375
Land #3375: PDFIMPORT imports a PDF page as editable lines, polylines, solid hatches and text
2026-11-24 20:05:00 -07:00
Tanish Manku 4e1ebc79c2 User alias lookup: a key stored with a capital outside ASCII matches a name typed in lower case 2026-11-24 20:04:41 -07:00
Tanish Manku 2a4dc14672 Merge #3457: a lone user alias of a UI command opens its dialog; landing fixes (alias lookup past ASCII capitals, Array window id without a lint allow) 2026-11-24 19:29:40 -07:00
C00kieMonsta d7088aab34 Merge main into feat/pdf-import
main gave HatchLoop a boundary_flags field, so the gate's merge build
no longer compiles the PDF importer's loops.
2026-11-25 01:48:22 +00:00
C00kieMonsta 13b956c166 PDF import: convert to US survey units (INSUNITS 21 to 24)
Survey feet, inches, yards and miles fell through to the millimetre
case, so a page imported into a drawing in survey feet came in 304.8
times too large. A survey foot is 1200/3937 m.
2026-11-25 01:26:59 +00:00
kc8a 2ecf474da8 feat(ui): live Array dialog for ARRAYRECT and ARRAYPOLAR
Bind an Array window to the running rectangular/polar array commands: fields apply live in both directions while the command-line prompts and canvas preview stay active.
The polar window exposes Items, Angle between, Fill angle, Rows and Levels; the centre must be specified before OK commits.
The preview stays visible while the pointer is over the window.
2026-11-25 00:25:59 +00:00
moandClaude Fable 5.2 8bc673130f fix(ui-egui): input to the running command drops a held paste
A paste asked for while another command runs waits for the system
clipboard before it takes over. Input given in that time (a coordinate
typed or picked for LINE) answered the running command's prompt, and
the paste then cancelled that command anyway. The session now counts
the inputs it is given, a held paste remembers the count, and it is
dropped when input arrived before the clipboard was read.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 18:34:43 -05:00
Tanish Manku 94b1174806 Merge main (after #3454, #3455); a block's image is hit on the outline of what it shows 2026-11-24 15:32:15 -07:00
Tanish Manku d538a468e4 Merge pull request #3455 from storytold/stack/u10
Land #3368, #3390, #3399, #3405, #3392, #3411, #3366: Thai PDF text, layout plot settings, Polish strings, dimension inline editor, table cell text, ATTDIA, system clipboard paste
2026-11-24 15:31:19 -07:00
Jarek Jastrzębski a13cbdc883 Command line: a lone user alias of a UI command opens its dialog
A user alias typed alone routes as its command in the interface, so an
alias of HATCH (KR) opens the Hatch dialog as HATCH does, also when typed
with the Greek layout active (ΚΡ). With more on the line (KR P ANSI31)
it goes to the engine as before, which runs the command with those inputs.
2026-11-24 23:26:32 +01:00
Tanish Manku f80dbb461a Merge pull request #3454 from storytold/stack/p1
Land #3425, #3426, #3095, #3435, #3439, #3437: hatch edge, dependency prune, tilt check, proxy graphics follow-ups, kept dimensions
2026-11-24 15:23:27 -07:00
Tanish Manku c1f771d5cd Merge pull request #3424 from storytold/stack/b1
Land #963, #993, #1752 (with #1030, #1098, #1699, #1723): dynamic block references rotate, flip, array, scale, align and look up
2026-11-24 15:04:29 -07:00
Tanish Manku d71f2b9584 Crossing selection: a block's image is tested by what it shows, not by its unclipped corners 2026-11-24 14:36:50 -07:00
Tanish Manku 8d3e176aa8 Merge #3445: Select block references by drawn geometry in crossing windows 2026-11-24 14:36:33 -07:00
Tanish Manku 5d8bfff1d4 Merge #2903: Select: a blank MTEXT is picked inside its box (fixes #2810) 2026-11-24 14:36:31 -07:00
Tanish Manku 59e7a0b178 Merge #2969: fix(engine): preserve hatch direction when mirroring 2026-11-24 14:36:27 -07:00
Tanish Manku df624b7a49 Merge #2977: fix(engine): respect DIMASSOC1 for new dimensions 2026-11-24 14:36:25 -07:00
Tanish Manku 5b4bbd933c Merge #2972: test: make non-Unicode filename fixtures portable on macOS 2026-11-24 14:36:21 -07:00
Tanish Manku 6deb10f4a8 Merge #3152: Images: IMAGEATTACH refuses a wrongly typed at, scale, rotation or name 2026-11-24 14:36:19 -07:00
Tanish Manku b2c35cd100 Merge #3151: Images: loaders start a file only while its largest size still fits the loaded-image limit 2026-11-24 14:36:17 -07:00
Tanish Manku 137c8e8a08 Merge #3431: Use dimension text height for DIMSPACE Auto 2026-11-24 14:36:15 -07:00
Tanish Manku 7f5750dc1f Merge #3446: SPLINE: handle Method and Object at the CV first-point prompt 2026-11-24 14:36:14 -07:00
Tanish Manku 6d5bc58b72 Merge #3366: Edit > Paste and typed PASTECLIP read the system clipboard, like Ctrl+V (#3320) 2026-11-24 14:35:31 -07:00
Tanish Manku 603852d47e Merge #3411: INSERT: ATTDIA and the Edit Attributes dialog (repair of #2376) 2026-11-24 14:35:28 -07:00
Tanish Manku 6db635aadb Merge #3437: keep proxy graphics on their layers when the layer table changes (#3094) 2026-11-24 14:34:57 -07:00
Tanish Manku 8fb4d81338 Merge #1752 again: the six review fixes (array budget, alignment grips, frozen layers) 2026-11-24 14:28:29 -07:00
mo 0f62df0b35 Merge main into paste-os-clipboard
# Conflicts:
#	apps/cadcraft/src/native_menu.rs
2026-11-24 13:48:55 -05:00
Yohanes Yuen afb53d5357 Fix block ray and clipped image crossing selection 2026-11-25 01:15:21 +08:00
Cody VogtandClaude Opus 5.5 ced6984630 Alignment grips: targets stay on a ray and off layers frozen in the viewport
The alignment search projected the cursor onto a ray as if it were an
xline, so a point behind the ray's base could be the target; behind it the
base is now the nearest point. It also passed no frozen layers, so an object
on a layer frozen in the active MSPACE viewport (not drawn there) could be
aligned with; `nearest_with_direction` now takes the viewport's frozen
layers, as the osnap search does.

Review of #3424 (CodeRabbit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 10:46:32 -06:00
Walter Haslbeck 8c2852fd2d Snaps: dimensions inside blocks reach their block; the block moves with group 12 as drawn 2026-11-24 16:11:26 +01:00
Walter Haslbeck a4b15ec5f1 Kept dimensions: place the block reference at its base point, ByBlock transparency and plot style; snaps follow it 2026-11-24 14:59:21 +01:00
bic98andOpenAI Codex 1a0363905b SPLINE: handle Method and Object at the CV first-point prompt
Co-authored-by: OpenAI Codex <noreply@openai.com>
2026-11-24 22:04:03 +09:00
Yohanes Yuen 15d2a63b45 Use block geometry for crossing selection 2026-11-24 20:36:48 +08:00
bic98andOpenAI Codex 877ce87557 SPLINE: ask again when the CV degree is fractional
Co-authored-by: OpenAI Codex <noreply@openai.com>
2026-11-24 21:32:04 +09:00
Walter Haslbeck 3ac368c013 Kept dimensions reference their *D block instead of copying it
Review: copying block contents into the graphics multiplied nested
dimensions exponentially, missed nested pictures and the block's draw
order. One reference to the block lets the renderer's depth and size
limits, nesting and SORTENTS apply as for any block reference. PURGE keeps
the block a kept dimension names; picking uses the drawn block.
2026-11-24 12:08:09 +01:00
Walter Haslbeck a4aa6cfa68 fix: keep proxy graphics on their layers when the layer table changes (#3094)
Proxy graphics name layers by their index in the file's LAYER table.
- Layers proxy graphics draw on count as used for PURGE and layer.delete,
  as in AutoCAD.
- Drawing::proxy_layers keeps the file's layer order under current names;
  saving turns each ATTRIBUTE_LAYER index into the written table's, so
  purging a layer before them no longer moves the graphics (AutoCAD itself
  saves the old indices).
- RENAME, LAYMRG and LAYDEL update the decoded graphics and that list.
- A LAYER or LTYPE record without a handle or name keeps its place in the
  index lists, so the records after it don't shift (review of #3423).
2026-11-24 09:25:46 +01:00
cloutier a888218786 fix(engine): use dimension text height for DIMSPACE Auto (#3429) 2026-11-23 22:36:37 -05:00
code-compliant 2017653a14 Correct the ATTDIA default in the system variable table comment 2026-11-24 11:26:49 +08:00
code-compliant d759668ff6 INSERT: a point does not answer an attribute prompt; ATTDIA defaults to 1
A canvas click reaches INSERT as Input::Point while the attribute prompts wait. The Attribs arm treated any non-text input as the default and advanced, so the dialog closed and the first attribute took its default. Ignore Input::Point and keep prompting, as Verify does; Enter still keeps the default.

Set ATTDIA's session default to 1, AutoCAD 2026's initial value, and update tests that assumed 0 to set it explicitly. Add tests for a point at the plain command line and a canvas click with the dialog open.
2026-11-24 11:16:51 +08:00