check() takes a read-back with no answer within 10 s as a pass, so the
device test that called it couldn't tell an answered read-back from a
timeout (it took 10.9 s on the Linux CI runner). Call clear_and_read and
require Ok(true) for both passes, naming the adapter and the time taken.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
When the first start of the window's graphics fails, run eframe again in the
same process with the next attempt instead of exiting:
- the start as it always was (DirectX 12 alone on Windows, eframe's backends
elsewhere);
- OpenGL alone, where those backends have it beside another;
- the same backends on a software adapter (WARP, llvmpipe).
Each is tried with a stencil buffer, then without. No attempt creates a
backend the first one didn't, so Windows still never creates OpenGL (#31).
What failed picks the next attempt: an adapter, device or surface error moves
to another adapter; a failure the stencil buffer is part of tries the same
adapter without it. Before the app is created, a clear-and-read-back check
catches a driver that takes the stencil buffer and draws nothing (#1724's
Mesa log). A canvas whose GPU pipelines are refused draws on the CPU.
WGPU_BACKEND and CADCRAFT_STENCIL still win. Nothing is remembered between
starts. The log and the status bar say which renderer draws and why. When
every attempt fails, the first error is returned. A debug-only
CADCRAFT_GRAPHICS_FAULT switch fails one step of one attempt, for testing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The extents estimate a line's shaped width; the fonts measure it. Where the
fonts decide by a cutoff the two could differ, so the extents now assume
the real width is within a factor of 4 of the estimate and take the larger
box unless the estimate is clear of the cutoff:
- Fit text counts as stretched only when its fitted factor clears the
fonts' cutoff by that factor; otherwise it is boxed unstretched.
- A line of next to no width is left as it is by the fonts, so its box no
longer reaches for the second point.
- Aligned text shrunk into a short span is boxed at least as tall as its
own height, which narrow characters reach.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Fit text is stretched by scaling its width factor by span / shaped width
and shaping again. With a span that is a tiny part of the text's width the
scaled factor is too small for the fonts, which then draw at a factor of 1:
the text is far wider than its span, and the extents reported only the
span. The extents now take the unstretched width in that case, as they do
for an unusable stored factor.
Test (render, which sees both): the drawn text lies inside the drawing's
extents for a span too short to fit and for one that fits.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
too_short's margin is TRIM's ON_CUT plus the 3 tol the traced ends and pick can be off by, not
twice ON_CUT. A cutting edge picked before MSPACE or PSPACE moved to another space cuts nothing
there: the preview shows nothing and the trim is refused, so the preview never shows a cut the
trim can't make.
* Load Construction Geometry from the shared Chinese catalog
* Format the shared Chinese catalog validation
---------
Co-authored-by: FredApps <[email protected]>
Require user-defined spacing to exceed the renderer limit in HATCH and SETVAR. Show the exact default spacing, and use a shared scale rule for rendering and DXF definitions.
Measure the rendered spacing before and after a DXF save at the first supported value.
The picker skips a chunk whose cached envelope misses the query. With the
index rebuilt for the new ATTMODE, a box at the constant attribute value
finds the reference through the reused index, as the tree does.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
* feat(offset): OFFSETGAPTYPE extends, fillets or chamfers polyline corner gaps
OFFSETGAPTYPE is a system variable (0, 1 or 2, default 0) kept in the
drawing header. Offsetting a polyline fills the gap at the outside of a
corner between two line segments: 0 extends both copies to meet, 1 inserts
an arc of radius equal to the offset distance centred on the original
vertex, 2 inserts a chamfer line at the offset distance from the vertex.
Inside corners and joints with an arc keep the extended join. OFFSET's
settings echo shows the current value.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* OFFSETGAPTYPE fills only corners the source polyline has; geometry parity headline and history match
* test(offset): OFFSETGAPTYPE fillets and chamfers open outside corners turning either way
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test(offset): interactive OFFSET previews and makes the OFFSETGAPTYPE fill
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Remove a leftover merge file
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* OFFSETGAPTYPE: leave docs/geometry-parity.md to the maintainers
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* Dimension text below the line (\X) and leader text at DIMSCALE (#1055, #1056)
- #1055: in dimension text, `\X` starts the text below the dimension
line (DXF Reference). CADCraft drew only the part before it, and its
*D block held only that part. The part after `\X` is now drawn below
the line, on the other side of it at the same distance (text centred
on the line moves above it), on screen, in plots and in the *D block
as a second MTEXT; text width for the fit is the wider part's.
- #1056: LEADER's annotation was DIMTXT high whatever DIMSCALE said
(0.25 instead of 6.25 beside dimensions at DIMSCALE 25). It is now
DIMTXT × DIMSCALE (the style's, else the drawing's; 1 for annotative
styles), in the style's text style, as AutoCAD's LEADER makes it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Dimension `\X`: measure from the dimension line, not DIMTMOVE 1's leader
The part after `\X` is placed from the dimension line's longest segment, and DIMTMOVE 1's leader
(added by #2015) is drawn as a dimension line too: with the text moved far away, the leader won
and the part below went next to the text. The leader's ends are now kept (`text_leader`) and its
segments skipped. Text moved off its place also leaves the part below at the usual clearance
under the line, instead of as far below as the text is above.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* LEADER text of an annotative dimension style: DIMSCALE, and annotative
With an annotative dimension style the leader's text left DIMSCALE out and was not annotative,
so at an annotation scale it stayed small beside the dimensions. It now takes DIMTXT × DIMSCALE
as a dimension of the style does, and is annotative at the current annotation scale.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* LEADER text of an annotative style: the annotation scale replaces DIMSCALE
An annotative dimension takes the annotation scale in DIMSCALE's place (anno_scaled sets its
scale override), so its text is DIMTXT × the annotation scale. The annotative leader text took
DIMTXT × DIMSCALE and then the annotation scale again: twice the dimension text with DIMSCALE 2.
It is now DIMTXT high and annotative; a non-annotative style still takes DIMTXT × DIMSCALE.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* DIMTMOVE 1 leader is kept as the text leader again
The merge of main moved the leader into dim/linear.rs without the text_leader record, so the
text below the line was placed over the leader.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Keep `\X` text below a suppressed or extension-line dimension line
With DIMSD1 and DIMSD2 both on, no dimension line segment is drawn, so
the part after `\X` was dropped. The linear dimension now records its
whole dimension line (`dim_axis`) and the `\X` layout falls back to it.
With DIMJUST 3 or 4 the text runs along an extension line, so its normal
is across the dimension line's: the text no longer moves onto the
dimension line at the arrow, and the part below stacks under it in the
text's own frame.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* FILLET/CHAMFER with polylines keep the picked side and join two polylines
A line crossing an open polyline's end segment cut the polyline on the
wrong side when the pick was past the crossing: the polyline always kept
the part towards its other end. Each object now keeps the side it was
picked on and drops what lies past the corner, as AutoCAD does.
Two open polylines picked at their end segments were refused. They now
join into one polyline through the corner (the first one picked keeps
its handle and direction), as AutoCAD does.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* FILLET/CHAMFER: a line or polyline joins any straight segment of an open polyline
AutoCAD accepts a middle segment too: an open polyline's end segment
crossing another's middle segment joins them, each keeping its picked
side and dropping what lies past the crossing. Closed polylines and arc
segments are still refused.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* FILLET with polylines: a closed polyline opens to join a line; an arc segment is cut where a line crosses it
Checked against AutoCAD with the same shapes:
- A closed polyline filleted with a line opens at its first vertex: the
picked side of the picked segment joins the line, either side, and the
result is an open polyline. CADCraft refused closed polylines.
- An arc segment crossed by a line (radius 0) is cut where they cross,
keeping its picked side, with the bulge of what is left of it. A line
that misses the arc, or a radius, stays refused, as in AutoCAD.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* FILLET: a pick just before a polyline arc's start keeps the start side
Where the pick lies along an arc segment was clamped to the arc's end, so a pick a little before
its start (within the pick box) kept the end side. It now counts at the nearer end.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* Drawing locks and WHOHAS: say when a drawing is open elsewhere (part of #540)
While a drawing opened from a DWG/DXF/DWT file is open, the app keeps
`.<file name>.cadcraft-lock` beside it (user, computer, app instance,
when opened), touched every minute; a lock not touched for five minutes
is stale. Opening a drawing someone else has open says who and since
when, on the command line and in the status bar, and opens it anyway:
the lock only informs. A lock is released when its drawing closes or is
saved under another name and when the app exits, only ever by the
instance that holds it; a stale one is taken over, and an app that finds
its lock taken over notes it instead of touching it. WHOHAS reports the
holder of the current drawing or of a file. The locks run with the
autosave tick; the format is CADCraft's own, not AutoCAD's .dwl.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Drawing lock: claim a free lock atomically
Two apps opening a drawing with no lock at the same moment could both write it and both think
they held it, so neither told its user until a later heartbeat. A missing lock is now created
atomically (a hard link of the staged file, or create_new without hard links), and a stale one
is replaced only if no other app has taken it meanwhile, then read back. The app that loses is
told at once who has the drawing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* WHOHAS: a `path` that isn't text is an error
A `path` of another type (`{"path": 7}`) was taken as left out, so WHOHAS answered for the
current drawing. Left out or null still means the current drawing; anything but a string is now
refused.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Drawing locks: name the imports of the native module
The workspace now denies clippy's wildcard_imports, which `use super::*`
in drawlock's native module trips after the merge of main.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Autosave: wake up for the drawing-lock heartbeat, not only for autosaves
Autosaver::tick kept the drawing locks but returned only the next autosave,
None with every drawing saved or SAVETIME 0, and the UI only schedules a
repaint on Some. An idle app then never touched its locks: after STALE_SECS
another app took the drawing over without a word. Locks::next_beat gives
the shortest wait until a held lock (or someone else's) is due again, and
tick returns the sooner of that and the next autosave.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* WHOHAS: an error on the web, not "nobody has it open"
The web has no lock files, so the lookup isn't done there; reporting no
holder presented that as a negative result.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Fix the wasm build after the merge
The merge dropped the native-only cfg from main's autosave lock field, and
two drawlock items used only by native code warned on wasm.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* Plot: JIS B4/B5/B6 and Japanese paper sizes
Japanese drafting uses the JIS B series: B4 257×364 mm, B5 182×257 mm and
B6 128×182 mm. The paper table only had the ISO sizes, so a JIS B5 drawing
plotted about 7 mm short in each direction. B4/B5/B6 are now the JIS sizes (the
names Japanese Excel and drawings use) and the ISO ones stay reachable as
`B4 (ISO)`/`B5 (ISO)`; a drawing that stored the ISO sheet keeps its stored
size, and a caller that means ISO B5 says so.
Adds the Japanese papers the table lacked: Japanese Postcard (はがき,
100×148 mm), Japanese Double Postcard (往復はがき, 148×200 mm), Japanese
Envelope #3 (長形3号, 120×235 mm), Japanese Envelope Kaku #2 (角形2号,
240×332 mm) and 四六判 (127×188 mm). A6 was already an ISO sheet.
Paper names resolve case-insensitively and ignore spaces, hyphens, underscores
and parentheses (`B5 (JIS)`, `b5-jis`, `b5jis`), with the Japanese spellings as
aliases too (`はがき`, `往復はがき`, `長形3号`, `角形2号`, `四六判`). The
built-in plotters and the Page Setup/Plot paper combo pick the new sizes up
from PAPER_SIZES, and the PDF plot's MediaBox and the plot preview use them.
Tests: the render paper test pins every new size and alias, the ISO sizes keep
their values and the unknown-name fallback is unchanged; a new io test pins the
PDF MediaBox for each new paper (JIS B5 515.91×728.50 pt, はがき 283.46×419.53 pt,
ISO B4/B5 and the rest), and the plot-preview test checks that `B5` resolves to
JIS B5 and `B5 (ISO)` to ISO B5.
Docs: docs/plotters.md standard sizes and the `pagesetup`/PDFBOOK parameter
notes, and ROADMAP.md progress log + revision history, dated 2026-10-21.
* Plot: B4/B5/B6 stay ISO; JIS sizes by explicit name
Review follow-up: making the bare names mean JIS changed the ISO sizes for
every user. `B4`/`B5` are the ISO sizes again, an ISO B6 row (125×176 mm)
completes the bare series, and the JIS sheets (JIS P 0138, 257×364,
182×257 and 128×182 mm) are reachable only as `B4 (JIS)`/`JIS B4`,
`B5 (JIS)`/`JIS B5` and `B6 (JIS)`/`JIS B6`.
Drop the ambiguous bare `Postcard` and `Double Postcard` aliases; the name
and はがき/往復はがき say which postcard is meant. Drop the ROADMAP.md edit
(ROADMAP.md stays at origin/main's content).
The render and io paper tests, the plot-preview test and docs/plotters.md
follow the new mapping; the Japanese stationery sizes and their はがき/
往復はがき/長形3号/角形2号/四六判 spellings are unchanged.
Still safe for stored papers: a page setup keeps the canonical paper name
with its width/height, DXF groups 44/45 round-trip those sizes, and the ISO
canonical names (and the JIS rows by name) did not change.
* Plot: full-width paper names resolve like their ASCII forms
A Japanese keyboard or IME gives B5 (JIS); fold U+FF01..U+FF5E to ASCII (and the
ideographic space to a space) before the existing normalisation, with a test.
---------
Co-authored-by: midasdf <[email protected]>
* feat(nightly): wire craft-nightly for direct-launch self-isolation
* fix(nightly): bump craft-nightly for single-instance sockets and add Windows regression test
The test is unchanged. At its first place it sat where #3642 adds a test
of its own, so the two branches conflicted in crates/mcp/src/tests.rs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Session::echo keeps the command history bounded: past 5,000 entries it
drops the oldest 1,000. Code that reported a request's output saved
log.len() as an index and returned the lines after it, so when the trim
happened during the request its output came back empty or partial while
the request still reported success.
Session now counts every line echo adds (never lowered by the trim or by
clearing the history). Session::log_mark returns that count, and
Session::log_since(mark) returns the lines echoed since the mark that the
history still holds. The collectors keep a mark instead of an index:
headless MCP cmdline.input, cmdline.script and cmdline.key, the window's
control channel (the same three), and the output of the lisp and appload
JSON commands. The history stays bounded as before.
Tests: lisp::tests::a_lisp_calls_output_survives_the_history_trim,
cadcraft-mcp tests::headless_output_survives_the_history_trim and
cadcraft-ui-egui control::tests::cmdline_output_survives_the_history_trim;
all fail without the change.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A constant attribute's value counts in a reference's box since the block
caches hold `Contents`. Measured through a viewport it is left out when its
definition's layer is frozen there, as the renderer leaves it out. The test
fails when `contents` measures the value without the viewport's layers.
`outline_in` added to the rectangle a dimension is hit along the room of
every text of its block on a layer frozen in the viewport. It did not look
at the drawing: text on a layer frozen for the whole drawing or turned off,
or invisible itself, had no room in that rectangle before a viewport was
counted, and got one when the viewport froze its layer as well, so a pick, a
crossing window, a fence or a crossing polygon took the dimension through
empty space. That text is now passed over.
A new test asserts the top side for each of those selections
with the layer frozen for the drawing and turned off, through a viewport
that freezes it too and through one that freezes nothing.
Conflicts in crates/doc/src/extents.rs and crates/engine/src/select.rs.
extents.rs: main's `Contents` (a block's geometry, its constant attribute
values by tag and its definitions) is what the block caches hold, and it is
measured with the viewport's frozen layers: `contents` takes `frozen` and the
separate `in_drawing` cache, a constant value on a layer frozen in the
viewport is left out as the renderer leaves it out, and a clipped reference
takes the drawing's contents from `in_drawing` (`drawing_contents`).
select.rs: main's file with the viewport laid over it. A block reference is
hit on what is drawn (#3445), so through a viewport on what that viewport
draws (`insert_geometry` and `insert_fill_hits_box` take the frozen layers).
The frame of blank text (#2810) stays in the box a viewport gives. `pick_scanning`
tests its candidates through one `ViewportBounds`.
One test follows #3445: a clipped reference whose frame is hidden
(XCLIPFRAME 0) is no longer hit on its boundary, in any viewport, since the
boundary is not drawn; the window around it still takes it.
A LISP expression at Command: runs in 400,000-step slices, and only the
window's per-frame lisp_tick carries a routine on. Session::script gave
its next input right away and returned, so outside the window a routine
longer than one slice stopped after it for good: cadcraft-cli run and the
headless MCP server reported success with the routine cut short, and the
next LISP line got "a LISP routine is already running".
Session::lisp_run_until_input carries on such a routine until it ends or
waits for input (a get... prompt or a command pause). A script calls it
before each input it gives and once it ends, so the input goes to what
the routine waits for, or comes after it. The headless MCP backend calls
it after a command line and after Enter, since it has no frames either.
The window's own command line keeps its slices and Esc; a script in the
window, which already runs synchronously, now holds it until the routine
ends or waits.
Nobody can stop such a routine by hand, so it stops after
Limits::frameless_steps steps (BLOCKING_CAP, as a programmatic lisp call)
with the same "routine stopped after N steps" error; an endless *error*
handler is stopped one slice later.
Tests: lisp::tests::a_script_runs_a_long_routine_on_before_its_next_input,
lisp::tests::a_script_stops_an_endless_routine, cadcraft-cli
lisp_script::a_long_routine_in_a_script_draws_before_the_save and
cadcraft-mcp tests::headless_lisp_routines_run_to_their_end; all fail
without the change.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A closed spline repeats control vertices: SPLINE CV's Close repeats the first at
the end, and control vertices that wrap round repeat the first degree. Grips
listed every copy and a drag moved one, which opened the curve. SPLINEDIT's
distinct/copies rule moves to Spline so grips use it too.
Control points count as copies only where they really repeat: a spline whose
knots wrap but whose tail doesn't repeat its first control points keeps every
control point its own, even when only its last matches its first.
reading_a_user_fonts_names_keeps_no_font_bytes wrote its font to a
pid-named path in the temp folder without exclusive creation and removed
it by hand, so the file stayed behind if anything panicked before that
removal. The
font now goes in a folder the test creates itself (create_dir, trying the
next name if one exists), and a guard removes the folder when the test
ends, also on panic. The checks are unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Face::family_name took only the first name record of each id and gave up
when it read as blank. Some installed fonts (43 VNI fonts on the test
machine) start name id 1 with an empty Unicode-platform record before the
Mac Roman and Windows names, so they had no family name. It now passes
over records that read as blank (empty, or in an encoding that is not
decoded) for the next one with the same id, bounded like Face::names.
reading_a_user_fonts_names_keeps_no_font_bytes took the first .ttf in
HashMap order from the installed fonts, so it failed whenever such a font
came first. It now writes its own font file (a name table built in the
test) and checks the same no-bytes property, plus the family read back.
A new test pins reading past blank records.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Two review findings on the plot style point limit:
- pattern_within kept going after a triangle set `full`; a later
triangle over the pattern cell allowance then returned None, so the
list was not marked truncated and later outlines were still styled.
It now returns as soon as `full` is set; the cells running out first
still keeps the fill solid, as before.
- Viewport contents were styled within the build's whole point limit,
then clipped into the layout's list, which already holds the objects
drawn before the viewport. Outlines that fit the contents' list but
not the layout's stopped the append part-way and spent the build,
dropping the last contents and the layout objects after them. They
are now styled within the room the layout's list has left.
Part of #1603.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in "Start no clipped piece without room; skip viewport scans
once spent" (clip.rs, viewports.rs, tests.rs). No conflicts; the
viewport contents keep both the early return and the pen limit.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
CodeRabbit on #3594 and #3622:
- Pieces started a new piece when the cap had no piece left, so a long
visible run was copied up to the point cap and then dropped. Starting
a piece now stops the pieces there; a piece that fits exactly with
nothing visible after it stays whole. The output is unchanged.
- A layout viewport after the build was spent still scanned model space,
working out each object's bounds before entity() found nothing could
be drawn. contents() now returns first when the build is spent and its
list already says so. A build spent by a list filled exactly still
scans, so the list is marked for what the viewport leaves out.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
On the web build (one allocation at most isize::MAX) two vectors could
still double past 2 GiB and panic with "capacity overflow":
- gpu::build_highlight_mesh grew its quads from empty. It now counts
segments, point markers, fill corners, fill outline segments and
image frame edges first and allocates once, as build_mesh does. Fill
outlines are worked out once, while counting.
- pen::apply turned plot style line ends, joins and fill patterns into
triangles after the build, outside MAX_DISPLAY_POINTS. It now stops
at the list's point limit: from the first primitive whose geometry
doesn't fit, the rest keep their plain line or solid fill and the
list is marked truncated. Layouts and viewport contents use the
build's own limit.
Measured on wasm32 (harness, Node): 40M highlighted points and a plot
of 1,060,000 round-ended lines panicked on the base; now 1.12 GB
allocated once, and 63,999,974 points marked truncated.
Part of #1603.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Add Russian translation (ru).
Update the in-app Russian catalog and add Russian strings to the
Linux desktop, AppStream, and MIME metadata.
Copyright (c) 2026 SuperSfera LLC, MIT OR Apache-2.0.
* ru: address review (metainfo license notice)
* i18n(ru): apply review suggestions from #2296
* i18n(ru): keep a single copy of the translation notice
The desktop entry, MIME file and Russian catalog repeated the same copyright line. The notice text itself is unchanged.
Co-authored-by: sesaposa1 <[email protected]>
* i18n(ru): translate Generate Boundary
The hatch command label was the one English command name still absent from the catalog. It follows the catalog's own Boundary / Create wording.
Co-authored-by: sesaposa1 <[email protected]>
* ru: state CC0-1.0 for Russian metainfo strings
* ru: remove the per-file translation notices
The translation is under the repository's licence, and authorship is in git history.
* i18n(ru): 15 strings added on main since the last catch-up
Array dialog fields and the update and right-click option hints.
Docs counts updated to 2,274 rows.
---------
Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: sesaposa1 <[email protected]>
Co-authored-by: FredApps <[email protected]>
* i18n(cs): translate the 115 strings added since the Czech catalog
Adds Czech rows for every key of the Ukrainian reference catalog that the
code looks up and cs.tsv was missing: the 3D mouse window and its status
messages, the Hatch and Gradient dialog, the Block Editor and dynamic block
commands, multileader editing, Options (selection, grips, selection preview
and automatic save), the MTEXT editor toolbar, palette tool sets and recent
files. 1,214 -> 1,329 rows; the i18n tests now report no Czech gaps.
"SVG drawings (SVG, SVGZ)" is left out: no production code looks it up.
Rows are inserted in the reference catalog's order; existing rows are
unchanged. Translations are original, written from the meaning of the
English strings (AI-assisted, not yet proofread by a native speaker).
docs/localization.md and docs/localization-parity.md updated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* i18n(cs): review fixes for the new Czech rows
Independent review of the 115 rows added in the previous change:
- Hatch Pick: "Výběr pro šrafy", matching the existing helper command
QuickCalc Pick ("Výběr pro rychlou kalkulačku").
- 3D Mouse Navigation: noun form "Ovládání pohledu 3D myší", as in the
English label and the Enable 3D mouse navigation checkbox (the command
applies one navigation frame).
- Automatic save hint: "Výkresy, které ještě nemají soubor, ..." reads
more naturally than "Výkresy bez souboru".
- 3D mouse busy: "obsazena", the same short form as "připojena" and
"odpojena" in the sibling status messages.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs: note the intermediate Czech baseline in the parity history
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* i18n(cs): translate the 33 strings added on main since
Rows for UI that landed on main after this branch started, so the
Czech catalog again covers every key of the Ukrainian reference catalog
the code looks up (no gaps reported):
- Command Aliases dialog (ALIASEDIT) and Tools > Customize.
- Express Tools commands: BREAKLINE, TXT2MTXT, BURST, MOCORO.
- Options: two-click selection window, interface scale.
- HATCHEDIT: removing boundaries, the Island boundary label.
- Properties: a dimension's arrow size, overall scale and precision.
- Three command prompts (DATAEXTRACTION, TOLERANCE, APPLOAD).
Not added: the Plot dialog labels in managers.rs, which the code does
not look up yet, and the unused SVG filter label.
1,330 -> 1,363 rows; counts updated in localization.md and
localization-parity.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* i18n(cs): drop the duplicate Normal row after merging main
Main's ATTDISP work (View > Attribute Display > Normal) added the row
`Normal → Normální` to cs.tsv, the same one this branch had added at the
end, so the merge left the key twice and the catalog test failed on
"duplicate key Normal". The branch's copy goes; main's stays.
Czech has 1,373 rows (main has 1,219); the counts in the docs follow.
`cargo test -p cadcraft-ui-egui` passes (307) and `translation_gaps`
reports nothing missing for cs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* i18n(cs): put the two backup rows in the reference catalog's order
Backup copy and Create backup copy with each save follow Automatic save
file location, as in uk.tsv; the other five new keys are not in the
reference catalog and stay at the end.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* i18n(cs): the 7 strings translation_gaps lists after merging main
Alias import confirmation, the right-click hint in Options, MINSERT and the Xref clip menu; no reference catalog has the first five yet.
* i18n(cs): the Dimension Style Manager and dimension properties
184 rows for the strings #1460 added (Dimension Style Manager, dimension
and text properties, unit formats, arrowheads), 1,653 rows in all.
translation_gaps: cs nothing missing. Docs counts and history updated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* i18n(cs): 19 strings added on main since the last catch-up
Array dialog fields, the update and right-click option hints,
the unsaved-changes prompt, and Unnamed.
---------
Co-authored-by: Losminek <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: FredApps <[email protected]>
CodeRabbit review on #3594:
- clip_list started from an empty list, so a list the budgets had
cut came back with truncated false. It now starts with the input's
truncated, undashed and expanded, as viewport contents merge them.
- clip_prim built the whole clipped result before push_raw checked the
list's limits. A fill crossing a clip edge fans to more points, and a
line crossing an outline of many edges splits into a piece per
crossing, so the transient result could pass 2 GiB on wasm32 from a
list within its budgets. clip::Cap and _within variants of the
rectangle and outline clips stop at the room left (Limits::left) and
say so; clip_prim appends what fit and marks the list truncated. A
fill cut there keeps the triangles that fit, as line pieces already
did. The uncapped functions stay as wrappers for their other callers.
PolyClip::clip_triangles' 6,000,000-point stop now marks the list too.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
egui's own arrow-key focus moved from the combo into the nearest row button
below and then down that column, so Enter toggled a lock instead of making a
layer current. In the open list, Up and Down now move from layer name to layer
name and scroll it into view; from the combo, Down goes to the current layer.
Enter or Space on a name makes it current. Each row's On/Off, Freeze/Thaw and
Lock/Unlock buttons are also named with their layer, so they no longer share
three names.
Clicking the Percent box in the Transparency menu closed the menu, because a
menu closes on any click inside it, so the value could only be dragged. The
Transparency menu now closes only on a click outside it (ByLayer and ByBlock
close it themselves), and the box is a slider with its value box, labelled
Percent.
* feat(area): expose active interactive command to canvas
* feat(area): shade temporary AREA preview and add tests
* fix(area): skip ambiguous self-intersecting preview fills
Reject overlapping or touching nonadjacent polygon edges before triangulation, preserving the AREA measurement and outline. Add bowtie and degenerate-boundary regression coverage with documented behavior.
* fix(area): preserve fill when cursor repeats last selected point
Strip only the redundant cursor vertex from the temporary AREA preview before polygon validation; keep genuine duplicate selected points invalid. Add two regression tests for stationary cursor and duplicate selected clicks.
* fix(area): keep preview fill when cursor revisits any selected point
Drop only the final temporary cursor vertex when it duplicates a selected vertex. Preserve rejection of actual duplicate selections and add closure/interior-cursor regression tests.
* perf(area): cache selected-edge validation while keeping cursor checks live
* perf(area): keep preview validation cache in canvas state
* style(area): clean preview formatting and let-else layout after review
* style(area): apply rustfmt per maintainer review
---------
Co-authored-by: mrepzzz <[email protected]>
Co-authored-by: FredApps <[email protected]>
The drop-down under the Layers palette's current layer, and Properties > Layer
with nothing selected, listed every layer in one column with no scroll area, so
with many layers the last ones were off screen and could not be picked. Both now
scroll like the Properties layer menu for a selection (#1467), at the same
height. The current layer combo also gets a combo box node named after the
layer it shows.
* HATCH by internal point keeps the arcs of its boundary (#1167)
The boundary search works on flattened curves, so a hatch made by
picking inside a circle stored 158 chords and AREA came out short
(5025.22 for pi*40^2 = 5026.55).
Each traced edge now keeps the input polyline it came from
(region::Boundary::outer_edges, Island::edges, outline_edges,
enclosing_loop_edges_gap; bridged gaps are None), and each input
polyline is one piece of one object: a line, a circle, an arc or one
segment of a polyline. arcs::with_arcs turns each run of edges on the
same circular piece back into one bulged vertex and moves the corners
onto the exact curves (line-circle or circle-circle crossing nearest the
traced corner, within the reach a shallow crossing needs, else onto the
circle). Nothing is matched by proximity, so a line or an ellipse next
to a circle is never taken for it. The associative refill does the same,
so a hatch keeps its arcs when its objects move.
dedup_loops now merges only loops with the same role: a loop that is one
pick's outer loop and another's island stays twice, as the even-odd fill
needs (one hatch picked inside a circle and around it, or inside a square
within a square, left the inner shape empty once the two loops matched).
A boundary object selected twice is used once.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Hatch arcs: origin from the arcs' extents; opposite-role duplicate loops cancel
- HPORIGINMODE's corners came from the loop vertices only, so a circle kept as two half-circles
had no height and its corner origins fell on its centre line. The extents now include each
bulged edge's arc.
- A pick inside a circle and one around it keep the circle as an outer loop and as an island.
The renderer collapsed the two into one loop, so the circle drew empty, and AREA measured them
by nesting. Two loops that are the same boundary now collapse only in the same role (a repeated
loop); in opposite roles they cancel, as they do under the odd-parity fill. AREA measures the
loops the fill keeps (`hatch_fill_loop_indices`), exactly with their arcs.
- Tests: the circle's corner origins, BOUNDARY keeping a circle's and a rounded rectangle's
arcs, and the drawn fill and AREA of the circle inside a square.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Hatch loops: same-role repeats collapse before opposite roles cancel; HATCHEDIT keeps islands
- The renderer cancelled an outer loop and an island as it met them, so the same loops in another
order filled differently (outer, island, outer left a hole; outer, outer, island left none).
Repeats within a role now collapse first, then an outer loop and an island that are the same
boundary cancel, spending the same comparison budget.
- HATCHEDIT adding a boundary the hatch already has (its island) added a second copy, which then
cancelled the island. A boundary already there is no longer added.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* HATCHEDIT: a boundary already there takes the added objects' links
Adding a boundary the hatch already has dropped the added loop, and with it the objects it came
from, so an unlinked island picked with addBoundary stayed unlinked. The objects now join the
loop already there (no second copy is added).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* AREA of a hatch tests nesting at an edge's middle, as the fill does
AREA tested whether a loop is an island at its first vertex, which can lie on the loop around it
(an island touching the outer boundary): the island was then added instead of subtracted. It now
uses the fill's own test point, the middle of the first non-degenerate edge (`hatch_loop_probe`).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Hatch loop dedup: look only at loops that could match, stop when the budget is spent
The comparison budget bounded `same_polygon`, but both passes still walked every kept loop for
each new one, O(n²) in the number of loops however few matched. Loops are now found by (role,
vertex count), so only possible matches are looked at, and once the budget is spent no more are.
A test sorts 40,000 distinct loops.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs: hatch gap tolerance (HPGAPTOL) is done, not missing
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs: BOUNDARY keeps the arcs of what it traces
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: FredApps <[email protected]>
* RENAME keeps a layer's, block's or style's xdata, extension dictionary and reactors
The data CADCraft keeps for a table record or block without modelling it
(Drawing.foreign.records, and the roles of its file handles in foreign.targets)
is keyed by kind and upper-case name, so a rename left it under the old name:
a renamed dynamic block lost its dynamic data, and a renamed layer, text style,
dimstyle, linetype, view, UCS, multileader style or table style lost its other
applications' xdata, extension dictionary and reactors on the next save.
Foreign::rename re-keys both maps; every rename site (layer.set newName, which
RENAME and the Layer manager use; block; style; dimstyle; linetype; view, UCS,
multileader and table style) calls it through Foreign::rename_shared, which
clones the shared Foreign only when it holds something for that name. Undo needs
nothing: foreign is part of the drawing snapshot.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* A case-only rename leaves the shared foreign data uncloned
* A case-only rename test checks the saved layer and block names exactly
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs: RENAME keeps the foreign data of layers, blocks, linetypes, text styles and dimension styles
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: FredApps <[email protected]>
Resolve the conflicts in crates/render with #3564 (dash budget) and
#3560 (block-loop cache), keeping every side:
- Builder carries the point, primitive and dash counters and the loop
cache; every part, XCLIP part and viewport-contents builder gets all
of them, shared.
- build_space_within takes the point, primitive and dash limits; the
tests of both PRs pass the other budget's default.
- The clipped appends carry undashed beside truncated, and spend the
build when a piece doesn't fit.
Also test the shared primitive count with a limit no one parallel part
reaches (300 of 600, parts of 256). Since Builder::join limits the
joined list, the limit below one part passed without the shared count.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* feat(layout): pick the model area a new layout shows
Creating a layout from the "+" button or the layout tab menu takes the next
free name, shows the Model tab for two corners picking the model area the new
layout's viewport shows (Enter: the whole drawing; Esc creates nothing and puts
the tab back), then shows the new layout. `layout.new` takes `window` for the
same from JSON.
Interactive::cancelled lets a command put back the view or tab it moved when it
is cancelled (forwarded by the Guarded wrapper). Rebased onto main: the tests
live in cmd/layout/tests.rs, the cancel hook in session/interactive.rs.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(layout): Esc restores the starting tab only if the Model tab is still shown
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* i18n(it): the prompt that asks the model area of a new layout
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* feat(layout): keep "+" and New Layout instant; pick the area with New Layout from Area
"+" and the tab menu's New Layout create the next layout at once, as before, and
LAYOUT.NEW asks only for the name. The model-area pick moves to its own command,
layout.newarea ("New Layout from Area..."), offered in the layout tab menu. Its
code is unchanged; layout.new {window} still covers scripts.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* i18n(zh): the New Layout from Area menu item
main's Chinese test requires a label for every menu item and command.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* Classify layout.newarea as a no-files command
every_command_is_classified requires every registered command to be on one of the file-access lists. layout.newarea does not touch a file, so it belongs next to layout.new on NO_FILES.
---------
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Co-authored-by: FredApps <[email protected]>
* Stroke font: U+2205 is the diameter sign too
Files from other software store the %%c symbol as U+2205 (empty set)
rather than U+2300. The stroke font drew Ø, ø and U+2300 with its
diameter glyph but had nothing for U+2205, so a stroke-font style showed
it as a missing-glyph box, or as an installed font's ∅ when one had it.
Draw it with the same strokes.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* Draw %%c with the style font's U+2205 or Ø when it has no U+2300, else the stroke glyph (fixes#1608)
%%c becomes U+2300, which most Latin TrueType fonts lack (Arial, Times,
Liberation Sans on Linux). A text style set in one of them drew the
font's missing-glyph box for the diameter sign; only when a wide-coverage
font (DejaVu Sans) happened to be installed did the per-character
fallback show a symbol, in that other font's size and look.
A character the style's face lacks is now first looked for as one of its
substitutes in the same face: U+2300 as U+2205 or Ø, U+2205 as U+2300 or
Ø (`substitutes`, a pure candidate list). All three read as the diameter
sign in drawing text, and every Latin font has Ø, so the symbol keeps the
text's font, size and weight. The existing fallback chain (FONTFALLBACK,
FONTALT, installed fonts) is unchanged and comes next, as for every other
missing character; when no font has the character and the stroke font
does, its glyph is drawn as strokes instead of the face's box. The PDF
glyph record carries the character actually drawn, so the ToUnicode map
stays one-to-one when a text has both %%c and a literal Ø. Lines with
right-to-left text (the shaped path) apply the same substitution before
itemizing.
Tests: the candidate order; the last resort's choice; and, with a real
installed font that lacks U+2300 but has Ø (Liberation Sans, Arial...),
%%c, U+2300 and U+2205 shape, measure and record the same glyph as Ø,
also on a right-to-left line. Skips cleanly without such a font; no font
file is added.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* Test the Ø substitution only in a font that also lacks U+2205
The installed-font test picks a face without U+2300 that has Ø, and
expects %%c, U+2300 and U+2205 to shape as its Ø. A face that lacks
U+2300 but has U+2205 satisfied that predicate, yet in it the
substitution rightly chooses U+2205 over Ø, so the comparison with
"Ø50" failed on such a machine. Require the face to lack U+2205 too;
Liberation Sans does, so the test still runs where it ran before and
still skips cleanly when no such font is installed.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* Shaped lines: draw what no font has with the stroke font too
The left-to-right path draws a character that neither the text's font,
its substitutes nor any installed font has with the stroke font's glyph
when it has one, in place of the face's missing-glyph box. The shaped
path for lines with right-to-left text stopped short: `resolve` went
from the fallback chain straight to the face's box, so %%c on such a
line in a font without a diameter sign, with no installed font to lend
one, still showed a box where a left-to-right line showed the symbol.
Select the stroke glyph before the face's box there as well. The piece
is drawn and measured as the stroke-font pieces of a stroke-font line
already are (the stroke font's advance, no PDF glyph record, since it
is strokes, not an outline), so no other site needs a case. One
difference remains deliberate: a stroke-font line leaves the trailing
gap of its last glyph out of the width, as `shape_stroke` does; a
TrueType line now keeps it, as `ttf::shape` does, so a line measures
the same whichever path lays it out.
Tests: with a face that maps nothing standing in for a font lacking
the character, `resolve` picks the stroke glyph when no installed font
has the character (the fallback font when one does), keeps the face's
missing-glyph shape for what the stroke font lacks too, and the shaped
line draws strokes rather than a box at the stroke font's advance. The
installed-font test's right-to-left part also checks the width and
that the face's Ø, not the stroke font's, is drawn.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* Shaped lines: take the bidi runs from the text before substitution
A character the text's font lacks is drawn as one of its substitutes
when the font has that: %%c (U+2300) as Ø in Arial, Liberation Sans and
the like. The shaped path (lines with right-to-left text) substituted
first and then ran the bidi algorithm over the substituted characters.
U+2300 and U+2205 are bidi-neutral, Ø is left-to-right, so on a line
like "⌀50 אב", right-to-left by its first strong character (the Hebrew),
the Ø became the first strong character instead, the paragraph flipped
to left-to-right and the runs changed order: "⌀50" moved from the right
end of the line to the left, where a font with U+2300 never puts it.
Resolve the runs from the characters as decoded and draw the substitute
at the same logical index: substitution is one character for one, so
the runs index both lists alike. Itemizing, shaping, mirroring and the
widths keep using the substituted characters, since those are drawn.
Tests: a TrueType font built in the test (character map and metrics, no
outlines) gives a face whose coverage the test chooses, with or without
U+2300, whatever is installed. "%%u⌀50%%u אב" in both faces underlines
"⌀50" at the same place, the right end, at the same width. The
installed-font test compared the glyphs of "⌀50 א" with "Ø50 א", equal
only while the line flipped; it now checks that the face's Ø is the
rightmost glyph of the former and the leftmost of the latter, at the
same width and glyph count, still without stroke-font glyphs.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* Skip empty glyph slots when finding the rightmost glyph in the diameter test
Main now keeps an empty outline slot for a glyph without contours (the
space), so the slot's missing x put it last in the right-to-left check.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Fable 5.1 <[email protected]>
Co-authored-by: FredApps <[email protected]>
* Picking reads the index topmost first when the aperture holds more than 1024 candidates (#2701)
When a drawing is shown small, the pick aperture under the cursor covers most of it and the
spatial index returned nearly every entity on each pointer move: the hover highlight collected,
mapped and sorted all of them before testing the topmost. A pick now takes at most 1024
candidates from the tree as before; past that it reads the index chunks from the last one down
(skipping chunks whose bounds miss the query), stops at the first hit, and sorts the tree's
candidates only for the entities below those it examined, after 4096 of them. Picks are
identical (parity tests against the scan at every limit).
select::pick per call, 1396 px canvas, PICKBOX 3 (synthetic 374k-entity site plan / 2M lines):
zoom 20x 0.006 / 0.005 ms -> 0.006 / 0.005 ms
zoom extents 0.014 / 0.112 ms -> 0.015 / 0.115 ms
0.005x 17.0 / 148 ms -> 8.4 / 74 ms
0.0005x 12.3 / 121 ms -> 0.017 / 0.019 ms
Hovering over the 2M-line drawing at 0.0005x: 100% of a core at 7.6 frames/s before, 9% after.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Picking past 1024 candidates skips the layers frozen in the viewport
The test covers the frozen-layer filter on the topmost-first and below-floor
routes of a pick, which #3124's tests do not reach.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: FredApps <[email protected]>
* engine: check a paper's margins against its own axis
* doc: turn a paper's margins with the sheet when it is stored portrait
* fmt: keep plotters.rs rustfmt-clean
* engine: turn a device paper's margins to the page's orientation
* engine: turn a page's margins when only its orientation changes
PAGESETUP sets `landscape` before `page_device`, but a command that names no paper copies no
device paper, so the retained margins stayed on the old sheet's axes and Sheet::from_page
refused them on the new orientation, falling back to the whole sheet. Turn them with the page,
using the inverse of the rotation `set_paper` applies.
* engine: an orientation-only pagesetup turns the retained margins the way the page turns
---------
Co-authored-by: midasmatterhorn <[email protected]>
Co-authored-by: FredApps <[email protected]>
* Key the raw reader's entity map by handle, not hex text
dxf_raw::read built a HashMap<String, bool> from Handle::hex() of every
entity and probed it with the handle text of every entity record: for
the #1076 reference drawing that is 1.1 M String allocations plus
SipHash over text, and the record's handle was parsed, formatted and
parsed again. Keyed by Handle, the map is built from the entities' own
handles and probed with the handle the record's head already yields.
handle() only rejects null and absurd handles, which the lookups' users
skipped a few lines later anyway.
Reading the #1076 reference DXF: 0.34 s less of 5.85 s.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* Skip the raw reader's head scan for records without 102 groups
dxf_raw::read ran head() three times per entity (its extras, the
extension-dictionary map and the per-entity handle), and each call
allocates the handle and owner text (parsed, then formatted again) even
when the record has no reactors and no extension dictionary, which is
the case for most entities of a large drawing. Both scans that only
need those two fields now first check whether the record has any 102
group at all; without one there is nothing to find.
Reading the #1076 reference DXF: 0.28 s less.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* Unescape DXF text only when it holds a backslash
The ASCII parser allocated every string value twice: once in typed()
and once in unescape_unicode(), which copies its input even when there
is no \U+ or \M+ escape to resolve, after two scans for them. Half the
16.7 M groups of the #1076 reference drawing are strings, so that was
8 M needless allocation pairs. A value without a backslash cannot hold
an escape and now moves into the tag as it is. The end-of-file check
reads the value before it is pushed, as the binary parser already did,
instead of cloning the text of every record's type group.
Reading the #1076 reference DXF: tag parsing 1.22 s to 1.17 s, 0.12 s
less overall.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* Size the DXF tag list from the line count
parse_with_limit already counts the file's lines to refuse an oversized
drawing before reading it; that count is the number of groups, so the
tag list is now created at that size instead of growing by doubling.
For the 16.7 M groups of the #1076 reference drawing the doubling moved
about 670 MB of tags in all and, at the last step, held the 335 MB old
list next to the 670 MB new one. The hint is capped by the tag limit
and never trusted beyond it.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* Size the entity list of a DXF section from its record count
parse_entities grew its list of (owner, paper, Entity) by doubling: for
the 1.1 M entities of the #1076 reference drawing that is a list of
about 700 MB moved at every doubling and, at the last one, held beside
its 350 MB predecessor. The records come from the file but are already
in memory and bounded by the tag limit, so the list is sized to their
count once; nearly every record becomes an entity.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* Borrow group text in the DXF reader's per-tag scans
Tag::str() clones the value, and the reader called it in loops that run
over every group of the file or every group of a record: the handle
seed scan over every 5/105 group (1.2 M clones for the #1076 reference
drawing), the CADCRAFT_HANDSEED probe over the OBJECTS section, the
entity plot style lookup, the handle of every entity record, the record
split of every section, the AcDbEntity marker search, the xdata brace
check and the head scan's handle, owner and group names. A private
text() helper in the io crate borrows a string or hex value instead
(the dxf crate's API is left alone), and split() keeps a record's type
as a borrowed &str, as the writer's record list already can.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* Bound the tag-list reservation by the text's length
The reservation came from the newline count alone, so a file of blank
lines (`0`, `EOF`, then megabytes of newlines) reserved a tag slot per
two newlines before the parser found its one group: far more than the
grow-as-needed list would ever have taken for that input. A group is two
lines of at least two bytes each, so the text's length over four bounds
what any file of that size can hold; the reservation now stops there.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* Size the entity list by the records that can become entities
VERTEX, ATTRIB and SEQEND fold into the POLYLINE or INSERT before them,
so a heavy polyline file reserved a slot per vertex it never filled.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Reserve the tag list fallibly, so a refused reservation grows the list instead of aborting
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Bound the entity list's reservation and make it fallible
parse_entities reserved its staging list for every record that can become
an entity, infallibly, before any record was read. The reservation now
stops at MAX_RESERVED_ENTITIES (1 << 16 entries, about 46 MiB; larger
lists grow as usual) and goes through try_reserve_exact, so a refused
reservation is a "DXF: out of memory reserving N entities" error rather
than an abort; parse_entities and read_blocks return a Result for it.
Review by FredApps on PR #1833.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Fable 5.1 <[email protected]>
Co-authored-by: FredApps <[email protected]>
Found while testing crates/geom/src/lib.rs:43-46 (ccw_sweep), used by Arc::sweep and angle_in_sweep
Co-authored-by: Claude Haiku 5.5 <[email protected]>
Co-authored-by: FredApps <[email protected]>
Clears the two cargo-deny advisory findings that #3607 ignores for now:
- url 2.5.8 -> 2.5.9 (RUSTSEC-2026-0592, stack overflow in
Url::origin() on nested blob: URLs); form_urlencoded 1.2.2 -> 1.2.3
comes with it because url 2.5.9 requires ^1.2.3.
- async-executor 1.14.0 (yanked, use-after-free in Executor::drop)
-> 1.14.1 (smol-rs/async-executor#164).
Lockfile only; no Cargo.toml change. Part of #1935 (F-17).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* doc: a mirrored dimension reflects its direction about the mirror line
* test(doc): set insertion_point on the mirrored-dimension fixture
main added Dimension::insertion_point in #2636. The test in this PR
constructed a Dimension without that field, so clippy failed after
merging main.
---------
Co-authored-by: FredApps <[email protected]>
* Write RevcloudProps xdata on revision clouds
Fixes#1570
Co-Authored-By: Claude Haiku 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* REVCLOUD: arcs use the bulge readers need to recognise a cloud (follow-up to #1605, #1570)
Readers take a closed polyline for a revision cloud only with RevcloudProps
xdata (#1605) and every bulge within 0.02 of 0.520567; clouds used 0.5,
just outside, so ezdxf's is_revcloud still said no. Clouds now use
0.520567050552 on every creation path. Tests check the reader's condition
for all six ways of drawing a cloud and after a DXF round trip.
* Parity checklist: regenerated after merging main
* Parity checklist: regenerated after merging main
* REVCLOUD: import RawTag in the revcloud module main split out of draw2
* Parity checklist: regenerated after merging main
* Revcloud: update the recognition test for main's prompts (#1692)
Main now asks for the minimum and maximum arc length and, after an object
pick, whether to reverse direction, so the old scripts left a prompt waiting
and the test read the previous entity. A helper now checks the prompts
finished and exactly one new entity was created.
* Revcloud: drop the file-format-parity.md change from this PR (#1692)
The LWPOLYLINE note and changelog entry are moved to the PR description, as review asked.
---------
Co-authored-by: NetterSilver <[email protected]>
Co-authored-by: Claude Haiku 5.5 <[email protected]>
Co-authored-by: FredApps <[email protected]>
Co-authored-by: SBaksa <[email protected]>
Since #2119 the app bundle carries NOTICE and ATTRIBUTION.md, but not
LICENSE-MIT and LICENSE-APACHE, which the .deb, .rpm, .tar.gz, AppImage
and both zips ship. Copy them into Contents/Resources next to the
notices, before signing, so the bundle seal covers them.
Co-authored-by: FredApps <[email protected]>
* fix(io): look up table, multileader and multiline styles without scans
A crafted DXF made several style lookups cost N^2 name comparisons
(#1924, F-04 item 5):
- the reader's TABLESTYLE, MLEADERSTYLE and MLINESTYLE records, each
scanning the styles read so far for an earlier one of its name, and its
VPORT records, each scanning the viewport configurations;
- each table from another writer, scanning the table styles on read;
- each TABLE, MULTILEADER and MLINE on DXF save, for its style's handle
and values;
- render's table_style_of, which a DXF save calls for every table;
- AUDIT's multileader and table style checks, which RECOVER runs on open.
On main, N = 40 000 MLEADERSTYLE or TABLESTYLE records took 65-69 s to
open, and the DXF save of 40 000 multileaders or foreign tables naming a
missing style ran past 300 s. With this change they take 0.4-5.5 s, and
the output is byte-identical.
- ByName (from #3562) moves to dxf_ext.rs and gains position(). The record
dedups go through it, keeping the rule: a later record of a name
replaces the first in place and takes its name. A VPORT record still
adds a tile to the first configuration of its name.
- Drawing::table_styles is a NamedList, like the other style tables.
- The writer's Ctx keeps a ByName beside its table and multileader style
lists. dxf_mline::plan and Plan keep one too. Missing names fall back as
before.
- When no styles are planned (entity_groups, for entget), the multileader
style is still looked up in the drawing.
- AUDIT checks multileader styles against a lower-cased BTreeSet, and
table styles with by_name.
Tests: cost tests for each path, with behaviour checks that also hold on
the old code, and an entity_groups test for the multileader's style.
Part of #1924.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(io): trim a multiline style's name when reading it
A DXF MLINESTYLE named " Road " was kept with its spaces. Its multilines
look their style up trimmed (dxf_mline::plan, Plan::handle,
Drawing::mline_style), so a save missed it, wrote a second Road style and
pointed the multilines at that copy. main did the same: its scan compared
the trimmed query with the untrimmed name. The writer already writes the
name trimmed, and the reader's fill key trims it, so the name is now
trimmed where it is read (CodeRabbit, on #3590).
Test: a_padded_multiline_style_name_is_saved_once (fails without the
trim: the save writes STANDARD, Road and Road).
Part of #1924.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* ci: notify artcraft-services on release state changes
* ci: pass only the dispatch token to the notify-services workflow
secrets: inherit hands the called workflow every repository secret, including
the signing credentials. The reusable workflow only reads
ARTCRAFT_SERVICES_DISPATCH_TOKEN, so map just that one.
---------
Co-authored-by: FredApps <[email protected]>
Review on #3594:
- The XCLIP attribute part's `truncated` flag now reaches the parent
list, as the block-contents part's already did. A clipped reference
whose attributes ran out of budget as the last object of a drawing
drew 98 of 105 points and said nothing.
- The parts of a parallel build are joined within the list limits
(Builder::join). Clipped copies are in no shared count, so two XCLIP'd
blocks in different parts could join to 798 primitives against a
limit of 748, unmarked. Parts are appended whole while they fit; at
the first that doesn't, the build is spent and marked truncated. This
is native-only: the web build has no parallel path.
Part of #1603.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
On wasm32 a DPrim is 40 bytes and one allocation can take at most
isize::MAX (2 GiB - 1): a list of more than 2^25 primitives panicked
with "capacity overflow" when its vector grew. The 64M-point budget
(#3306) charged a point primitive one point, so it allowed 64M of them;
a 4.5 MB DXF of dotted lines reached 33.56M.
- MAX_DISPLAY_PRIMS, charged once per primitive beside the points and
shared like them: 2^24 on 32-bit targets, equal to MAX_DISPLAY_POINTS
(and not counted) on 64-bit ones, where it can't bind.
- Clipped copies (viewport contents, XCLIP) are appended only while the
list has room within both limits; the append stops at the first piece
that doesn't fit and the build is spent, as when a budget runs out.
Builder::charge checks the same room in its own list.
- Compile-time asserts: the primitive, point, pen, plotted-text and
image vectors stay under isize::MAX bytes at these limits (checked
for wasm32 by the wasm step).
- gpu::build_mesh counts its lines and quads first and allocates each
array once: the quads grew by doubling and passed 1 GiB on large
lists with lineweights shown.
Part of #1603.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
exchange() retries once when the first attempt was not sent (or is
read-only), but the retry dropped `sent`: a mutation the retry sent and
whose reply was lost came back as a plain transport error, without the
"may or may not have been applied" warning. The new ping before long
requests adds a way into that retry (a lost ping reply counts as not
sent). The retry now keeps `sent` and returns the same warning for
mutations; read-only methods keep the plain error.
Test: a_lost_reply_on_the_retry_still_says_a_mutation_may_have_been_applied.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A later outline was closed back to its start only when its end lay farther
than the tolerance from it (review). With the end within the tolerance but
not equal, the jump back to the first outline left from the end while the
jump out arrived at the start, so the two did not cancel under even-odd
fill and a sliver between them was filled. The start is now added whenever
the end differs from it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The end lookup took any unused end in the 3x3 grid cells around a point,
so ends up to about 2.8 tolerances apart could be joined (review). The grid
now only gives candidates; each is checked with Vec2::near against the
tolerance and the lowest eligible end wins, as the "runs on" and closed-run
checks already did. A cell's scan stops at the best match so far, and the
ends visited are capped at 32 per end of the loop: past that, a crafted
loop is read in file order.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
An edge path was read in file order, so an edge listed elsewhere or stored
end to start made the vertex list jump, and the even-odd fill filled the
polygon of the jumps (a square listed AB, DC, BC, AD filled as an hourglass).
Each edge is now read on its own and hatch/chain.rs joins them. A path whose
edges already run on is joined in file order as before. Otherwise edges are
chained into runs by their ends (within a millionth of the loop's extent,
at least 1e-9), turned around when needed (points reversed, bulges negated
and moved). Closed runs fill as loops of their own; open runs are joined in
order, as a path read in file order is. Ends are looked up in a sorted grid,
O(n log n).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The control server checks a request's token only after reading the whole
line, and clients send the token last, so a local peer without it could
make the app buffer a line of up to 256 MiB (512 MiB across connections).
Until a request on a connection has passed the token check, a request
line may be at most 64 KiB (control_token::MAX_UNAUTHENTICATED_LINE); a
longer one gets an error reply and the connection is closed. After that
the usual 256 MiB limit applies.
The MCP bridge sends a short ping with the token before a longer request
on a new connection, and sends the request only when the ping's reply
shows the token check passed; a refused or lost ping leaves the request
unsent and safe to retry. docs/control-protocol.md describes the limit.
Part of #1925 (F-12).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
An ATTDEF or ATTRIB in a tilted plane facing up holds its insertion
point, alignment point and rotation in that plane's OCS (DXF Reference,
ATTDEF and ATTRIB groups 10 and 11 "in OCS"; "Object Coordinate Systems
(OCS)"). The reader took them as world coordinates, and the writer saves
attributes with no group 210, so a save moved the attribute millions of
units in a drawing near survey coordinates.
flatten_tilted maps them through Mat4::ocs and turns group 50 into the
plane's direction in plan, as tilted LWPOLYLINE and HATCH are drawn
flat; an ATTDEF's extrusion is then spent. ATTRIBs of a reference that
is itself left in its tilted plane (#1158) stay as read with it; the
INSERT arm and that check share mirrored_reference. Planes facing down
(mirror_text), flat attributes and TEXT (#3296) are unchanged.
Fixes#3541
Co-Authored-By: Claude Opus 5.5 <[email protected]>
e9e4b0e1f made a gaps-only pattern draw nothing past the per-run limit, but
it was still drawn as one continuous line where a pattern with a dash falls
back to continuous: a run shorter than one period, a pattern under
`min_pattern` (sub-pixel), past 50,000 periods with a level of detail, and
a run of one point (review of #3564). On screen that also differed from the
plot of the same run.
apply, apply_as and ranges now return no dashes for a pattern whose elements
are all gaps, before any of those fallbacks. Patterns with a dash or a dot
keep every fallback, and an empty (continuous) pattern is drawn whole. Texts
and shapes in a gaps-only pattern are placed as before.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
main now holds the dimension styles behind a shared pointer; the ATTMODE
comparison is kept next to the updated style comparison.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Review of #3564:
- A closed run is stretched to round(L / period) periods and laid out from
the period before its anchor to the one after its last, up to half a
period more than the (L / period + 2) elements it was charged. A run of
192 on 127 dashes and a gap (period 128) walked 508 elements for a charge
of 448. It is now charged (round(L / period) + 2) x the pattern's length.
The per-run limit keeps its formula, so runs under it keep their output.
- A pattern of gaps only was refused past the per-run limit, drawn as one
continuous line and counted as undashed, while below the limit it draws
nothing. It now draws nothing at any length, uncharged and unreported.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
`(gcd -2147483648 0)` gave 2147483647 (the divisor clamped to the
largest integer), and `atoi` cast its digits with `as i32`, so
"99999999999" gave 1215752191 and "99999999999999999999" gave 0.
They now follow what the reader, `fix` and JSON inputs already do with
a whole number that doesn't fit 32 bits: it is a real. `gcd` gives
2147483648.0 for its one such result; `atoi` gives the real `atof`
reads from the digits, the number the reader makes of them. Results
that fit are the same integers as before. Integer arithmetic still
wraps.
Part of #1933.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The first commit made `cadcraft-cli convert` print the note, but the app's
own commands write images through IoHooks::write and ::plot, which return
bytes only, so the desktop and web apps and LISP stayed silent (#1069).
- cmd::file::set_noted_io(NotedIo { write, plot }): an optional hook beside
IoHooks (which is built by struct literal in ~70 places), installed by the
CLI, desktop and web apps with cadcraft_io::write_framed_noted and the new
cadcraft_io::plotter::plot_noted / pdf::plot_noted.
- EXPORT, PLOT (so EXPORTPDF, PUBLISH and PDFBOOK per sheet), QSAVE and
SAVEAS to an image and document.bytes echo the note and add it to the
result's `warnings`. An image written with a `version` option goes through
the same writer (same bytes), so it is noted too.
- report_notes adds to `warnings` instead of replacing them;
report_dwg_notes uses it (no result had `warnings` before it, so DWG
results don't change). Without the hook nothing changes.
Not covered: the plot preview and the canvas show no message.
Fixes#1069.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
An expression typed at a command's prompt (CIRCLE, then `(while T)` as
the radius) is the prompt's answer, so it ran as a blocking run with the
500,000,000-step cap meant for programmatic calls: about 17 s on a dev
build with no frame drawn and Esc not handled.
It now runs through `lisp_eval_answer` with a 20,000,000-step cap, and
the callbacks it runs (`vl-sort`'s comparator and the other synchronous
callbacks) share what is left of that allowance instead of each taking
the 500,000,000-step callback allowance inside one step. The error says
the expression was stopped and to run long routines at Command:, where
they run a slice per frame and Esc stops them. Routines at Command:,
`c:` commands, APPLOAD, dropped files, the `lisp`/`appload` JSON calls
and startup files are unchanged.
Part of #1926 (item 3).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
DATALINK remembers up to 1000 linked files per open drawing. At the
bound a new file dropped an arbitrary entry of a HashSet, which could be
the file linked just before it. Each remembered file now carries when it
was last linked: linking it again moves it to the newest, and a new file
at the bound drops the one linked longest ago.
Test: remembered_links_are_the_most_recent_ones.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The filter labels were translated on the dialog's thread, where the
interface language (thread-local) is English. They are now read on the UI
thread and handed to the dialog's thread.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
The Open, Save, APPLOAD and ALIASEDIT dialogs ran in the window's event
handler and waited there for the desktop portal's dialog. For as long as it
was open the window answered nothing, and after a few seconds the desktop
offered to force-quit the app. The dialog now waits on a thread of its own,
through Services::start_pick, as the macOS sheets do.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
A dashed run is laid out over at most two million pattern elements, but
nothing bounded the total, and a pattern of mostly gaps visits many elements
for each point it draws, so the 64M-point display budget never stopped it:
1,000 lines on a 256-element pattern of gaps and one dash (a 58 KB DXF) took
11.6 s to PNG and 12.7 s to a 69 MB PDF on a dev build. A run past the
per-run limit was also drawn continuous without a word (#1069).
- MAX_DASH_ELEMENTS (64M, as many as the list's points) is charged by
linetype::layout before a run is laid out, on a counter shared like the
point budget's (parallel parts, XCLIP parts, viewport contents). Once a run
does not fit, the rest of the build's dashed runs are drawn continuous.
The per-run limit is MAX_RUN_DASH_ELEMENTS, unchanged.
- A run drawn continuous because of either limit sets DisplayList::truncated
and counts in the new DisplayList::undashed, merged where lists are joined.
Runs drawn continuous by rule (short, sub-pixel, the screen's 50,000-period
level of detail) are not counted.
- cadcraft_io::write_framed_noted (and png/svg/pdf "noted" variants) return
the note; cadcraft-cli convert and run --export print it.
- Linetype texts are placed only on a run whose dashes were laid out; phase
checks the limits without laying the run out again.
On 11 real drawings the most a complete plot asked was 26.5M elements; a
16M total would have drawn 8,241 runs of that drawing solid. With 64M the
gap-pattern file takes 0.8 s / 0.4 s, the #1069 controls and three real
drawings export byte-identical, and the audit's dense dash/gap file stays as
on main (it fills the point budget at the same time).
Part of #1923 (F-05 f). Part of #1069: the app's EXPORT and PLOT don't show
the note yet.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts: crates/fonts/src/ttf.rs (main made OutlineMesh's points pub(crate); kept that and this PR's bounds field) and crates/render/src/tests.rs (kept this PR's #666 view test and main's fixture-font section).
Main also added a public font-set GENERATION/generation() for redraws (2c979eb1), which clashed by name with this PR's private lookup-cache counter. Renamed this PR's counter to LOOKUP_GENERATION/lookup_generation(), and set_font_dirs now also calls changed() so the per-thread caches drop fonts from removed folders.
cargo test -p cadcraft-fonts -p cadcraft-render and cargo fmt --check pass locally.
The DXF reader looked for an earlier VIEW or UCS of the same name by
scanning the records read so far, and found each layout's named UCS by
scanning every UCS, on read and on save. A crafted file of N VIEW or N UCS
records, or of N layouts each naming one of N UCSs, cost N^2 name
comparisons (#1924, F-04 item 3): at N = 40 000 it took 67 s and 194 s to
open on main.
- ByName: the records of a table read so far by lower-cased name; a later
record of a name replaces the first, which keeps its place and takes the
later record's name, as before. DIMSTYLE records use it too.
- UcsNames: the drawing's UCSs by lower-cased name with their positions in
table order; a layout's named UCS is the first of that name whose frame
is the layout's, as named_ucs finds it. Built once per read and per save.
Tests: VIEW/UCS records (main 118.9 s, now 0.23 s) and layouts naming
UCSs, read and saved (39.9 s, now 1.6 s), against a 10 s bound; a
behaviour test compares UcsNames with named_ucs. Follows #3539.
Part of #1924
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A table's data link path is stored in the drawing, and DATALINKUPDATE
copies the linked file's text into the table, where the next save keeps
it. A stored path could name any local file (by `..` or an absolute
path), so a drawing could pull any readable file into itself.
A link the drawing itself names is now read only when its file, resolved
by the file system (`..`, symbolic links and junctions followed), lies in
the drawing's folder or a folder below it, compared by whole components;
the resolved path is the one read. A file the user links with DATALINK
is remembered for that open drawing (never saved, at most 1000, newest
kept), so it keeps updating until the drawing is opened again. Refused
links are listed in DATALINKUPDATE's errors; the other links update. The
automation roots are still checked first.
Part of #1929 (F-08).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A dimension block holding dimensions of itself, directly or through block references, other
dimension blocks, multileader blocks or proxy graphics, was drawn again for every such dimension at
every level down to MAX_BLOCK_DEPTH: k of them made up to k^16 copies, a loop through many
distinct blocks one copy per ordering of them, cut only by the 2M expansion budget. A crafted
490-byte DXF took 79 s to export to PNG (dev build), 602 bytes over 300 s.
A dimension inside block C is now drawn from its own block T only if T does not lead back to C.
A short search from T (16 blocks, 256 objects) settles ordinary blocks; past it the strongly
connected components of the block graph are found once per build (iterative Tarjan, shared through
a OnceLock). A dimension on a loop is drawn from its definition points, as one whose block is
missing is. Loops made only of block references are unchanged.
Part of #1923 (F-05).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
One conflict, in crates/engine/src/cmd/modify/select_then.rs: this branch
adds COPY's copy_prompt, copy_input and copy_done just above join_now, and
main (#2725) rewrote join_now's doc comment. Kept both: the COPY methods,
then main's two-line doc. The struct fields (copy_single, copies,
copy_array, ask_circle), SelectThen::new and the match arms merged without
conflict. No behaviour changed on either side.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Drawing::linetype, text_style, dim_style and layout scanned their table,
once per entity while a drawing is drawn, measured or saved, and once
per layout after every command. The DXF reader also scanned the
dimension styles once per DIMSTYLE record and the layouts by exact name
once per paper-space object. So a crafted file of N records and N
entities naming one it lacks, N DIMSTYLE records, or N layouts with N
objects in the last of them cost N^2 name comparisons (#1924, F-04
item 3): at N = 40 000 a PNG export took 23 s, opening 107-151 s or
more than 300 s on main.
- linetypes, text_styles, dim_styles and layouts are NamedLists (from
#3484) and the four lookups use its index: the first entry of a name
in list order, ASCII case folded, as the scan returned.
- NamedList::by_name_mut: the first entry of a name to change.
- Scans with the same answer go through the lookup (STYLE, DIMSTYLE,
RENAME, -DIMSTYLE, .lin loading, COMPARE, COUNT, UCS, plotter, DXF
header, Layers panel).
- The DXF reader indexes DIMSTYLE records by lower-cased name, and maps
layout names (exact) to the first layout of that name once per pass.
Cost tests (doc: one per table; io: DIMSTYLE records and layouts) fail
on main at 66-421 s and pass within 3 s; a behaviour test compares
every lookup with a scan.
Part of #1924
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Nightly launch fix under Skylar's Exec 454: the Launcher's trailing `--` no longer reaches the file list where that applied, and a refused launch no longer blocks on macOS (the reason goes to stderr and the app exits 2).
acadrust 0.6.6 writes and reads a DWG linetype's element count as one
byte, so a linetype of 256 elements came back from a DWG save with none
(continuous) and one of 300 with 44. The DXF read cap of #3482 lets 256
through, so every capped DXF linetype hit the 256 -> 0 case.
The DWG bridge text now writes at most 255 elements per linetype (the
first ones, with group 40 totalling them); DXF output is unchanged.
cadcraft_io::dwg_notes gives one note counting the linetypes cut, counted
by the writer so an xref linetype the file leaves out is not counted. An
engine hook installed by the apps echoes it and returns it in `warnings`
on every DWG write: QSAVE/SAVEAS, document.bytes, EXPORT, WBLOCK,
-WBLOCK, LAYOUT SAVEAS; cadcraft-cli convert prints it.
Part of #1923 (F-05).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
muda's predefined Quit ends the process through terminate: without asking. The menu item
is craft-quit's Quit, a close request of the main window, so the close path asks first
as the close button does (#2157).
Supervised nightly switch-on, merged under Skylar's explicit Nightly 758 override after green CI, CodeRabbit on this head with no open threads, Sonar passing, and an independent adversarial review with no blockers.
The web build's RandomState keys come from addresses, not entropy, so a
file could pick tags whose hashes collide and bring back the A x K cost
this change removes. Key the by-tag maps by the tag's ASCII-folded bytes
in a BTreeMap, as the layer and block name index (#3484) does. Matching
is unchanged: TagKey's order is consistent with eq_ignore_ascii_case.
Part of #1923.
The reader builds a user-defined hatch's families from its double flag (77) when a file lists
no definition lines, as AutoCAD writes its own. The other tests save explicit families, so none
of them reached that fallback. This one rewrites a saved hatch to 78 = 0 with no lines and a 77
of 0 or 1, and reads it: one or two unit families, with the hatch's angle and spacing kept. It
fails with the fallback switched off.
Renders the plain nightly tar's launcher from craft-common-actions' shared template.
Independent check: dylanmtaylor compared all 14 app launcher PRs byte for byte with the template rendered from the registry (https://github.com/storytold/craft-common-actions/pull/367#issuecomment-7172085284); this head was re-checked against craft-common-actions main 88148a5.
A script's own HATCH line started taking the published command-line
questions, so `HATCH A <angle>` in a script read A as a pattern name and
left the command asking for a scale. HATCH now asks them when an AutoLISP
`(command ...)` call starts it: the program input a routine feeds the
command line. A script's own line and a person keep the interface's
prompts, picking the boundary first, as before. A routine's call made
inside a script still gets the published order.
The two starts are told apart at the point HATCH chooses, with
lisp_program_input(), which answers for the routine's input alone:
command_origin() reports a script and a routine as program starts alike.
A script's HATCH keeps the interface's prompts, and a routine's call from
inside a script keeps the published order, each with its own test.
As before the move to the craft-ui dock, a tab held while the layout
resets is not dropped into the reset layout. The reset replaces the
workspace, so its generation changes.
The tests assert CADCraft's own close decision for a saved drawing and
for a programmatic quit, as they did before the platform's quit joined
the close path, so they pass on macOS, where that quit cancels the window
close. Unsaved drawings still run the whole close frame.
As before the move to the craft-ui dock, opening or activating a panel
with a command raises the floating window that holds it, once. Docked
panels only become the front tab.
A HATCH with the pattern name _USER was saved with group 78 = 0 and no
definition lines, though the DXF Reference has no user-defined exception
to 78's number of pattern definition lines. Another program read no
lines and its explode produced nothing, and a hatch whose lines are
based away from its origin reopened with them at (0,0).
The writer now lists a user-defined hatch's own families as it lists
any pattern's: each line's angle, base point, offset and dashes, scaled
and rotated as the hatch draws them, with the real count in group 78.
The pattern type (76 = 0) and the double hatch area flag (77) are
unchanged, and a DWG keeps the lines too, since the bridge converts the
same written HATCH. A file that lists no lines for a user-defined hatch
(78 = 0, as AutoCAD writes its own) is still read from its angle,
spacing and double flag.
The save test now expects the real count, and a doubled user-defined
hatch based at (1,1) keeps both families' angle, base point, offset and
count through a DXF save and read and a DWG save and read.
The keys (Cmd on macOS) step the Options interface scale by a tenth, within its limits, and Ctrl+0 sets it back to 100 %. They work while a text field or the command line has the keyboard, and a key the user gave to a command runs the command. In the browser they zoom the page.
A height of 0 is drawn as a height of 1, which left the Aligned box
empty (0 / 0). Fit text with an unusable width factor is drawn at its
own width, not stretched to the second point.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
A script, a LISP (command ...) routine or the command line's -HATCH
used to share one prompt machine: HATCH took every answer as a pattern
name. HATCH now asks the published questions when a program starts it:
the pattern name (or ?, Solid, or the user-defined form), then the
pattern's scale and angle, or the user-defined form's line angle,
spacing and double flag, and then the boundary objects. Enter takes
the default at each question, and a refused scale or spacing is asked
again.
-HATCH keeps its own prompts. It is a command id of its own rather than
an alias, so a dashed start is never the HATCH sequence; a person, the
interactive HATCH and the -HATCH Properties option are unchanged.
A user-defined hatch is stored as DXF's _USER pattern: pattern type 0,
the spacing as its scale, the lines' angle, and a second family at
right angles when doubled, which the file's group 77 records. DXF
reads the families back when a file has no pattern definition lines,
and writes the pattern type and double flag.
-HATCH is classified with the file-reading commands.
A press in the drawing, and a drawing that opens or becomes active, give the drawing the focus; a text field, a dialog
or a menu keeps it. The focused drawing keeps Tab (KeepKeys::Tab) only while a command runs, text is typed, value boxes
are live or a snap marker is under the cursor. A bare Tab with nothing focused is the framework's: capture_tab is gone.
Aligned and Fit text are drawn from their first point to their second,
whatever rotation is stored: Fit at its own height with its width
stretched, Aligned at the height that keeps its proportions. The
extents measured them like left-justified text at the stored rotation,
so ZOOM Extents and selection by box missed where they are drawn.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
The drawing's host canvas is declared with the id of the drawing's own widget, so egui keeps the focus Tab gives it.
While the drawing is the focused Tab stop, the command line and the shortcuts take the keyboard as with nothing focused.
A stretch whose end is within TRIM's on-cut tolerance of its pick made TRIM run on to the next
cut and take more than planned; it is now left and the object counted as uncut. Only pieces of
no length are deleted, as TRIM leaves short ones. An object cut in part is counted with those
not cut everywhere (skipped.partly), not also as trimmed.
The highlight merged cut points within 1e-9 of the distance from the origin, a whole unit near
x = 1e9, so a visible 0.5-unit trim there was merged away and the whole object highlighted. Cuts
now merge only when f64 can't tell them apart.
Phase 1 of storytold/craft-i18n#401 for CADCraft's own vi.tsv.
- 44 existing rows: the 8 terms raised in #401 (14 rows), "nạp" for
loading into CADCraft (8 rows), Boundary as "Đường bao" (2), the 17
rows left in English (Find and Replace, Magenta, Working Set, Feet)
and 3 rows kept consistent with them. "tỉ lệ" stays as spelled.
- 249 new rows, one for each string the translation_gaps report listed
(Dimension Style Manager and dimension properties, keyboard shortcuts,
right-click customization, Array dialog, UCS, ALIASEDIT, commands),
grouped under comments. The report now prints "vi: nothing missing".
- ATTRIBUTION.md: the phase 1 changes were reviewed by a native
Vietnamese speaker; older rows are not yet proofread in full.
Translations are written from the meaning of the English strings and
their use in the code (clean room).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The index mapped a hash of the case-folded name to the first entry of that hash, and scanned the
table when the entry's name differed. On wasm32-unknown-unknown, std's RandomState takes its keys
from a stack and a heap address (library/std/src/sys/random/unsupported.rs), so a crafted file
could pick colliding names and keep every lookup a full scan on the web build (review of #3484).
The index is now a BTreeMap from the name's bytes with ASCII letters lower-cased to the first
entry of that name. eq_ignore_ascii_case compares exactly those bytes, so a lookup returns what the
scan returns without a fallback, and costs O(log N) comparisons whatever the names are. Short
names are folded on the stack. Measured, one search costs about a scan of 100 names and a build
about 100-350 scans, so tables are indexed from 128 entries and after 256 scans since their last
change.
A new test builds the index alone and finds the first entry of every name: case variants, names
that differ after a long shared prefix, names of 64 bytes and longer, non-ASCII names and the empty
name. The cost test now uses 60 000 names and a 10 s bound (166.6 s on main).
Part of #1924 (F-04).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
One block reference with A attributes of a block with K attribute
definitions cost A x K tag comparisons wherever they are matched: the
extents (constant values a reference carries, the layer of an attribute
without its own), the renderer's constant values (per MINSERT copy), the
DXF writer (ATTRIB properties, MULTILEADER block-content values), BURST,
ATTSYNC/BLOCKREPLACE and the dynamic-grip preview. Crafted 16k x 16k and
32k x 32k files took 2-28 s to open, draw or save in a dev build.
TagKey compares and hashes a tag without ASCII case, as
eq_ignore_ascii_case does; Block::attdefs_by_tag and
Insert::attribs_by_tag keep the first definition or attribute of a tag,
as the scans' find/any did. Each site builds the map once and looks each
tag up once. Outputs of the crafted files are byte-identical.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 <[email protected]>
An LTYPE record kept every dash element a DXF listed, while a .lin file
is capped at MAX_LINETYPE_ELEMENTS (256). The renderer clones the whole
linetype for every object drawn with it and walks the pattern on every
run, so a crafted 400,000-element pattern made a PNG export of 250
lines take 18-22 s on a dev build (8 s or less with this change; the
rest is the renderer walking 1M gap steps per line).
ltype_pattern now stops at the 257th element: the linetype keeps its
first 256 elements, the text and shapes of the dropped ones are not read,
and one read note counts the linetypes cut. Saving writes the elements
kept. A DWG reaches the reader as DXF but cannot carry more than 255
elements (one-byte count), so the cap does not fire there.
Part of #1923 (F-05).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts: Cargo.toml (kept the next/egui pins for every craft-libs entry, including main's new craft-csv and hayro-interpret/cmap/postscript patches), apps/cadcraft/src/main.rs (port's framework frame decision and apply_frame with main's os_window identity, persistence path and exit hook), crates/ui-egui/src/updates_ui.rs (next's argument-free check calls with main's check_updates_at_start gate). Main's new tests and dialogs switched to install_headless and escape_pressed.
A stretch picks which ends of an arc move by testing the dynamic
block's arc ends against its frame (0 its start, 1 its end), but a
mirror swaps an arc's start and end (Arc::transform). In a reference
flipped by a flip action, the copy's start is the block's end, so a
later stretch moved the wrong end and distorted the arc.
The stretch now maps the indices to the copy's when the copy is
mirrored from the block: by the flips the reference already has (an
odd number of flipped flip actions holding the object; a repeated
selection counts once and a reflection line of no length mirrors
nothing, as the flip action itself does) and by mirrors queued for it
earlier in the same change. Unmirrored arcs keep their indices.
Tests: a flipped door arc stretched by Width (flipped, not flipped,
held twice, two flip actions, a reflection line of no length), and a
lookup that flips and stretches in one change, with the flip action
before or after the stretch, and back.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
b781f047 said AutoCAD 2024 was measured at ARRAYEDIT's columns, rows
and items. That measurement was made after the clean-room standard of
20 November (one agent session must not both operate AutoCAD and write
code), so the claim is withdrawn.
The module doc now lists only ARRAYRECT's rows and columns,
ARRAYPOLAR's items and rows, and -ARRAY's rows and items as measured.
The arrayedit_counts doc says ARRAYEDIT's counts go through the same
count() parser in crates/engine/src/cmd/array.rs, so they refuse and
take the same texts; no AutoCAD measurement of ARRAYEDIT is claimed.
Comments only: the test logic and the engine code are unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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).
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.
Since #3462 a block reference's bounds include the constant attribute
values it shows, which ATTMODE decides. The index kept bounds measured
under the old ATTMODE, so after a change window selection and picking
could miss, or still find, a constant value. ATTMODE is now part of the
context the index is reused under.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
The rectangle a dimension is hit along keeps the room of block text the
viewport leaves out (`outline_in`), but a pick, selection cycling, a crossing
window, a fence and a crossing polygon first tested `bounds_in`, which leaves
that room out, so a side lying there was never reached. They now test
`touch_box_in`: `bounds_in` with that room. A window's containment test stays
on `bounds_in`.
A window polygon tested the corners of that rectangle as well, so it needed
the hidden text's room where a window of the same shape did not.
`hit_polylines_in` now keeps the room only for selections that touch.
The dimension-text test asserts the top side of the rectangle for each of
those selections and a window polygon against a window of the same shape.
Conflict in crates/engine/tests/it/spline_options.rs, where both sides
appended tests: keep reverse_keeps_a_closed_spline_seam and main's SPLINE
CV method tests (#3456).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
At coordinates near 2^29 the cross products of absolute coordinates
round away a unit of area, so a unit square there had zero area and its
nonzero fill was dropped. The products are now taken relative to the
contour's first vertex.
An even-odd loop's depth was counted at a point nudged just inside its
longest edge. A hole drawn closer to that edge than the nudge held the
point, so the outer loop counted as nested and neither loop was saved
with the outer flag. When no two contours meet, each is now placed by
the middle of its longest edge, as nonzero fills already are; crossing
contours keep the nudged point.
rect_of joined the points of every subpath, so two open segments that
reached the four corners of a box were read as that box, and a stroke
through it was kept. A rectangle must now be one subpath. A clip whose
subpaths each lie on one line encloses no area and clips everything;
any other clip of several subpaths is still reported as not applied.
A glyph joined a run when it lay within 0.1 em of the previous glyph's
baseline, so text that climbed a little each glyph stayed one run and
was placed on the first glyph's baseline. The offset across the baseline
is now measured from where the run starts; the gap along it is still
measured from the previous glyph.
Two clips that only touch intersect in a rectangle with no area. Shapes
under it were already left out, but a glyph whose middle lay on the
shared edge passed the inclusive range test and was imported. Text now
needs a clip with area as well.
Render mode 2 fills a whole Tj or TJ and then draws it again for its
stroke. A TJ that split into two runs arrived as fill A, fill B, stroke
A, stroke B, and the one remembered text matched neither stroke, so both
words were imported twice. The same record also dropped a later fill of
the same text in another colour.
The glyphs filled since the last shape, image or stroke are now queued,
and only a stroke glyph that repeats the next queued one is skipped.
Fills are never matched against each other.
Main moved the action loop into ActionRun (#3424). The frame test for
wipeouts and arcs moves into ActionRun::stretch; a polar stretch still
moves a wipeout or an arc whole, as it did, now that move_entity reads a
stored list for them (tested). Main's array helpers and the hatch outline
code sit side by side.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Such a reference draws its attribute and not the definition's value, but
the extents still added the value's box. The cache of block bounds now
keeps each constant value by tag, and a reference leaves out the ones it
carries an attribute for.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Linux nightly packaging by @dylanmtaylor, with the per-app Nightly flavor commits stacked on his branch.
Co-authored-by: Dylan M. Taylor <[email protected]>
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.
Tab after the second value now locks it (when typed) and moves back to the
first box, so the typed length or X can be changed; Tab there moves on to the
second box again. Typing and Backspace in the first box edit only the first
value, keeping the separator, the second value and its lock.
Escape, history recall, a picked option or a click could clear or replace the
command line while the first-box record stayed set, so retyping the same text
later reactivated the first box without Tab and put the next digit into the
first value (40<90 then 1 became 401<90).
Turning Dynamic Input off (F12) with the first box active left the record set
too, so Backspace then erased from the first value (40<90 became 4<90). The
record now goes whenever the Dynamic Input boxes are not on screen.
With the first value erased after Tab locked the second one (40<90 to <90),
the canvas now holds the locked angle (or Y) too, so the preview and a click
use the pointer distance along 90 degrees instead of the free pointer.
Escape and a click that used up the typed entry left the second value's lock
set, so retyping the same text (40<90) locked the angle without Tab. Both now
drop the lock as well as the first-box record.
A separator typed in the first box that switches the format is refused when
the second value does not read in the new format (40<N to a comma would give
40,N, which reads as nothing and hid both boxes); the entry and the first box
stay as they were.
A click at a prompt is now taken when the button goes down, and that path
also uses up the typed entry; it drops the lock and the first-box record the
same way, so a click there does not leave 40<90 locked for the next retype.
The bounds of a block's contents are cached by name and depth for block
references and for dimensions that use the block. Only a block reference
draws constant attribute values, so with one cached box the reference's
extents depended on which of the two measured the block first. The cache
now keeps the geometry and the constant values apart.
A constant value whose definition matches the layout's orientation is
drawn upright, and is now measured that way too.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
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 <[email protected]>
Constant attribute definitions are not copied into a reference as
attributes; their value is drawn from the definition with the block.
The renderer skipped every attribute definition while drawing a
reference's contents, so constant values never showed on screen, in
plots or in exports, and the reference's extents left them out.
A constant definition inside a referenced block now draws its value
(multiline as multiline text) with the definition's properties and the
reference's transform, inside each array copy and under XCLIP like the
rest of the block. ATTMODE applies as for other attributes: 0 hides it,
1 hides an invisible one, 2 shows it. Variable definitions still draw
nothing from the block. A reference that carries an attribute with the
same tag draws that attribute only, not both.
The reference's extents add the box of each visible constant value, so
ZOOM Extents and selection by box agree with what is drawn. Hit testing
of a reference already reads the rendered geometry.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A paste asked for from a menu or the command line waits for the system
clipboard for up to half a second. If another drawing became the shown
one in that time (a file read in the background finished opening), the
held paste ran there. It now remembers its drawing and is dropped, with
a line in the command history, when another one is shown.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
`unknown_bounds`, added on main by #2697, now takes the layers frozen in the
viewport and the drawing-bounds cache, and passes them on to `in_block_visible`
and `bounds_in` as the other block paths do. Without them the merge with main
did not compile. A proxy is never selected itself, so this only matters for a
proxy that is a part of a block: its graphics on a layer frozen in the viewport
take no room in the reference's box there. A new engine test covers that case.
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.
The shortcut loop ran every paste command as already read, but only the
ones from this frame's clipboard events are. A paste command the user
bound to a key of its own fired from the key press with nothing read, so
it pasted what this window held. It is now held like a menu paste.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
The test gave each segment a constant width, so a miter from an offset of the centre line would also have passed. The first segment now widens from 2 to 4, and the corner must reach (11, -2.1), where the edges meet, not (11, -2).
Each segment's band was built with that segment's own normal, so a wide
polyline showed a notch at every vertex. Each vertex now gets a corner on
the outer side of the turn: the two outer edges are extended until they
meet, or bevelled past the miter limit plot style joins already use.
Tapered segments meet where their own edges do; closed polylines get the
corner at their first vertex; repeated vertices don't stop it; straight
runs get nothing extra.
Wide polylines with a linetype (wide.rs) follow after #2487.
The prune guard parsed a dependency owner's action list again for each
dependency in each pass. finish now collects the handles of the kept
actions of unknown shape once, beside the handles they reference, and
the guard tests the owner against that set. The exemption is unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The capture rig ran note_raw_geometry alone, so the framework never got
the Options interface scale (FrameInput's Scale, given in before_input)
and egui's zoom stayed 1: the settled-scale test saw 800×600. It now runs
raw_input_hook and before_input, as the desktop app does.
The admission test reseeded the geometry for each request, an identity
change that the next drain rejects queued requests for; it now admits
all four against one geometry, so all four issue and stay undrained.
The native menu bar refreshed enablement with the command's own check,
so Edit > Paste stayed disabled there until something was copied in this
window. It now asks clipboard::offered, like the in-window menus and the
context menu.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Harnesses and bare contexts that run CadApp::ui install the runtime headless; rigs that
run the raw hook also run before_input. Dock tests use the workspace accessors, next's
action constructors and the tabs' accessible names; tests of the old renderer's hit rects,
divider ids and drag bar are removed.
The runtime is installed in the desktop and web shells, before_input runs in the raw hook,
the close path decides in embed::logic, and the interface scale is the runtime's RootEnv
scale. The dock is next's DockArea over the saved workspace with CADCraft's panel bodies
and the drawing as its canvas group; ui.dock keeps its JSON vocabulary. Update dialogs run
on a DialogHost, the macOS title row is shell::TitleBar, screenshots use the runtime's
screenshot slot, and Escape with nothing focused is read as the window's cancel.
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 <[email protected]>
With a tiny reference scale a finite typed XY distance became infinite in
block units and was stored, so the saved end point couldn't be read back as
the parameter's points. The distance and the end point must now be finite.
Dragging a polar parameter's end grip applied the distance value set but not
the angle one: the angle now snaps to its value set as typing it does, and
goes where it is dragged when the set has no limits.
Review of #3424 (CodeRabbit).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The arrays' copies were counted only after every selected object's offsets
had been cloned, so one array of 99,999 offsets over 1,000 objects held
nearly 100 million offsets before it was refused. `keep_array` now takes
each object's share of `MAX_ARRAY` before its offsets are kept.
A repeated associative hatch kept the first copy's outline handle, so
`refill_hatches` put every repeat's boundary back on the first square. Each
arrayed object's copies get their handles first, by place in the array
(in the same order as before, so the handles are unchanged), and a
repeated hatch's loop names the copy of its outline at the same place.
Review of #3424 (CodeRabbit).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review: a proxy copied from another drawing was remapped against the wrong
table; its indices are now named by its own decoded graphics (decoded again
with marker names), the file's table only as fallback. Only the 310 groups
holding the declared size are read and rewritten; names are looked up once.
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.
A LARGE_RADIAL_DIMENSION or ARC_DIMENSION CADCraft keeps as read draws the
*D block its AcDbDimension part names, as AutoCAD does; without one, the
proxy graphics in its AcDbEntity part (the decoder learns POLYLINE_WITH_NORMAL,
chunk 32). Saving counts that block as used, so it is written and AutoCAD
reads the dimension again. cadcraft-cli no longer counts unknown entities
that draw graphics as not drawn.
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).
acadrust writes each AcDbAssocAction dependency entry as group 360
(owned) or 330 (not owned). The list rewrite accepted only 360 entries,
so an action with a 330 entry kept a stale count and a null entry after
a dependency was pruned. The rewrite now accepts both codes, keeps each
surviving entry's code, keeps input-null entries, and drops only
entries whose object is gone.
A dependency is no longer pruned when an action of unknown header
shape owns it or names it in any group 330 or 360, so that action's
count and list stay consistent. The prune loop runs until nothing
changes instead of at most 64 passes, and the cascade finds owners
through owner_of, so a null-owner body goes with its pruned hard owner
and stays while another live object holds it.
Tests: assoc_dependency_prune gains a mixed 330/360 list, a null-owner
body with one and with two hard owners, an unknown action header, and
an unknown action that lists a dependency of a known action by 330.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Follow-ups to #2697 from the review in #3423:
- ATTRIBUTE_FILL is an AcGiFillType trait (1 always, 2 never) in force
until the next one, for polygons and circles; a filled shape keeps its
outline. Before, a 2 turned fill on, and only for the next polygon.
- A circle or arc under a matrix that scales its plane unevenly is an
ellipse or elliptical arc; 3-point chunks are fitted in their plane.
- The size group is the first 92/160 after the AcDbProxyEntity marker.
- Only what the 310 groups hold is reserved, not the size claimed.
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.
The inherited-unit repair for group 72 now applies only to saved inch or
millimeter values (0 or 1). A layout saved in pixels (2) keeps 2 when its
units are unchanged, including after a device-only edit; an explicit unit
edit still writes its unit.
Conflict in crates/engine/src/cmd/draw/line_pline.rs PlineM::begin():
keep main's drawing elevation (#3423) and the branch's PLINEWID start
widths.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Add the Write Block dialog for WBLOCK
WBLOCK typed or started from a menu now opens a Write Block dialog instead of
failing with "`path` is required": source (block, entire drawing or objects),
base point and destination file, with Select objects and Pick point that hide
the dialog for a canvas pick and bring it back. JSON calls are unchanged.
A new WBLOCKPICK command runs those picks and keeps the result in
Session::wblock_picks, like HATCHPICK does for the Hatch dialog. Escape closes
the dialog, and ends the command while picking.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(wblock): address CodeRabbit review comments
- WblockPickM Objects: use SelectPhase::default() instead of begin(s)
so canvas picking always prompts explicitly, even with a pre-existing
selection (the dialog pre-fills handles itself)
- wblock.rs: reject non-numeric/non-finite base coordinates with an
error message instead of silently defaulting to 0
- Add i18n strings for the two new coordinate-error messages (it)
- Add test: preexisting_selection_still_prompts
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* fix(wblock): address review comments from skylartaylor
1. EntireDrawing now passes `name: "*"` to run_wblock, which clones the
whole drawing (all layouts, paper space, INSBASE preserved) instead of
sending only d.model handles and resetting INSBASE.
2. Add integration tests in wblock_dialog.rs that call run_wblock and
read back the written file for EntireDrawing and Objects+base modes.
3. Reformat parse_coord's early return to satisfy rustfmt.
4. Drop the two "Mouse wheel zooms…" rows from it.tsv; they belong to
the wheelzoom PR, not this one.
5. resume() now checks that the current drawing UID matches the one the
pick started in, mirroring hatchdlg::resume; start_pick restores the
dialog when wblockpick fails to start instead of closing silently.
6. Add all wblock dialog labels to uk.tsv (Source, Destination, Base
point, Pick point, File name and path, etc.); fix the period mismatch
in the "No objects selected" error key.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* test(wblock): call confirm() directly and add layout-entity coverage
- Make confirm() and picked_handles pub so integration tests can reach them.
- wblock_dialog.rs now calls wblock::confirm() instead of app.run, so the
test fails if confirm constructs wrong params (addresses CodeRabbit comment).
- app_with_two_entities adds one paper-space entity via Drawing::add so the
EntireDrawing test can also assert j["layouts"] == 1 (second CodeRabbit
comment).
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* test(wblock): assert base-point translation and INSBASE preservation
- write hook now records Line endpoints so the Objects test can verify
that the base-point offset is actually applied to entity coordinates:
line (0,0)→(10,0) with base (5,3) becomes (-5,-3)→(5,-3).
- EntireDrawing test sets INSBASE to (7,3) before confirm() and asserts
the exported drawing still carries (7,3), covering the preservation
behaviour of whole-drawing mode.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* wblock: the chosen path clears an earlier file-dialog refusal
Clicking "…" while the save panel is still open shows "A file dialog is
already open; answer it first." The message stayed after the panel was
answered; the path chosen now clears it. The button's code moves into
browse(), with a test.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* wblock: the dialog belongs to the drawing it was opened on
Opened on drawing A and left open while drawing B was shown (its file tab),
OK applied the retained source, handles and destination to B: with
drawing-local handles colliding, B's objects were written to A's file.
The dialog now keeps the drawing's uid when it opens (and binds to the
current drawing when opened by name with no state). It closes once another
drawing is shown, as the Hatch dialog does, and confirm() refuses to write
from another drawing, saying why.
Tests: for Objects, Block and Entire drawing, the dialog opened on A, B
shown through document.switch (what the tab runs), B holding the same
handles and a block of the same name: confirm() writes nothing, one frame
closes the dialog, and back on A nothing is written either. The two
existing confirm() tests now open the dialog first.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* wblock: English keys only, and the completion message through i18n
As AGENTS.md rule 16 asks, the Italian and Ukrainian rows this PR added
to the app catalogs go to a linked storytold/craft-i18n PR instead. The
Chinese row for the WBLOCKPICK command label stays: every command label
must be in zh for chinese_menus_and_commands_are_fully_translated, and a
test can't be weakened to make a check pass (rule 31).
The completion message ("N objects written to …") and the dialog's
selected-object count were English built with format!; they now go
through crate::tf! and crate::i18n::count, so each has a catalog key
and a plural form.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
write_plot_settings takes the layout's model flag and passes it to the baseline
call. Kept group 70 always has bit 1024 set for Model and cleared for paper
layouts. Plot groups 76 to 78 are written from AC1018 and 333 from AC1021, and
333 only when the object it names is saved.
Dimension Style Manager (lines and arrowheads, text, fit, primary and
alternate units, tolerances), Blocks palette and block libraries, icon
sizes and a few prompts. translation_gaps reports nothing missing for pl.
Terms follow the existing catalog: linia pomocnicza / wymiarowa, grot,
odnośnik, rodzaj linii, grubość linii, LUW.
When dxf_raw::finish remaps handles on kept associative objects, a
dangling dependentOnObject pointer (group 330 inside the
AcDbAssocDependency subclass) was rewritten to "0" while the dependency
remained active and stayed listed in its owning ACDBASSOCACTION 360
dependency list.
dxf_raw::finish now drops any kept AcDbAssocDependency whose non-null
dependentOnObject handle does not resolve to a written object/entity
(along with kept objects owned only by it), while leaving originally
unbound dependencies (330 = 0 in the input) untouched. In Map::object,
AcDbAssocAction filters dropped handles out of its 360 dependency list
and updates its 90 dependency count.
Tests: assoc_dependency_prune::{orphaned_assoc_dependency_is_pruned_along_with_action_entry_and_body,originally_unbound_assoc_dependency_with_null_target_is_kept}.
👾 Generated with [Letta Code](https://letta.com)
Co-Authored-By: Letta Code <[email protected]>
When dxf_read::hatch converts an edge-based HATCH boundary loop into a
HatchLoop polyline, line_edge, circular_edge, and spline_edge each skip
the incoming first vertex when it coincides with the previous end vertex
(last.p.near(point, 1e-9)). elliptic_edge did not, emitting consecutive
duplicate vertices whenever an elliptic edge met a neighbouring edge.
elliptic_edge now applies the same skip check as spline_edge (after
reversing points for !ccw).
Tests: hatch_elliptic_edge_dedup::{ccw,cw}_elliptic_edge_does_not_duplicate_shared_start_vertex.
👾 Generated with [Letta Code](https://letta.com)
Co-Authored-By: Letta Code <[email protected]>
A layout that inherits its paper units wrote back the file's group 72 after
MEASUREMENT changed, so it reopened with the old unit. Group 72 is now
rewritten when it no longer matches the unit the drawing applies.
Review of #3214: counting the layers frozen in the viewport took two
answers away that a selection through a viewport gave before.
A point on the layer Defpoints that is a part of a block (the definition
points of a dimension are held so) was hit and took room in a window
whatever the viewport froze. It counts again: ViewportBounds measures it,
and build_entities_in_viewport keeps it, also where the viewport freezes
Defpoints. A line on Defpoints follows the viewport, and what a viewport
draws on screen is built as before.
A crossing window inside the box of a dimension's text took nothing where
the viewport does not draw that text. With the text left out of the box,
a side of the rectangle the dimension is hit along ran through that
place and the window took the dimension. The rectangle now keeps the room
of the text the viewport leaves out; a window still needs only what the
viewport draws.
* #1336: test that the DXF LAYER table stops at the record cap
The LAYER, LTYPE, STYLE and DIMSTYLE tables had no record cap, unlike VIEW, UCS and VPORT. The test reads a DXF with over a million LAYER records and checks the layer list stays at the cap; without the guard it holds every record (1000102 layers). The other three tables scan their lists linearly per record, so a million-record file is too slow to build in a test and they stay uncovered.
* #651: test that small filled text is simplified on screen and keeps full detail in plots
Filled TrueType text was triangulated at full outline detail at every zoom, which froze the canvas on pages of small text.
The test draws four O glyphs in a font built in the test itself (a 128-point ring registered through `cadcraft_fonts::ttf::register`), so it needs no installed font and no font file in the repository, and it never skips. At 10 px per cap height the rings are simplified and the shapes keep their extent; with an em under two pixels each glyph is the ink's box, two triangles; a plot keeps every point. Without the fix the on-screen build has the plot's 1024 triangles.
`crates/render/src/text.rs` gains the same policy without any font: `detail` returns Full for a plot, Box for an em under two pixels and Reduced for a small one, and `simplify` drops the points of a flattened curve at a coarse band and keeps them at a fine one.
* #618: test that OFFSET takes a clicked distance and picks its source under grid snap
OFFSET only accepted a typed distance, and with grid snap on a click meant to pick the source object was moved to the nearest grid point.
The engine test clicks two points for the distance and checks the second-point prompt and its base, the guide line in the preview, OFFSETDIST and the resulting offset. The canvas test does the same through grid-snapped clicks, then picks the source line and checks the side click puts the copy 5 units up, that OFFSET asks for the next object and that Enter ends it. Both live in the per-crate integration-test binary (#1989).
Without the fix the engine and canvas tests stay at the distance prompt; with only the cursor's point-prompt test reverted the canvas test never picks the line.
* Tests: one synthetic TrueType builder for render and PDF, and the exact LAYER cap
Sonar's duplicate-lines gate flags 84 of the 334 new lines (25.15% against a 3% limit): the render
level-of-detail fixture's `fixture_font_bytes` and the PDF writer's `test_font` build the same sfnt
tables, so the two suites carried a copy each.
Both now build their fonts with `crates/fonts/tests/support/sfnt.rs`, which the two suites include
with `#[path]`. The fonts layer owns the table format it reads (`crates/fonts/src/ttf.rs`), so the
skeleton lives beside its tests and neither consumer is turned into a published API or a dependency;
no Cargo entry changes. The glyph shapes (`ring`), the cmap ranges and the metrics each font records
stay at the caller: the render fixture keeps its two 128-point contours with the counter wound the
other way, its 1000-unit em and 700-unit cap height, and the PDF fixtures keep their three fonts.
The font files are byte-identical before and after the refactor: render 1704 bytes, sha256
83b9914cdf6e704df1ca5851ecefc98708c947b0d5be818cf5b6282761d31db0; PDF embeddable 484 bytes
2711cc7394b2057ba7e6bee22bb25a6c25edd4ecec0d35ba326759a04fcdefb9 and `fsType=2` restricted 484
bytes 3e6b534115429e8cbfdefd97e40ebdeb874222fcd7929f69b02d261cef622db4, one byte apart at OS/2
`fsType`; and the deliberately short `hmtx` 476 bytes
dbcc548f59a4d3e414deb959014b8548632a7fa66fe12201895cdcbe6e66a000, whose `hhea` still declares three
metrics while `hmtx` holds one.
The DXF LAYER cap test asserted `<= 1_000_000` and `> 900_000`, which lets up to 99,999 valid
records go missing unnoticed. It now asserts exactly the million layers the parser keeps, written as
a literal so a changed constant fails the test instead of following it, with a records-specific
message. Removing the guard reads 1000101 layers; a cap of 950,000 reads 950,000.
Session::start_from recorded the incoming origin and command number, then
cancelled the running command. Cancellation can abort a paused LISP routine
and run its *error* handler; a handler that starts a command records that
command's Program origin through its own Session::start_from. The new
command's factory then ran after that cancellation, and the INSERT and
MINSERT factories read the overwritten field, so a person's '-INSERT T …
replacing a waiting routine was taken for a program's and ATTDIA 1 opened
no dialog.
The origin and number are now recorded after the cancellation, so they
describe this start and the factory sees the origin this command was
started with; a handler's own commands keep their Program origin. The
handler's command also keeps its own number, which the dialog identity and
the Blocks palette's placing test use.
Regression tests replace (command "LINE" "0,0" pause), whose *error*
handler starts LINE, with a person's '-INSERT or '-MINSERT under ATTDIA 1:
both fail before the change (command_origin Program, no attribute entry),
in the engine and in the UI harness, and the handler's LINE is still drawn
as the program's. The UI test comment that called a fresh OK an old
confirmation now says what the test does.
A covered cell that still held text wrote it into the typed and formatted
values. The modern value block is now empty for covered cells; the legacy
groups are unchanged. The test keeps text in a covered cell.
Imported text with no alignment point, or with coincident points, no longer
takes the read-time measurement, so an edited height is saved as edited. An
Aligned ATTDEF with an empty default keeps its stored height when its points
move; its rotation still follows the points.
A command a routine started was the program's only through
Session::start_programmatic, which (command …) uses for a start at Command:.
A token it feeds while a command runs takes the typed-input path instead
(Session::typed → typed_token), and that path called Session::start, which
records Origin::Person outside a script. With ATTDIA 1, the INSERT that
(command "LINE" "0,0" "'-INSERT" …) starts to replace LINE asked for the Edit
Attributes dialog, which the routine could never answer. MINSERT, COMMAND-S
and VL-CMDF reach the same path.
Session::lisp_drive now marks its slice as program input (Session::program_input,
saved and restored around the slice, a panic in it included), and Session::start
records Origin::Program for a command it starts then, as it does in a script. A
person typing the same tokens at the command line still gets the dialog.
A script's flag was the only origin INSERT consulted, and only Session::script
set it. A LISP (command "-INSERT" …) — in a LISP file, APPLOAD, or
engine.execute {"command":"lisp"} — started INSERT outside a script, so a
routine that ended before the first attribute answer left ATTDIA 1 to open a
dialog it could never answer; a routine resumed after a yield had the same gap.
Commands now record who started them for their whole life
(Session::command_origin(): a person at the command line or from a menu,
toolbar or palette, or a program), and INSERT opens the dialog only for a
person's command. Session::start_programmatic marks an AutoLISP (command …)
start, and Session::start takes a script's commands as the program's, so the
scripted INSERT still asks at the command line. A typed or menu INSERT keeps
the dialog.
One drained control batch can cancel the dialog's command and start another
INSERT of the same block before the next frame. The draft filter gave the
replacement its own defaults, but the window, its fields and OK kept the same
ids, and a click or Enter queued for the old dialog (ui.click and ui.key wait
in the app's synthetic input, one pointer event a frame) confirmed the
replacement with defaults nobody had seen.
The window and every widget in it now carry the drawing and command they
belong to, so a press on the old OK never ends on the new one and no focus or
keyboard state carries over; input queued before a dialog appeared is dropped
instead of handed to its replacement; and no answer is taken on the frame a
new owner's dialog first draws.
INSERT copied ATTDIA into the command without asking who started it. A
script that ends before the first attribute answer leaves INSERT waiting,
so a scripted -INSERT with ATTDIA 1 exposed the Edit Attributes dialog,
which a script cannot answer.
InsertM now records whether a script started it (Session::script_running)
for its whole life, and ATTDIA opens the dialog only for a command the
user started. A typed INSERT with ATTDIA 1 still asks in the dialog.
The dialog kept its draft by block name and row count alone. A cancel
through the control channel runs before the dialog frame, so a second
INSERT of the same block could reach its attribute prompts in the same
drained batch and then inherit the cancelled draft; OK, or a queued
confirmation, submitted those values to the new command. A redefined block
with the same name and row count got values meant for other tags.
Session::attribute_entry now stamps each entry with the active drawing's
uid and the command's number in Session::commands_started, and the dialog
shows its draft only while both still match. A replacement command starts
from its own defaults, so a confirmation left over from the old dialog can
only submit what the new one shows.
Conflicts: dxf_read.rs (proxy tables next to the UCS names), render/blocks.rs
(proxy graphics inherit the proxy's own transparency without its locked-layer
fade, as block contents now do), roundtrip test (allow_in_process). Two tests
main added build an Unknown and get the graphics field.
Main gained ATTREQ, Preset and Verify prompts (#2535) while this branch was
open, so what is new here is ATTDIA and the Edit Attributes dialog: the
setting and its SETVAR registration, Session::attribute_entry and its guard
hook, the dialog, and the tests. Main's prompt flow is kept as it is: every
attribute value at the command line (or in the dialog), then the Verify
attributes asked again.
INSERT counts its attribute answers per definition (`asked`) instead of by
tag, as main still does: a block with two definitions of one tag stopped
asking until the map grew, which it never did. The duplicate-tag test fails
without it.
docs/gaps.md and docs/ui-parity.md keep main's rows; the affected rows are
named in the pull request instead.
Leave fixed-property visual styles out of DWG 2007 saves and count them in the save report. Expose the same count to hosts and cover the affected and unaffected save paths with synthetic tests.
While a fence (Fence, or Quick mode's two-point fence) or a crossing window is drawn, every
piece it will remove (EXTEND: every stretch it will add) is highlighted with the same band as a
single pick.
- trimextend.rs: fence() and crossing() are split into fence_work()/crossing_work(), which find
what they cut, and run_picks(). picks_preview() works the same run out without changing the
drawing: each object at its picks in turn, against edges that include what the run has already
made of other objects (Overlay), so the preview follows a fence whose trims change each
other's edges.
- modify/trim.rs: trim_kind() and extend_kind() trim or extend a shape; edge_segments_over()
gathers edges with an Overlay in place of the objects it names.
- Interactive::highlight_all / Session::highlight_all; the canvas draws it in place of the
object under the cursor.
Tests: a fence highlighting both lines it crosses, the drawing untouched; a fence through a grid
and a circle removing exactly the highlighted length; Quick mode's two-point fence and a crossing
window; an EXTEND fence adding exactly what it highlighted.
The coverage test in uncovered() now works out each segment's box and piece ends once and
passes over a segment whose box is farther than the tolerance from the point before measuring
its distance. Same result, less work on long polylines and finely flattened curves.
The Model LAYOUT is written from a synthetic page setup without kept plot
flags, so its plot layout flags (AcDbPlotSettings group 70) were always
688 (512|128|32|16) and never had 1024, "ModelType", which the DXF
Reference (PLOTSETTINGS, group 70 "Plot layout flag") defines for the plot
settings of model space. Every saved DXF, and every DWG built from the same
DXF text, had a Model layout without it.
plot_layout_flags now sets 1024 for the Model layout and clears it for a
paper-space layout, also when a file's kept flags had it there, since it
would mark that layout as model space. The other bits stay as in #3227.
Test: layout_plot_flags::only_the_model_layout_carries_the_model_type_flag.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
At TRIM's "Select object to trim" prompt the rollover highlight showed the whole object under
the cursor. It now shows only the piece a click there removes, and the whole object only when
Quick mode would erase it; EXTEND shows the stretch a click adds.
- modify/trim.rs: `trimmed` and `extended` work a trim or an extend out without changing the
drawing; `trim` and `extend` apply them. The preview and the click share that code, so they
can't disagree.
- prompt.rs, guard.rs, session: `Interactive::highlight` (under the panic guard) and
`Session::highlight`: what the rollover highlight shows of the object under the cursor.
- trimextend.rs: TRIM/EXTEND's highlight is the object less the pieces a trim keeps (or the
object as extended less the object), split where a piece ends, so it works the same for lines,
arcs, circles, polylines, ellipses and splines. The edges of the object under the cursor are
gathered once while the drawing and the edges stay the same.
- canvas: the highlighted part replaces the whole-object highlight, worked out again only when the
object, the cursor, the zoom, the drawing or the prompt changes.
Tests: engine/tests/it/trim_highlight.rs (the piece between and past two edges, Quick-mode
erase, the drawing and undo untouched, the highlight matching what a click removes for seven
kinds of object, EXTEND, other prompts and locked layers, edges gathered again after a trim) and
a canvas test (the part is computed once while the cursor rests).
Follows the approach of #1126.
Co-authored-by: Marco Arnulfo <[email protected]>
- Fill tolerance follows the drawing unit, so arcs are sampled and fills
split into triangles to the same accuracy in metres as in millimetres.
- Nonzero fills test containment from a point on each contour's edge, so
an inner contour close to its parent's edge keeps the fill.
- A fill of two arc vertices (a disc) is kept.
- The same text drawn again after a shape or image is kept.
- A clip path that doubles back along an edge is not taken as a rectangle.
- PDF options that are not a JSON object are refused.
- The options window imports into the drawing it was opened for.
- The self-calling form test checks the outcome against a finite form.
PDFIMPORT (File > Import PDF...) adds a chosen page to the current drawing,
with page, scale, insertion point, password and content options. OPEN and
IMPORT take a PDF too; OPEN reads its first page into a new metric drawing,
and cadcraft-cli convert writes it to DXF or DWG.
The mapping is adapted from PR #2787 (MIT OR Apache-2.0) onto craft-pdf's
interpreter. Nonzero fills whose contours don't cross keep their loops and
arcs; crossing contours are split into triangles so the filled area matches.
Content the import leaves out or approximates is named in the read notes,
and a page with no vector content is refused instead of opening empty.
A cancelled request's answer could complete a newer held paste, whose
own answer was then dropped. Each RequestPaste now has an identity kept
with the held command, and a Paste completes the command only when it
answers that request; otherwise it is a stale answer that pastes
nothing (its text still becomes the clipboard, being the system
clipboard's) and the command keeps waiting for its own answer or
deadline.
Where the window answers in the next frame or not at all (X11, Windows,
macOS), a request is answerable for that one frame, counted in frames,
so a paste with no answer falls back at once and a later Ctrl+V is never
taken for it. Only native Wayland, which reads asynchronously with a 3 s
budget, keeps the time bound, now 5 s. The app tells the interface which
case applies from the display handle.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A typed UI command such as quickcalc left a held paste waiting, and the
one-second window for ignoring a late Paste could be consumed by a real
Ctrl+V or missed by a slow answer, so one request could paste twice.
Typed commands now drop a held paste before the UI-command branch. Each
RequestPaste is remembered for 3.5 s, the delivery budget egui-winit
gives its asynchronous Wayland read (elsewhere the answer arrives in the
next frame's input, and nothing arrives when the clipboard has no text).
A Paste is the answer to the oldest request still remembered, so one
whose command was escaped or gave up pastes nothing, while a Paste with
no request outstanding is an ordinary Ctrl+V. This replaces the time
window that swallowed a Paste.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A paste waiting for the system clipboard kept running after Escape, and
a wait that ran out in the same frame as the Paste event, or a Paste that
answered a request already given up on, started a second paste.
Escape (command line and cmdline.key) and starting any other command now
drop a held paste. A Paste event in the frame the wait expires completes
the held command instead of the timeout running it first. After a
timeout or a cancel of a request already sent to the window, one Paste
within one second is treated as that request's late answer and ignored;
a real Ctrl+V inside that second is swallowed once, and pressing it
again pastes.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
After the typed-order change of issue #2899, the sara aa glyph shows ำ in น้ำ and า in นา.
The PDF writer gives a glyph one ToUnicode entry, taken from its first use; krilla wraps a
later use with other text in its own /ActualText span. The test plots นา and น้ำ in one
drawing, in both orders, and reads the page glyph by glyph (ActualText where there is one,
else ToUnicode), which must give the typed words.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The typed-order assignment of a cluster's characters to its glyphs could put a character
second on a glyph where the previous assignment gave every character a glyph of its own.
With น typed before the tone mark and then sara u, the shaper draws sara u before the
tone mark (FreeSerif shapes นุ้ as no, sara u, mai tho): the typed pass matched sara u to its
glyph, so the tone mark went with no and its own glyph showed nothing. Render and the PDF
writer keep a glyph's first character only, so the tone mark dropped out of the PDF text,
where the previous assignment kept all three, out of order.
glyph_chars now takes the typed assignment only when it leaves at least as many glyphs
showing a character as the plain one, and the plain one otherwise. น้ำ, ฐ with sara u as
one glyph and the Devanagari vowel sign before its consonant come out as before; the unit
test gains the unusual order.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A TEXT or MTEXT with น้ำ plotted to PDF in a font such as FreeSerif or Garuda read
นำ้ in its text layer (the first part of issue #2899). The shaper splits sara am into
nikhahit and sara aa and draws the nikhahit before the tone mark. glyph_chars in
crates/fonts/src/complex.rs then gave sara am to the first glyph without a character of
its own, the nikhahit, so in drawing order, which is the order the PDF writes the glyphs
in, sara am came before the tone mark. Fonts that substitute the tone mark (Noto Sans
Thai raises it over the nikhahit) only read right because no glyph matched its own
character.
Within a cluster, own glyphs are now matched only in typed order, the other glyphs take
the remaining characters between them, and a character with no glyph of its own there
goes with the glyph before it, as a ligature's characters already go with the
ligature. In น้ำ the sara aa shows ำ after the tone mark and the nikhahit is drawn as an
outline; ฐ with sara u as one glyph still shows both. Where typed order would need a
character on a glyph before every glyph that shows one (a vowel sign drawn before its
consonant, as in Devanagari), the assignment stays as before: render and the PDF writer
take the first character of a glyph only, so moving a character onto another glyph
would drop it from the text. What is drawn does not change.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Only Ctrl+V reached load_system_text, so a copy made in another CADCraft
window could not be pasted from the Edit menu, the context menu or by
typing PASTECLIP, PASTEBLOCK or PASTEORIG (issue #3320).
A paste started from a menu or typed on the command line is now held for
a frame while the window is asked for the system clipboard
(ViewportCommand::RequestPaste). The resulting Paste event goes through
the same path as Ctrl+V, so the newest of this window's clipboard and
the system's wins, and then the held command runs. If no text arrives
within half a second (the clipboard holds an image or nothing), or a text
field has the keyboard, the command runs at once with what this window
holds. The web build gets a Paste only from the browser's own gesture, so
it keeps its behaviour.
The paste items are offered while a drawing is open and nothing was
copied in this window, instead of being disabled; they report an empty
clipboard when it turns out to be empty. The engine is unchanged.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
MTextLayout only had `bounds`, one box over every column and the gutters
between them, so a background mask drawn from it (the MTEXT background
fill of PR #3240) paints the empty gutters too. Add `column_bounds`: one
box per column in the order the text flows through them, measured like
`bounds` (same corners, rotation and attachment) but each only as wide as
a column and as tall as that column's own height or its text, whichever
is taller. Columns the text leaves empty keep their place; reversed
columns are placed right to left like their text.
A layout with one column, columned or not, has `column_bounds` equal to
`bounds`, so a consumer that switches to it draws exactly what it drew
before. `bounds` itself is unchanged for every other consumer.
For issue #3319.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Discovery checked each reference's own transform, while opening it checks the
transform with everything above it: two small uniform scales together could be
offered and then refused.
Loading an xref drops its dimensions' associations, so writing it back leaves
them out of the file. When the part written back had associative dimensions,
the save says so and lists "dimension associations" in notSaved, pointing at
the backup that keeps them. A dimension drawn during the edit attaches to the
host's copies, whose handles mean nothing in the xref's file: it is written
without those associations, and counted too.
A host dimension style copied into the xref's drawing brings the blocks its
arrowheads are drawn with. A block the written objects still name that the
drawing lacks, such as another xref of the host added with REFSET, refuses the
save: the file, its backup and the edit stay as they were.
The merge replaced the PR's own loss report with main's lost_writing and
lost_message (the conflict was in cmd/file.rs). This covers a case the PR's copy
missed: a proxy an R2000 DXF xref can't keep is named, with the reason and the
backup that still has it.
refedit and refclose touch files, so they move to the FILES list. REFEDIT checks
that the xref's file may be read and written before an edit begins; REFCLOSE Save
checks the file it writes and its .bak before anything is read or written, so
roots put in force since the edit began hold too. A refused save leaves the xref,
its backup and the host as they were, and the edit stays open.
- tests/it/main.rs: keep extend_polyline_end_choice next to extrim.
- file_access/commands.rs: extrim touches no file.
- Two tests follow TRIM keeping the object's handle on its first piece.
The macOS app code is not compiled by PR CI (Linux). The dispatch and its
tests do not need the Apple-event crate, so they now build everywhere and
check the opening and unsaved-changes paths against CadApp on each change.
ARRAYEDIT's columns, rows and items, measured in AutoCAD 2024's core
console, refuse 5.0, 5., 4.5, 1e1 and 8/2 and take +5, 05 and 5, as the
other count prompts do. A count runs from 1 to the MAXARRAY limit.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflict in crates/engine/tests/it/main.rs: keep both array_counts and
main's array_key_point (#2368).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflict in crates/io/src/dxf_read/entities.rs: keep the branch's
keeps_closing_tangent() and main's hatch curve budget parameter (#3306).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflict in crates/render/src/wide.rs dashed(): keep main's point budget
for segments() (#3306) and the branch's closed PLINEGEN anchor.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
From the second automated review of #2355:
- The "loaded" stamp was one per file for the whole process, taken from
the path after the bytes were read. Each xref block now keeps its own
baseline (Block::xref_stamp, session state), taken from the opened
file before and after the read (None when it changed meanwhile), and
another drawing loading the file no longer moves it. REFEDIT uses the
stamp of the one read its handles and version come from, and refuses
unless that is the drawing's baseline; an unknown stamp counts as
changed. The process-wide LOADED cache is gone.
- REFCLOSE Save checks the stamp before reading, of the read itself,
and once more just before the file is replaced (narrowing, not
closing, the window for another program's save).
- It refuses while the xref's file is open in another drawing tab (it
was checked only when the edit began).
- It refuses a file the xref could no longer load (more than
MAX_XREF_OBJECTS, counted as import counts: load::object_count).
- bring_symbols counts distinct symbols only, and refuses the save past
the budget instead of writing with symbols missing; it copies host
multileader styles (with their text style) and table styles (with
their cell styles' text styles) too.
- refedit.levels no longer offers a nested reference REFEDIT would
refuse (scaled differently in X and Y, flat), nor what is below it.
- Faded copies keep the object's own transparency; the renderer fades
them by the current XFADECTL, so changing it during the edit shows.
Each test's folder is now an owned guard removed on drop, so a skipped
symlink test or a failed assertion no longer leaves its files behind.
The save test drew its new line after a `layer` call that does nothing
in JSON (`.ok()` hid it), so the line stayed on layer 0 and the check
that host layers come along could not fail. It makes "Added" current
first (layer.new) and asserts the line and the file's layer table.
Review of #2355 (CodeRabbit, tests/it/refedit_xref.rs:30 and :117).
entity_parts asked RefEdit::is_working, a scan of the working set, for
every object drawn, and read XFADECTL from the header each time: 50,000
working objects meant about a billion handle comparisons per rebuild.
The working set is now a hash set built with XFADECTL once per display
list (render::Fade) and shared by the serial, parallel and viewport
builders.
Review of #2355 (CodeRabbit, render/src/draw.rs:50).
SAVE and SAVEAS list what the writer drops; the write-back wrote the
source drawing straight through and said nothing, so a DWG xref holding
types the DWG writer can't keep (or a 2013+ DXF one holding solids with
SAT-text geometry) lost them silently.
REFCLOSE now counts them as SAVE does, for the version the file is
written in (file::loss_writing: not_saved_as for DWG, sat_text_dropped
for 2013+ DXF), echoes the same warning prefixed with the file and
naming the backup that still has them, and lists them in the result's
notSaved. Nothing lost, no warning.
Review of #2355, point 3.
The write-back used IoHooks::write, which picks the version from the
drawing: an R2000 DWG xref came back as a 2004 DWG (a DWG is written at
2004 or later by default) and an R12 DXF one as R2000. An xref is often
someone else's file, and a version change can lock its author out.
REFEDIT now records the file's version (a DWG's from its first bytes, a
DXF's $ACADVER) and whether it is a binary DXF, and REFCLOSE writes it
back through the write_as hook at that version and form. A version
CADCraft doesn't write (R12) is refused before the edit begins, so no
work is lost; so is a build without the write_as hook. REFEDIT's result
names the version.
Review of #2355, point 2.
The write-back made its own temporary file (`<file>.cadcraft-tmp`, opened
with a plain truncating write) and copied the backup with fs::copy, so a
symbolic link planted at either path took the write: the drawing went
into the link's target and the xref's path became that link (CWE-59).
It now goes through what SAVE uses: the backup is file::backup (written
atomically, a link at the .bak replaced, never written through) and the
new file atomic_write::write_atomic_with (an exclusively created
temporary file renamed over the file). The file written is the one the
xref's path led to when the edit began; REFCLOSE refuses when the path
leads elsewhere by then (a link put there during the edit).
The backup is named by file::backup_path, as SAVE names it: site.dwg's
is site.bak, site.dxf's site.dxf.bak, so two xrefs of one name in one
folder no longer share (and overwrite) one site.bak.
Review of #2355, points 1 and 4.
Conflicts: the doc re-export (Raster next to XrefSource), the system
variable table (XCLIPFRAME next to XFADECTL), the canvas paint calls
(painter is a reference now), the Italian and Ukrainian labels (both
sides kept), and docs/gaps.md and docs/target-app-parity.md, taken from
main: pull requests don't edit those docs any more (AGENTS.md), so the
rows this change affects are named in the PR instead.
crates/fonts/src/complex.rs takes main's pedantic-lint style (#2568) with
this branch's glyph_chars that gives a ligature glyph every character of
its cluster.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The grid that finds which boundary point a hatch vertex sits on kept at
most 16 points per cell. When the point the vertex sat on was one of
those dropped, the vertex matched a kept point of another object, and
the loop followed a line the stretch had left behind.
Every point is kept now. A vertex with more than 16 points in its cell
and the eight around it matches none, and its loop keeps what it has:
it can't tell which object it sits on, and the cap still bounds the
work per vertex.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
An arc with one end inside a stretch frame moved whole. AutoCAD 2024
moves that end and keeps the arc's height over its chord: in its own
stretched copies of library blocks, 84 arcs whose ends moved apart kept
their height to 1.1e-14 of it.
An associative hatch whose loop is made of several lines didn't follow
them: only a loop of one closed polyline was filled again. A straight
loop whose every vertex is a line's end or a flat polyline's vertex of
its boundary objects (within a billionth of the largest coordinate) now
takes those points' new places. The points looked through are bounded.
A tilted arc, and an arc when the frame can't be tested, still move
whole.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A stretch action moved a selected WIPEOUT whole even when only part of
its outline was inside the frame. AutoCAD 2024 moves only the outline's
points inside the frame, as it does for lines and polylines: in its own
stretched copies of a library block, 324 of a 521-point wipeout's points
moved by the distance's change and the other 197 stayed.
The points that move are tested where the dynamic block has them; the
repeated closing point moves with the first. A frame that can't be
tested point by point still moves the wipeout whole, as before.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A dimension is hit anywhere inside the box of its text. That box was read
from the dimension's block without the viewport, so through an MSPACE
viewport a pick in the box of text on a layer frozen in that viewport
still took the dimension, although the viewport does not draw the text.
AutoCAD 2022 picks nothing there.
- doc: ViewportBounds::leaves_out tells whether a viewport leaves a part
of a block out for its layer, by the comparison its boxes already use.
- engine: the text test of a pick and of selection cycling's list skips
the text the viewport leaves out.
Not changed: the rectangle around a dimension is still hit along its
sides (#2991). With the text not drawn its top side runs through the box
of the text, so a pick within pick distance of that side and a crossing
window over it still take the dimension, where AutoCAD takes nothing.
Nothing changes where no layer is frozen in the active viewport: text on
a layer frozen for the whole drawing or turned off is tested as before.
Through an MSPACE viewport a block reference on a layer the viewport draws
was hit on a part whose layer is frozen in that viewport, and that part
took room in the box a window tests. The viewport does not draw the part.
- doc: ViewportBounds measures an entity as one layout viewport draws it,
without the block contents on the viewport's frozen layers.
- render: build_entities_in_viewport builds loose entities as a viewport
that freezes the given layers draws them.
- engine: a pick, selection cycling's list, a window, a crossing window, a
fence and the polygons test a reference against that box and that
geometry. The spatial index is unchanged: the viewport's box is never
larger than the indexed one.
- ui: the highlight of a reference inside the active viewport is built
the same way.
A clipped reference (XCLIP) stays selected by its boundary whatever the
viewport draws inside it, as AutoCAD 2022 selects it: it keeps the box
the drawing gives it.
Nothing changes where no layer is frozen in the active viewport.
Radhika and Mohan Raj reviewed CADCraft's Tamil interface in the running
app on 2026-11-14. ATTRIBUTION.md and docs/localization.md say so instead
of listing the newer rows as unreviewed.
This PR and #2915 each add a prompt to NO_OR and raise its array length
from 28 to 29, so with both merged the array holds 30 entries under a
length of 29 (E0308), whichever lands first. A slice has no length to
keep in step; both PRs make the same change to this line.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
#2548 rewrites BREAK and deletes with_z; with both PRs in, this branch's
call to it no longer compiled (E0425), whichever landed first. Set the
elevation on the polyline lwpoly() makes instead: the same value, and
nothing of this branch depends on with_z any more.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings chord_interpolate's start-condition row ahead of the fit-point
rows, so its system stays banded. chord_closed builds closed chord fits
through it: control points are bit-identical, and a closed fit of 1,000
points took 17.4 -> 3.2 ms (dev profile).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
chord_interpolate added the start tangent or zero-curvature row after
all the fit-point rows, so its column-0 entry sat in row n and solve
swept the whole width. With the start row first, the system has a lower
and upper bandwidth of at most two. The control points come out
bit-identical; a fit took 17.5 -> 4.4 ms at 1,000 points and
414 -> 135 ms at 4,000 (natural ends, dev profile).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
chord_interpolate added the start tangent or zero-curvature row after
all the fit-point rows, so its column-0 entry sat in row n and solve
swept the whole width. With the start row first, the system has a lower
and upper bandwidth of at most two. The control points come out
bit-identical; a fit took 17.5 -> 4.4 ms at 1,000 points and
414 -> 135 ms at 4,000 (natural ends, dev profile).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main's banded solve came with a dense-solver oracle test whose cases all
use chord-length knots; on this branch those go through
chord_interpolate, so the test no longer reached interpolate. Extend it
with square-root and uniform knots, with and without end tangents, and
a 1000-point square-root fit (the same change as on
fix/spline-file-tangent-length).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in main f9c0c96e. Main's clippy-pedantic refactor of
spline_fit.rs conflicted in three places: fit_sanitized takes main's
if-let form and keeps closed_fit's tangent argument, closed_fit keeps
main's #[expect] on its four-parameter signature, and the closed
tolerance test keeps main's bit-exact assert with this branch's comment.
Closed chord-length fits go through chord_closed on this branch, so the
dense-solver oracle's comments say so, and an n=150 closed square-root
fit keeps the large cyclic matrix compared.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
With chord-length knots, open fit-point splines are now built by
chord_interpolate, so fits_are_bit_identical_to_the_dense_solver no
longer reached interpolate (a panic there left the test passing). Add
square-root and uniform knots, with and without end tangents, and a
1000-point square-root fit, so interpolate's matrices, its tangent rows
and the closed cyclic interpolation stay compared with the dense solver.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main's clippy-pedantic refactor of spline_fit.rs restyled the body of
Spline::fit_with; this branch had moved that body into fit_sanitized.
Keep the split and apply main's if-let form inside fit_sanitized.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main gained the Polish catalog, Greek rows, and Additional Tools in place
of Express Tools.
- crates/fonts/build.rs, crates/fonts/src/craft_fonts.rs: keep main's
backticked names and the Tamil `Taml` web face.
- crates/ui-egui/src/i18n.rs: LANGUAGES holds 21 and Preference::ALL 22,
with both Polish and Tamil.
- ta.tsv: Express Tools becomes Additional Tools (கூடுதல் கருவிகள்), the
label every European catalog now translates.
placement read `scale` only when `width` was omitted, so a call with
both a valid `width` and `"scale": "big"` attached the image. `scale`
is now checked first; a valid `width` still takes precedence.
A value of the wrong type for `at`, `scale`, `rotation` or `name` was
taken as omitted, so `"scale": "big"` attached an image one drawing unit
wide and `"at": "nowhere"` put it at 0,0. Each is now refused with an
error. An omitted or null value still takes its default.
When a drawing opened, each image loader checked the decoded total against
the 2 GB limit before decoding and added the image's size only after, so up
to four images of up to 512 MB each could decode at once past the limit.
A loader now starts a file only while the images decoded so far, plus the
largest image each file being decoded can become, fit under the limit, and
otherwise waits for a file to finish. With no other file being decoded one
file always starts, so the total runs past the limit by one image at most,
as it does with a single loader. A file that fails to decode counts nothing.
ta.tsv has 1,507 rows: 1,505 labels and the two count templates (one|other).
It covers every key of the existing catalogs the code still uses and the five
marked strings no catalog has yet, so `cargo xtask i18n` reports nothing
missing for ta. 1,289 rows come from the Tamil CADCraft and shared catalogs
in storytold/craft-i18n, reviewed there by native speakers; the other 218 are
AI-assisted and not yet native-reviewed.
egui's bundled faces have no Tamil letters, so Tamil follows the Arabic path:
an installed Tamil font whose first face has every letter the catalog uses
(theme::tamil_font), or a craft-fonts Taml face, loaded in the Tamil
interface only; the web build keeps Taml faces. Without either the choice is
kept, the interface stays English and the language command says why, and the
picker reads "Tamil" wherever Tamil can't be drawn.
The Properties header's All | My control sized each half 35 px, so a Tamil
"All" ran into "My"; each half now fits its label, and English is unchanged.
Options ▸ User Preferences gets "Check for updates when CADCraft starts"
(on by default, desktop only). Off, the startup check and its "Update and
Restart" prompt never run; Help ▸ Check for Updates… still checks. The
choice is the OPTIONS JSON key `checkUpdatesAtStart`, kept in the profile and
restored by Reset to Defaults, for people who manage updates themselves (an
offline machine, a package manager, a pinned version).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
`tilted` took its points eagerly, so every bulged edge of every LWPOLYLINE and HATCH loop was
tessellated on read, also with extrusion +Z or -Z, where no point can move and the answer is
always "not tilted". It now takes the points as a closure and returns before gathering them
when the normal's x and y are exactly 0. For such a normal `Mat4::ocs` is the identity or
(-x, y, -z), so the result is the same as before.
Brings the branch up to main ca87680f. The one conflict is in
crates/render/src/linetype_text.rs, texts(): main's #2744 adds a point
allowance for the labels of a run, and this branch starts the run a period
before its start. Both are kept: the allowance is charged for each label
placed, and elements before the run's start are skipped before any charge.
Main's new test placed_labels_stop_at_the_point_allowance now passes the
Layout argument this branch added to texts().
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A font may draw a consonant and its below vowel as one ligature glyph:
GNU FreeSerif's Thai liga lookup replaces tho than + sara u with a
single tailless form. glyph_chars gave each glyph of a cluster at most
one character, so the characters left over in the cluster were
dropped and sara u was missing from the shaped text records.
glyph_chars now returns the characters each glyph shows, and the
cluster's last glyph takes any that are left over. push_glyph records
one text glyph per character against the same outline.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Dimension Space, Dimension Style Override and Object Snap Tracking (with its
F11 variant) are also changed by #2580. Use one wording in both pull requests
so they merge in either order:
- Dimension Space: "Espacer les cotes" (menu labels keep the infinitive)
- Dimension Style Override: "Remplacement de style de cote"
- Object Snap Tracking: "Repérage d'accrochage aux objets", as #2102 already
uses for Object Snap Tracking Settings
Follow-up to the French catalog: harmonises rows already on main, without
touching the rows added by #2102.
- Command-line prompts use the imperative (Sélectionnez, Spécifiez, Entrez),
as the other prompts already did; menu and button labels keep the infinitive.
- A dimension object and its style are "cote" / "style de cote"; "Cotation"
stays for the Dimension menu and Quick Dimension.
- Model space is "espace objet", Array is "réseau", a layout is a
"présentation", tracking is "repérage" (object snap and polar).
Rebased on main after #2563: the prompts that lost their trailing "or" keep
the imperative wording on their new keys. The docs/localization-parity.md
row is left to the maintainers, as AGENTS.md asks.
Original wording written from CADCraft's English strings; no proprietary
localization resources were used.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01C4cGqxCFJD1m28x2aqwf7Q
A top-level MTEXT with a non-zero AcadAnnoPO value is drawn upright, so its pick frame no longer turns with the stored rotation. Insertion points now keep a blank frame in the snap pool only when INS is enabled and the point is within the aperture circle, not just the square probe.
The reader drops one closing fit point from a closed spline, so the writer
now adds one whenever the reader will drop one: also after a list that
already ends with its first point (a kink where it closes, as a file can
give it). Before, [A, B, C, A, A] came back as [A, B, C, A], and a later
fit-point edit smoothed the seam. Three points ending with the first are
still written as they are, since the reader keeps them so.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings the branch up to main 6d744887, which has #2954's fix for
mtext::tests::strips_formatting, so the gate runs on a main that passes.
No conflicts.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings the branch up to main 6d744887, which has #2954's fix for
mtext::tests::strips_formatting. The one conflict is in
crates/geom/src/nurbs.rs, where main makes the derivative allocation-free
(#2434, basis_pair_into) and this branch adds reversed_loop. The merged
file is main's plus exactly this branch's own lines.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Blank MTEXT frames use cadcraft_doc::anno_scaled, is_blank_mtext no longer allocates, and
the crossing test accepts the frame. Out-of-reach blank frames no longer use up snap
candidate or intersection slots. Adds tests for each.
AutoCAD 2024 joins only objects that lie in one plane with the polyline:
the plane the polyline and every line picked share, if they share one,
else the polyline's own. Measured: a triangle at Z 5 whose last side slopes
to Z 0 leaves that side out; a sloped line followed by a line turning off
their vertical plane joins neither; a sloped line followed by an arc joins
the line only. Before, a sloped line joined wherever its end met the chain
at the same height.
Also, after review: tests for the sloped line drawn either way, a chain
meeting its start at another height, arcs below Z 0 and mirrored above it,
thickness, the joined polyline's normal and bulges, fuzz in plan only, and
an exact pick on the arc; doc comments for the plane rule, the height
tolerance and tilted arcs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
main now draws, measures, picks and transforms OLE2FRAME records (#2587), which are Unknown
too. Keep that working next to the proxy graphics:
- select: `kept_as_read` leaves out every Unknown but an OLE2FRAME, for picks, windows, ALL,
Last, SELECT by handles and QSELECT;
- render and extents: one Unknown arm for a proxy's graphics and an OLE2FRAME's frame, in
`draw_unknown` and `unknown_bounds`, which also keeps both functions within the cognitive
complexity limit;
- new Unknown literals from main get `graphics: Vec::new()`.
Share the blank MTEXT frame with multileader picking and extend the
candidate bounds used by both scans and the spatial index.
Cover empty and whitespace boxes and preserve normal text picking.
A click on a blank MTEXT is tested in its box turned with the text, not the
axis-aligned box around it (the spatial index and windows keep the larger box).
One helper holds the frame geometry for both.
PEDIT turned a line or an arc into a polyline at elevation 0, so a line at
Z 5 dropped to Z 0, and its Join took any object meeting the polyline in
plan. As AutoCAD 2024 does (measured):
- Convert puts the polyline at the line's height or the arc's centre
height and keeps the thickness; a line's polyline faces up whatever the
line's normal, a mirrored arc's keeps its normal and runs as the arc
does in its own coordinates.
- PEDIT's Join takes an object only where the ends meet at the same
height, and none facing the other way (an arc or polyline whose normal
points down Z where the polyline's points up, or the other way round;
a line counts as facing up). After a sloped line, the chain continues
from its far end's height.
- Multiple's Join leaves out objects facing the other way too, but takes
them at any height.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A blank or whitespace-only MTEXT has no glyph strokes and empty drawn bounds, so
a click inside it, and the spatial index, missed it. It is now picked (and
window/crossing selected) in its width x text-height box, placed by its
attachment point and rotation.
Trim read «حدود التشذيب» ("trim boundaries"), Stretch read «تمديد», the
same word as Extend, and Point read «تأشير», the word the catalog uses
for Dimension. Trim is now «تشذيب», and its two selection prompts match
it (they said «قص», which is also Cut). Stretch, its grip and vertex
items and its selection prompt use «مط». Point is «نقطة», as in Point
Style and Single Point. Written from the meaning of the English strings.
- An object is closed when it is (a closed polyline, circle, full ellipse,
closed spline), not when its ends happen to meet; a crossing at an open
outline's end doesn't count (as in trim), and one at a closed outline's seam
counts once. Preview and trim now agree on touching and ends-meeting cases.
- Each object's crossings with the edge and the trace are found once and
bracketed by binary search; at most 10,000 stretches per call.
- trim's edge_segments looks up the given edges by handle instead of scanning
the space for them.
- An arc's or elliptical arc's side is inside or outside its full circle or
ellipse, as OFFSET has it; the trace limit counts joined points.
- TRACE_GAP, a Side enum, and tests for arcs, ellipses, splines, bulged
polylines, two stretches, touching, ends meeting, the seam and the limits.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A closed object the edge crosses only once can't be trimmed open: it's left
out of the preview and counted in `skipped.uncut`, as is any planned cut the
trim refuses, with a line in the message.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Pick a line, arc, circle, ellipse, polyline or spline, then the side. The edge
is traced a hair's breadth toward that side; every object the trace crosses
loses the stretch between its edge crossings there, trimmed at the stretch's
middle with the edge as the only cutting edge. Objects that don't cross, the
edge itself, blocks, hatches, text and locked layers stay (and are counted).
One undo step, a red preview band that follows the cursor, a JSON form, and
no zero-length pieces left behind.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
JOIN made the new polyline from a line or arc source at elevation 0, so
lines at Z 5 moved down to Z 0. It now takes the source's height, as a
polyline source keeps its elevation with a sloped line joined to it
(AutoCAD 2024, measured), negated when the polyline inherits a normal
pointing down Z. The new polyline itself wasn't measured: the core
console's JOIN never makes one.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A null rows or columns is 1 and a null rowSpacing or columnSpacing is 0,
as when the key is missing. Each count is tested null on its own; the
distances on a 2 x 2 grid, since one row or column drops its distance
anyway.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
JOIN compared chain ends in plan only, so an end meeting another only in
plan at another height was joined and collapsed onto the source's
elevation. Each piece now carries its ends' world heights (a line's own
Z, an arc's centre Z, a polyline's elevation, negated when its normal
points down Z), turned round with the piece, and ends must meet at the
same height too.
Onto a polyline source, an object facing the other way stays out: an arc
or a polyline faces its normal, a line always counts as facing up.
AutoCAD 2024 (accoreconsole, measured) joins a line with normal 0,0,-1
to a polyline facing up, no line to a polyline facing down, and an arc
or polyline only when it faces the polyline's way. A line or arc source
keeps the old behaviour: the core console can't measure it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The format-parity table marks R13 and R14 DWG reading as untested and
2018 as tested only on synthetic files; say the same in the README.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Say so wherever the docs describe a drawing keeping its own version,
as file-format-parity.md already does: save_as writes an explicit
version into $ACADVER, so later saves use it too.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The JSON form read rows and columns as numbers with no fraction, so 2.0 and
1e2 were counts. They must now be JSON whole numbers from 1 to 32767, as the
array commands' JSON counts already are; missing or null is still 1.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
main and this branch each added a row to NO_OR in prompt.rs ("Enter
option" and "Enter a copy mode option") on top of the same 27, and both
declared 28; the merge has 29 rows, so the declared length is now 29.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
These prompts ignored a point. AutoCAD 2024 (measured on INSERT and
MINSERT) takes one as the first of two at the Scale, X, Y, Z and Rotate
presets and at MINSERT's column spacing, asking "Specify second point:"
(the distance is the scale or spacing, the direction the rotation; Enter
there keeps a preset's default); at XYZ's Z a point gives its distance from
the insertion point; Y scale refuses a point. They now do the same, with
AutoCAD's messages at each prompt ("Value must be nonzero.", "Requires
numeric distance or two points.", "Requires valid numeric angle or two
points.", "Requires numeric distance or second point.", "Requires numeric
value."). Exploded INSERT's scale takes a positive number only ("Value must
be positive and nonzero."). The Rotate preset still reads typed text as an
angle, so <<45 stays 45 degrees.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A proxy text takes the first style whose font file it names. The drawing's styles started with
CADCraft's Standard, which the file's Standard replaced in place, so a file listing ISO before
Standard (both on the same font) was saved with Standard first, and the reopened text took it.
Reading now keeps the STYLE table in the file's order as well. Test:
`a_proxy_text_keeps_its_style_after_a_save`.
The JSON spacing form made floor(length / spacing) + 1 items on every path,
so on a closed one the last sat on top of the first (or nearer to it than
the spacing). AutoCAD 2024 fills a closed path with floor(length / spacing)
items and an open one with one more, at its end (measured with Fill entire
path on a closed and an open square and a circle). The spacing form now does
the same, letting length / spacing fall 1e-9 short for rounding.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The count was read as a number with no fraction, so 5.0, 5. and 1e1 were
taken; a point gave its distance from the pick as the count; and Enter ended
DIVIDE. AutoCAD 2024 takes +5, 05 and 2 to 32767, and refuses all of those,
and 4.5, 1, 32768 and x, with "Requires an integer between 2 and 32767, or
option keyword." ("...32767." once Block has been chosen) and asks again
(measured). DIVIDE now does the same. MEASURE, which shares the prompt
machine, is unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
"Enter new order" took a number with no fraction from 1 to 1000, so 5.0 and
1e1 were taken, and a point went back to the vertex menu without a word.
AutoCAD 2024 takes +5 and 05, keeps the order on 4 (a cubic's), and refuses
5.0, 5., 1e1, 4.5, 3, 27 and a point with "Requires an integer between 4
and 26."; the range starts at the spline's own order (measured at orders 4
and 5). The prompt now does the same, and the JSON form's elevate uses the
same wording. The prompt's logic moves to input_order(), which keeps
SplineditM::input under clippy's complexity limit.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Proxy graphics name layers and linetypes by their index in the file's tables, and saving writes
the proxy unchanged. The drawing's LAYER table started with CADCraft's 0 and Defpoints and took
the file's layers after them, so a file without Defpoints at index 1 was saved with its layers
shifted: reopened, the proxy's graphics went to Defpoints, which never plots. Reading now orders
the layer and linetype tables as the file lists them (ByBlock and ByLayer first), with what
CADCraft adds after them. The round-trip test checks that the reopened graphics stay on BALLOONS.
Last searches the store from the top down (`EntityStore::iter_rev`) and stops at the first
selectable object instead of scanning the whole space.
Last skipped only proxies, so with a proxy drawn last it could take an object on a layer turned
off or frozen before it. It now takes the last object a selection may take in
(`select::selectable`), at "Select objects" and in STRETCH. SELECT given handles outright leaves
proxies out as well; other named objects are kept as before. The test covers both.
AutoCAD 2024 doesn't apply MAXARRAY to COPY's Array: with MaxArray 100000,
four lines and 26000 items made 104000 lines. The count is now 2 to 32767
whatever the selection, as AutoCAD asks it. A point at "Enter number of
items to array:" was ignored; AutoCAD refuses it with "Requires an integer
between 2 and 32767." (measured with a LISP point), and so does COPY now.
So that a large selection can't run out of memory, the copies (items after
the first, times the objects) stay within MAX_ARRAY_ITEMS, ARRAY's own limit
whatever MAXARRAY says, checked before anything is made.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The JSON form read `count` with as_u64 and `spacing` with as_f64 and quietly
dropped what didn't fit: a count of 4.5, "8" or -3 made the default 6 items,
0 made 1, and a spacing of 0, -5 or "10" fell back to the count. They are now
refused as the other arrays' JSON forms refuse them: the count goes through
count_or (a whole number of at least 1) and the spacing through size_param (a
positive number). Missing or null keeps the defaults.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
"Specify a precision <10>:" read a number from 0 to 99 and rounded it, so
5.0, 5. and 4.5 were taken. AutoCAD 2024 refuses those, and 1e1, 8/2, 100,
-1 and a point, with "Requires an integer between 0 and 99." and takes +5
and 05 (measured). A point used to convert with precision 10; it is now
refused too.
The JSON form clamped `precision` to 99 and read any other value as 10. It
now refuses a precision that isn't a whole number from 0 to 99; absent or
null is still 10.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The row and column counts were read as a number with no fraction, so 5.0,
5. and 1e1 were taken. AutoCAD 2024 refuses those with "Requires an integer
between 1 and 32767." and asks again, and takes +3 and 03 (measured at the
rows, and 5.0 and +3 at the columns). A point at these prompts was ignored
without a message; AutoCAD refuses it with the same message (measured with
a LISP point at the rows).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Writing the header entries back went through doc_mut, whose copy on
write gave a clean drawing a new Arc, so a refused OPTIONS call marked
it changed. apply now keeps the drawing's Arc when SNAPUNIT or GRIDUNIT
is among the values and puts that same Arc back on a refusal; a call
that names neither never touches the drawing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A proxy's graphics are drawn, measured and snapped to, but no command can edit a proxy, and
saving writes its record as read: a MOVE that took it in left it behind, a COPY stacked a second
one on top. So no selection takes a proxy in: picks, windows, fences, polygons, ALL, Last,
SELECTALL, group members and QSELECT leave it out (`select::selectable`). A test moves a window
round a line and a proxy: the line moves, the proxy stays.
A circle centre or text point that a finite but huge pushed matrix moves past the largest float
is left out, as a polyline's points already were, so no infinity reaches the extents.
"Enter number of items along path" read the count as a distance and cut
it to an integer, so 4.5 gave 4 items and 1e1, 8/2 and 3' were taken.
AutoCAD 2024 takes a whole number from 1 to 32767 in plain decimals
there (5, +5, 05, 5., 5.0) and refuses 4.5, 1e1, 8/2, 3', 0 and 32768
(measured); the count is now read the same way.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The ARRAYRECT, ARRAYPOLAR, -ARRAY and ARRAYEDIT count prompts read a
number with no fraction, so they took 5.0, 4. and 1e1. AutoCAD 2024
refuses those, and 8/2, 3' and 4.5, and takes +3 and 03 (measured at
ARRAYRECT's rows and columns, ARRAYPOLAR's items and rows, and -ARRAY's
rows and items). The count is now read as a whole number.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
options::reset missed 15 profile variables (the Dynamic Input, selection
preview and area, grip, PICKSTYLE and MEASUREINIT settings), so a reset
left them as they were. It now restores all of them; SNAPUNIT and
GRIDUNIT, which the drawing keeps in its header, are still left alone.
apply is all or nothing, but a refused value left SNAPUNIT and GRIDUNIT
written to the drawing's header. Their raw header entries are now put
back as they were, or removed when the drawing didn't have them.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
main added SHX shapes to complex linetypes in linetype_text.rs; this
branch lays linetype elements out with Layout and phase. Both are kept:
shapes go where texts and dashes go (centred on an open run), and
main's point budget counts only the elements placed. main's shape test
now expects the centred positions, as the text test does.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A width given by a point far enough away to overflow is refused with the
message typed text gets, and the width is asked again. In the JSON form, a
point that can't be read says so instead of saying `points` is missing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
AutoCAD 2024 takes "+3" and "03" at "Enter number of items to array:"
(measured: three items each), which the count's integer parse already
does. Say so in the comment and test it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Measured in AutoCAD 2024's core console:
- Objects join whole, by their end points; a polyline is never split, and
one met only at an inner vertex stays as it is. The source is the first
pick JOIN can take (a circle picked first is passed over).
- Where an object meeting the chain at more than one place goes: a
polyline by its first vertex if it can, before the chain rather than
after; a line or an arc turned round if it can. A source that already
ends where it starts still takes more; a join that closes the chain
stops it; a source of no length takes nothing; a lone polyline whose
ends meet stays open.
- Arcs that come round make a circle with no tolerance at the source's
start, and the command line asks "Combined arc segments form a circle.
Convert to circle? [Yes/No] <Yes>:" first; No leaves the arcs. The JSON
form takes the default.
- A new polyline keeps another polyline's widths, and what JOIN makes
goes in the source's space.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Up to three leader points, a text width (not remembered; a point gives its
distance from the leader's end), then lines of multiline text. The text
sits DIMGAP past the end: with the middle of its first line level with it
when the leader runs right (attachment 1), of its last line when it runs
left (attachment 9), whatever DIMTAD. A hook line DIMASZ long is added when
the last segment slopes and text follows. Enter at the first line leaves
the leader alone. Measured in AutoCAD 2024's core console. Alias LE, and a
JSON form.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
AutoCAD 2024 refuses 4.0, 1e1, 8/2, 1' and 3" at "Enter number of items
to array:" (measured), so the count is read as digits, not as a number
with no fraction. Enter at the mOde prompt now runs COPY in the mode the
prompt shows, and OPTIONS reset puts COPYMODE back to 0.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review of #2705: REVERSE turned a closed spline's whole fit list round
while the curve still started at the old first fit point. The DXF
writer, which writes a closed spline's fit points from the first one,
then wrote another seam, and the next fit-point edit moved it.
Measured with AutoCAD 2024 (accoreconsole) on SPLINE (0,0) (4,0) (6,3)
(1,4) Close:
- REVERSE keeps the first fit point first and turns the others round
([f0, f3, f2, f1]); it turns the tangent where the curve closes
(12/13) round and reverses the control points and knots;
- SPLINEDIT Fit data Move, Delete (of the first fit point too) and
Open keep that tangent instead of working it out again from the
points.
So a closed fit spline with chord-length knots now keeps its tangent
where it closes as both end tangents, as AutoCAD keeps 12/13:
- refits, grips and SPLINEDIT take it;
- `Spline::reversed` keeps the seam first and turns the tangent round;
- the DXF reader keeps it for such a spline, and drops the curve's own
tangents that the writer gives the others (periodic knots, a fit
tolerance, a kink);
- SPLINEDIT Close still gives the closed curve its own tangent.
A new closed spline still ignores the tangents given with it.
Also:
- a closed kinked fit stores its fit points from the kink where the
curve starts;
- the closing tangent is divided by its length, not normalised, so a
short one is not a zero tangent;
- AutoCAD's 44 = 1e-10 (no fit tolerance) is read as 0, and a tolerance
too tight to approximate with gives AutoCAD's chord-length build, as
for an open spline.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
AutoCAD 2024 builds a chord-length spline through two points as the cubic
with control points at the thirds whatever the fit tolerance (measured with
tolerance 1: the same control points and knots as with 0, only group 44
differs). The tolerance no longer turns it into a line. The comment on the
interpolation fallback now says what was measured, and the test compares
the result with the tolerance-0 fit.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
COPYMODE (profile, 0 copies until Exit, 1 makes one copy) and the base point
options mOde (sets it) and Multiple (this command only). Enter at the first
second point copies by the base point taken as a displacement. Array asks for
2 to 32767 items, the original included, and spaces them a second point apart
or, with Fit, up to it; Undo takes back the last placement, an array at once.
MAXARRAY caps an array's copies as it caps ARRAY's.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lines on the source's line make it one longer line and arcs on its circle
join counterclockwise from its start, both keeping the source's handle;
arcs that come round to within 1e-6 rad of its start make a circle on the
source's layer. An open polyline source keeps its handle, its own vertices,
elevation, PLINEGEN and (with only lines and arcs) constant width; other
polylines keep their bulges and widths, lines and arcs take the widths of
the source's vertex at that end. The tolerance is AutoCAD's measured 1e-6,
absolute at any coordinate size. The message names a line, arc or circle.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A click on the last fit point adds nothing, but the preview still added
the cursor there, so it showed a corner the command would not make.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Chord-length knots now run to the fit points' length rather than 1, so the
roundtrip check sampled only the first part of those splines. It now
samples the spline's own domain and checks the domain survives the file.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
AutoCAD 2024 (accoreconsole, entget after STRETCH of a spline stored with
fit points only) moves the fit points inside the area and fits the spline
through them again, keeping its fit data (70 = 1064, 74 = 4); with all of
them inside, it moves whole. Here such a spline moved whole by its first
grip, or not at all. The test pins AutoCAD's fit points for three windows:
the last fit point, a middle one, and the whole spline.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
AutoCAD 2024 (accoreconsole, entget of a 4 by 2 rectangle) keeps corners
exactly as long as the shorter side allows: fillet 1, and chamfer 1 + 1 or
1.2 + 0.8, still fit. A hair longer (fillet 1.0001, chamfer 1.2 + 0.81) and
the corners stay square, each still written twice. The rule already matches;
this pins the six measured rectangles, including which way the two chamfer
distances run.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Stacks the closed fit-spline change on the DXF tangent-length one (#2703).
Both change the SPLINE reader; the merged reader keeps both rules:
- an open spline keeps a file's 12/13 tangents with their length and is
rebuilt from fit data with them as the end derivatives (#2703);
- a closed spline drops AutoCAD's closing fit point and takes its
closing tangent from the curve, not from 12/13.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
`transform` dropped a tangent that the map shrank to under EPS of the
tangent's own length. So SCALE 1e-10 lost a (100, 0) tangent, although
the map is invertible.
The check now compares with the map's largest axis scale. An invertible
uniform scale, however small, keeps the tangent. A singular map, or one
that squashes the direction to under EPS of that scale, still drops it.
`scale_factor` (sqrt |det|) would not do: it is 0 for a singular map, so
rounding noise would survive as a direction.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
`sanitized` kept tangents longer than 1e-12, but `Vec2::normalized`
returns zero up to 1e-9, so a direction between the two was stored as
Some(ZERO): a zero end derivative instead of no tangent. Such a direction
is now dropped.
`transform` scales a tangent by the lengths instead of going through
`normalized`, so a short tangent from a file survives MOVE, ROTATE, SCALE
and MIRROR. A map that flattens its direction still drops it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A closed spline through fit points with chord-length knots and no fit
tolerance is now the cubic AutoCAD 2024 builds (measured with
accoreconsole): the open chord-length interpolation through the fit
points and back to the first, clamped, with the same unit first
derivative at both ends. That tangent is the derivative at the first
point of the cubic through the first four points of the loop, with
square-root-of-chord parameters.
AutoCAD flags this spline periodic (group 70 bit 2) although its knots
are clamped: it sets the bit from the curve, the same first derivative
where it closes. `Spline::is_periodic` now means that (closed and smooth
where it closes); the knot shape it meant before is `Spline::wraps`
(unclamped knots, control points wrapping round), which SPLINEDIT uses
for its control-point edits.
DXF: AutoCAD rebuilds a spline with fit data from its fit points and end
tangents, and opened a closed spline written with its fit points once
as an open spline. The writer now adds the first fit point again at the
end and the tangent where the curve closes as 12 and 13, as AutoCAD
writes it; the reader drops the closing point and takes the tangent from
the curve. AutoCAD reads the written spline back as its own (70 = 1067,
the same control points).
Closed splines with square-root or uniform knots, or a fit tolerance,
are unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A DXF SPLINE stored with fit points and 12/13 tangents only is rebuilt
with each stored vector as its end derivative, length included: AutoCAD
2024 does so (12 = (0, 3) gives control points 2.67 from those of the
unit (0, 1)). The spline keeps the vector, so it is written back as read.
Refits (grips, SPLINEDIT, STRETCH) use it as stored, and transforms turn
it and keep its length, as AutoCAD's MOVE, ROTATE, SCALE, MIRROR and
SPLINEDIT Fit data Move do.
SPLINE, SPLINEDIT and the JSON options still take tangents as unit
directions: fit_with normalises them, and SPLINEDIT's input is already
normalised.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
An open spline through fit points with chord-length knots and no fit
tolerance is now the cubic AutoCAD 2024 builds (measured with
accoreconsole, `entget` of the control points and knots):
- the knots are the running chord length, not normalised, with the fit
points' own parameters as the interior knots;
- there are two control points more than fit points: an end with a
tangent has it as its first derivative, an end without one has no
second derivative (with one tangent too);
- two fit points without tangents make a cubic with its control points
at the thirds, no longer a line.
SPLINE also leaves out a click on the point before, as AutoCAD does,
instead of storing a repeated fit point (a kink).
Closed splines, the other knot parametrisations and fit tolerance are
unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
An ACAD_PROXY_ENTITY carries the picture its application left for
programs without it (groups 92/160 and 310); AutoCAD draws it with
PROXYSHOW 1. CADCraft read these entities but drew nothing, so AutoCAD
Mechanical balloons, notes and the like were missing from screen, plots
and extents.
- doc: a decoder for the proxy graphics (ODA DWG specification, "Proxy
Entity Graphics") into read-only entities: circles, arcs, polylines,
filled polygons (solid hatch), TEXT/TEXT2 and their Unicode forms,
colour, layer, linetype, lineweight, ltscale, fill and model matrices.
Bounds-checked, with capped sizes and counts. TEXT2 draws the number
of characters its length field gives.
- io: Unknown gets `graphics`, filled for ACAD_PROXY_ENTITY while the
DXF (and so the DWG bridge) is read. The graphics index layers and
linetypes by the file's table order, which the reader keeps; CADCraft's
own tables are ordered differently. The raw tags are written back
unchanged.
- render, extents, prims: the graphics draw and measure like block
contents (layer 0 and ByBlock are the proxy's own), and can be picked.
After #2603, dashes are laid out only with Options::linetypes on: the
runs stroked with a layout (open, or closed from an anchor) and the
polyline centre line keep that check, so hit tests still draw lines
whole.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Three rules measured in AutoCAD 2024 that main's RECTANG does not follow:
- Area sizes the rectangle so that its outline, corners cut, encloses the
area: _C 1.5 2.5 ... _A 1442.93 _W 35.535 has length 40.817, the
area plus 2 x 1.5 x 2.5 over the width; a fillet adds (4 - pi) r^2.
When the corners then don't fit, they stay square and the area is
the full rectangle's.
- A fillet or chamfer too large for the shorter side leaves each corner
as two coincident vertices, eight in all, as AutoCAD stores them.
- A typed Rotation is an amount turned in the ANGDIR sense from +X,
ANGBASE aside: with ANGBASE 90 and ANGDIR 1, 30 turns the rectangle
30 degrees clockwise. The modes line and the prompt's default show it
as the drawing shows angles: "Rotation=120.00", "30d30'" with AUNITS 1.
The fit test is one function, shared by the vertices and Area. Of the
40 measured cases that set every mode, main's RECTANG matches 33; this
matches all 40.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
#2554, now in main, rewrote RECTANG's vertex order, corners and
remembered modes along the same measurements as this branch. The
conflicts are resolved by taking main's RECTANG as it is. The next commit
brings back, on top of it, the rules this branch measured that #2554
left out.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The 50,000-period guard is for a display zoomed out a lot, so it now applies only where there
is a level of detail (min_pattern above 0). A plot or export has none and keeps the pattern on a
run of any length, bounded by the two-million-element work limit; linetype text follows, through
phase. This is the plot exemption of #1277 (#1069) in the new layout.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The anchor was the length of the first drawn segment, so when the first two
vertices coincide (Polyline::segments leaves that pair out) the pattern was
anchored at the third vertex. It is now the chord length from the first
vertex to the second (wide::second_vertex_at), 0 for that pair, and the
thin run and the wide band share it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The rewritten layout capped runs at 50,000 periods but dropped the
earlier limit of 2,000,000 pattern elements, so a long pattern repeated
that often could produce millions of ranges. A run past either limit is
drawn continuous again.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A JSON pline without a width now takes PLINEWID, as the command does,
unless its vertices give their own widths; an explicit width, 0
included, is kept. FILLET and CHAMFER's JSON forms already fall back on
their variables the same way.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The anchor of a closed PLINEGEN polyline is now the length of its first
segment tessellated at the drawing tolerance, as the run is measured,
not the arc length. With an arc first, a dash now starts right at the
second vertex, matching the filled band, which already measured it so.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
With fill off, a polyline with width draws its centre line. It now goes
through the same layout as a polyline without width: stretched around a
closed PLINEGEN one from its second vertex, along the whole of an open
PLINEGEN one, and restarted at each vertex otherwise.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Measured in AutoCAD 2024 with ANGBASE 90 and ANGDIR 1: Rotation 30 turns
the rectangle 30 degrees clockwise from +X (ANGBASE aside), and the next
RECTANG shows "Current rectangle modes: Rotation=120.00", the rotation
from ANGBASE in the ANGDIR sense; the rotation prompt's default reads
<120.00>. With AUNITS 1, 30.5 shows as "Rotation=30d30'". The typed
rotation is now an amount turned in the ANGDIR sense, and both the
modes line and the default use the drawing's angle settings and units.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A closed PLINEGEN polyline with width now lays its pattern out like a
thin one: stretched around the run from the second vertex
(linetype::ranges_as with Layout::Closed), not centred as an open run.
phase() now gives where the periods of a gap-first pattern start when
the run leaves room for a piece of dash at its start: a gap before the
second element at x, as gap_first lays them, so text in the linetype
sits with its dashes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Patterns were laid out from the start of every run with the first dash
whole. AutoCAD 2024 plots, read back stroke by stroke, show otherwise:
an open run is drawn continuous when shorter than one period, and
otherwise the pattern is centred (n = floor(L / period),
p0 = (n·period + first − L) / 2), the first dash starting at the run's
start and the last ending at its end; a pattern opening with a dot puts
dots at both ends, and one opening with a gap has a rule of its own. A
closed run (a circle, a whole ellipse, a closed PLINEGEN polyline) is
stretched to round(L / period) periods from its anchor (angle 0, or the
second vertex).
linetype::layout makes the drawn stretches for both; apply, apply_as
and ranges use it, the draw code picks the closed layout for circles,
whole ellipses and closed PLINEGEN polylines, and text in complex
linetypes follows the same phase. The measured lines, dots, circle,
rectangles and 33 gap-first cases are pinned in the linetype tests.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream (#1989) builds each crate's tests as one binary; dynblock_params.rs moves into tests/it, and dynamic_grips.rs's new fixture path is one level deeper.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A rotate or scale action with a fixed base point still acts about where the
dynamic block has it after a base point parameter has moved the reference;
AutoCAD replays the whole history instead. The PR said so; the row now does.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- An action that moves a base point parameter moves the reference's insertion point with it and
the block's objects and parameters back, as AutoCAD saves it.
- Alignment parameters: type read, a grip at the base point; dragged next to an object the
reference moves onto it and turns along it, its right side toward the cursor (measured in AutoCAD).
- Lookup columns UpdatedAngle, UpdatedFlip, UpdatedDistanceX/Y, UpdatedX/Y (and polar distance
and angle) set and read, including the reverse lookup; any changed parameter re-evaluates the
lookups that read it.
- A distance of 0 is taken, as AutoCAD takes it.
- A first-time flip value is saved with its state after its points and the flip grip's record
without a point; AutoCAD dropped the reference's dynamic properties otherwise.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream gathered each crate's integration tests into one binary (tests/it); the scale and polar
stretch tests move there. The scale action's doc now says an XY parameter scales by its diagonal,
as the code does.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A polar stretch action turns its objects about the polar parameter's base by the change of its
angle and moves the vertices in its frame (and the objects it doesn't stretch) with the end, as
AutoCAD does; its rotate-only objects just turn. Parameters in its selection are carried.
A scale action driven by an XY parameter scales uniformly by the parameter's diagonal, as AutoCAD
does (the X-only and Y-only choices live only in DWG data that isn't read).
Stretch and move actions on polar and XY parameters were checked against AutoCAD: they already
match.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A scale action scales its objects about its base point by how much the distance it follows grew
(an XY parameter's horizontal and vertical distances each on their own axis), as AutoCAD does,
carrying the parameters in its selection. Factors that would scale to nothing or overflow are
refused.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream (#1989) builds each crate's tests as one binary, tests/it/main.rs; these files moved with their fixture paths.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Custom angle properties were formatted to AUPREC decimals straight from
the value, so 359.7 degrees with no decimals showed as "360". They are now
rounded first and wrapped back into 0 to 360.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
blocks.reference.grips listed an XY parameter's corner grips as baseXEndY
and baseYEndX (serde's camelCase), but blocks.reference.grip takes
basex-endy and basey-endx, so a caller passing a listed grip back was
refused. The corners are now listed by the names a drag takes, and the
command's params doc names them.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A dynamic block reference now repeats its arrayed objects as AutoCAD does:
along a linear or polar parameter one copy per whole column offset in its
distance, across an XY parameter a whole number of columns by rows (just the
object when either is short of one), following the parameter's base point.
Copies after the first carry AutoCAD's AcDbBlockArrayActionTag; without it
AutoCAD can't change the reference again ("Invalid input").
Polar parameters show Distance1 and Angle1, XY parameters X Distance1 and
Y Distance1, in Properties (editable, value sets applied; an XY distance
below its minimum is refused as AutoCAD refuses it), with square grips at
the base and end and an XY parameter's two other corners.
Checked against AutoCAD with a linear, a polar and an XY array block: copy
counts and positions match for each value tried, AutoCAD reads CADCraft's
saved values and geometry, and changes them again.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The rotation grip is drawn where its grip object is, which can be off the
radius' end; its stops are now marked there too (the grip object's angle and
distance from the base added to each value), not at the radius' end.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A distance or angle whose values are a list, or go by an increment, stops
only at those values; while its grip is dragged, the preview marks each stop
with a short tick across the grip's travel (a few pixels, whatever the zoom),
as AutoCAD does. `dynblock::grip_stops` gives the stops: along a distance from
the point that stays, or from its midpoint, and round an angle's circle (a
full turn being no turn).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
main now denies cognitive_complexity over 30: apply() was at 35 with the
rotate and flip actions. The action loop becomes ActionRun, one method per
kind of action (rotate and flip, stretch and move), and the carrying of a
parameter by a stretch is shifted(). No change in what the actions do.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A repeated handle queued the transform twice: a flip mirrored the object back
while its value recorded the flip. Repeats are skipped, as the stretch and
move path does.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A new flip value from a one-point record had its state (70) written before
the end point was added, between the two points.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
It still said only visibility states and lookups could be changed and
that only stretch and lookup actions were read. Distances and positions
(stretch, move), angles (rotate) and flip states (flip) can be changed,
and their value records are saved.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A flip record was told from another two-point record by a group 70 after
its points. A stray 70 on a linear or rotation record made its value a
flip (and ignored), and a flip record without its state was read as
plain points. The parameter the record is keyed by now decides.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
At a rotation grip AutoCAD's Dynamic Input asks for the angle alone; CADCraft
showed a distance and an angle from the grip. A prompt can now say it asks for
an angle about its base (`Prompt::angle`), and a command can give the value
the cursor would give (`Interactive::live_value`, under the crash guard;
`Session::live_value`). The rotation grip does both, with the angle as
Properties will show it, and the canvas draws one box: what was typed, else
that live value.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A flip mirrors text and attributes but AutoCAD draws them readable (MIRRTEXT
0): the text keeps the mirrored footprint, so text that ran away from the
symbol still runs away from it on the other side. CADCraft mirrored only the
text's anchor, so flipped text ran back across the block. Text carried by an
action that mirrors now reads in whichever mirrored direction is nearer its
own, and swaps left and right justification when its footprint is reversed
along it (AutoCAD keeps the justification and moves the start back by the
text's width, which draws the same; it re-derives attributes from the block
when it next changes them), top and bottom when reversed across it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The flip grip was a narrow triangle; AutoCAD draws a block arrow, a short
shaft and a head about as wide as a square grip. Its shaft and head are filled
apart (the painter fills convex shapes) and outlined as one.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
AutoCAD shows an angle parameter's value as it shows any angle: from ANGBASE,
clockwise when ANGDIR is 1. In a drawing measured clockwise from north it shows
an Angle1 of 0 as 90, and 0.5 rad as 61.35 (checked in AutoCAD). Properties and
typed values (blocks.reference.set, a value typed at the rotation grip) now
convert the same way; the stored value is unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
AutoCAD draws a rotation parameter's grip where the block's grip object is,
which need not be the radius' end (a well-centre symbol has it a quarter turn
round), and turns it with the angle. CADCraft drew it at the radius' end. The
grip is now placed from its grip object, kept along and across the radius as
it turns (as the flip grip already was), and dragging it subtracts the grip's
offset from the radius, so the block turns by the cursor's turn instead of
jumping to the cursor's direction.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A rotation parameter's grip (a circle at the radius' end) turns the angle when
dragged (a typed number sets it, in degrees); a flip grip (an arrow across the
reflection line, placed from its grip object and turning with the line) flips
at a click. A flip value record keeps its state after its points, also in a
record CADCraft writes without a template. A synthetic Symbol fixture covers
reading, turning, flipping, grips and bad values. Also: #967's test
expectation counts positions from 0.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Angle1 (degrees, as Properties shows them) turns the rotate action's objects
about its base point; Flip state1 mirrors the flip action's objects across
the current reflection line (text stays readable). Parameters in the
selection are carried along, attributes follow, the flip grip's record and
the history are written as AutoCAD writes them. Checked against AutoCAD's own
output for the same changes: value records, history and geometry match.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Picks up #2302, which formats crates/render/src/dim/linear.rs; the
gate's fmt step failed on that file, not on this branch's changes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A full-sweep arc (start = end) has a zero chord, so rebuilding it from
the moved ends gave nothing and STRETCH left it in place even when the
window held all of it. When both ends move, translate the arc instead;
rebuild from the ends only when one of them moves.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
#2239 replaced stretch.rs's glob import with an explicit list, and the
new arc rule names cadcraft_geom::Arc, which only the glob brought in, so
the branch no longer compiled on main. `use cadcraft_geom::Arc;` after
the use super::{…} block is the only change the merge needs. Reported in
review.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
#2239 replaced rect.rs's glob import with an explicit list that names
rect_with_corners, which this PR removes (the new vertex builder replaces
it), so the branch no longer compiled on main. Dropping the name from the
list is the only change the merge needs. Reported in review.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Bounds2 skips non-finite points, so a glyph with one overflowing corner
could be culled from the few corners left. Any non-finite corner now
leaves the glyph to the mesh code.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Screen builds left out a filled glyph when a fixed font-unit box
(-1000..2000) placed by its transform missed the view, so ink reaching
more than an em past its box (flourishes, long ligatures, tall stacks,
large operators) vanished when the view saw only that part. Each
outline now records its font-unit bounds once as it is built, exposed
as ttf::glyph_bounds through the same per-thread and shared outline
caches, and may_show places those four corners instead: exact, and
still four points per glyph however long its outline.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
AutoCAD's published system variable reference gives ATTDIA an initial
value of 0: a typed INSERT asks for attribute values at the command line,
which also keeps scripts and agents typing through the command line as
before. ATTDIA 1 still opens the Edit Attributes dialog. The dialog tests
set ATTDIA 1 themselves; a new check shows the default opens no dialog.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Two review questions, answered by measuring AutoCAD 2024 (accoreconsole,
read back with entget):
- A crossing window that holds a spline's control point but misses the
drawn curve selects nothing in AutoCAD ("0 found"), so the spline stays
put; CADCraft does the same. Only a window that also crosses the curve
moves the control point, (10,100) to (15,103). Both cases join the test.
- An arc end stretched onto the other end: AutoCAD collapses the arc into
a zero-radius arc at that point (radius 6e-16). CADCraft keeps the arc
rather than make an object nothing can draw or pick; the code says so.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
PLINE now starts at PLINEWID and stores its widths back, but the
variable itself was out of reach: typing PLINEWID was an unknown command
and GETVAR an unknown variable until a Width answer happened to set it.
It joins the header-variable table (a real of at least 0, default 0, as
in AutoCAD), so GETVAR reports 0, SETVAR and the typed name set it, and
SETVAR ? lists it. Suggested in review.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
With chamfer, fillet, width, elevation, thickness and rotation carried
over, a plain RECTANG can draw something its own command never asked for,
and nothing said so. It now opens with AutoCAD's line, in AutoCAD's words
and order: "Current rectangle modes: Chamfer=1.6574 x 2.8497 Rotation=50.50",
"Current rectangle modes: Elevation=7.5000 Thickness=2.2500 Rotation=30.96"
(both from AutoCAD 2024's log for the same inputs); no line when every
mode is off. POINT already echoes its modes the same way. Suggested in
review.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every attribute of a block reference had a grip, also those locked in
position and invisible ones, which AutoCAD gives none. Dragging a multiline
attribute's grip moved its position but not its multiline text, so the grip
moved and the text stayed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The moved attribute's insertion and its multiline text's are checked
again after saving to DXF (in the drawing's version; R2000 DXF has no
multiline attributes) and reopening.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The reference's attribute moved with its definition, but a multiline
attribute's text (its embedded MTEXT) stayed behind; the grip preview drew it
as one line. Both landed before multiline attributes (#854) and couldn't use
them.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A typed or menu INSERT asks a Verify attribute's value twice and gives
Preset (and constant) attributes their defaults without asking. ATTREQ 0
gives every attribute its default; ATTDIA 1 (the default) asks for the
values in an Edit Attributes dialog, typed answers still working. Both are
user settings, as DWG keeps them in its header only before R2000. Answers
are counted per prompt, so two definitions with one tag no longer ask the
second for ever. The JSON form never asks.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
REFEDIT on an xref (or a block that came with one) edits it in place, and
REFCLOSE Save writes the change into the source drawing (the old file
kept as .bak, symbol prefixes removed, host symbols copied, handles kept)
and reloads the xref. Refused for read-only files, files locked by
another program or open in another tab, and files changed since they
were loaded or during the edit. Nested references are picked through
their parents (path, nested, refedit.levels, "Select nesting level
[OK/Next]"). Everything outside the working set is drawn faded
(XFADECTL), and an Edit Reference bar offers Add to/Remove from Working
Set and Save/Discard Changes. Gap F2.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
#2220 moved STRETCH to cmd/modify/stretch.rs; keep_height and the arc,
polyline-bulge and spline rules move with it, unchanged, below the doc
comment #2220 gave stretch_entity.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
#2220 moved PLINE's prompt machine to cmd/draw/line_pline.rs; the fix
(PLINEWID as the starting width, Undo returning to the last segment's
mode) moves with it, unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
#2220 moved RECTANG from cmd/draw2.rs to cmd/draw2/rect.rs and LastUsed
from lib.rs to last_used.rs. The fix moves with them: rect.rs carries the
AutoCAD vertex rules, draw2 re-exports RectangModes, and LastUsed keeps
the remembered RECTANG options.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Area sized the rectangle so that its cut corners take nothing off the
area asked for, but it did so even when the fillet or chamfer turned out
too large for the resulting sides and the corners stayed square: Area 4,
length 4, fillet 2 drew a square-cornered 4 x 1.858 rectangle. When the
corners don't fit, the sides now come from the area alone (4 x 1), in the
JSON form and at the prompt. Pointed out in review.
The fit test now lives in one place (corners_fit, with corner_cuts) and
is shared by the vertex builder and the Area sizing. All 64 measured
AutoCAD cases still match vertex for vertex.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
When a stretch brings both ends of a polyline arc segment together, the
chord is zero and there is no arc height left to keep; keep_height still
returned the old bulge, which then sat on a zero-length segment. It now
returns 0 (also for a NaN chord). Pointed out in review.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
STRETCH was checked against AutoCAD 2024 black-box: 36 crossing-window
cases run in accoreconsole (lines, polylines, arcs, circles, text,
ellipses, splines, points, block references), each object read back with
entget. Lines, straight polylines, circles, text, full ellipses, points
and block references already matched; three kinds of object did not.
- Arcs moved whole when their centre was inside the window and were left
alone otherwise. AutoCAD moves the ends that are inside and keeps the
arc's height, bulge x chord / 2: the arc (0,0) r20 0-90 deg with its
start stretched by (5,3) becomes centre (3.1798, -2.2061), radius
22.4326. The centre alone moves nothing.
- Polyline arc segments kept their bulge, so they ballooned or flattened
as a vertex moved. AutoCAD keeps their height too: bulge 0.5 over a
chord of 25 becomes 0.6338 when the chord shrinks to 19.72 (and -1.5
becomes -1.2303 over a longer one).
- Splines moved whole when their first grip was inside, and stayed put
otherwise. AutoCAD moves the control points inside the window. Splines
built from fit points keep the old behaviour, which was not measured.
An elliptical arc with one end inside is still left as it was: AutoCAD
changes the whole ellipse there by a rule one measurement does not pin.
The new test stretch_arcs_bulges_and_splines_match_autocad pins nine of
the measured cases.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
PLINE was checked against AutoCAD 2024 black-box: 76 typed inputs run in
accoreconsole, read back with entget and GETVAR. 72 matched; with this
change all 76 do.
- Undo after an arc segment stayed in arc mode, so a following `_L` was
arc mode's Line instead of line mode's Length and the point became a
plain vertex. AutoCAD returns to the mode of the segment now last:
`_A` point `_U` `_L` point continues the last line by the point's
distance, ending at (64.48701958199356, 48.21692560701169) in the
measured case.
- PLINEWID was ignored: AutoCAD starts every polyline at that width
("Current line-width is 0.7500") and stores the ending width of the
last Width or Halfwidth answer back into it (`_H 0.5 0.5` leaves
PLINEWID 1).
The new test pline_undo_mode_and_plinewid_match_autocad pins both with
the measured numbers.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
RECTANG was checked against AutoCAD 2024 black-box: 64 typed inputs run
in accoreconsole, each polyline read back with entget. 18 matched; with
this change all 64 match vertex for vertex.
- Vertex order: AutoCAD starts at the first corner and runs along the
first axis towards the other corner, so a rectangle is clockwise when
the corners are picked down-right or up-left. CADCraft always started at
the lower-left corner and ran counterclockwise.
- Chamfer: the first distance is cut on the edge into each corner and the
second on the edge out of it, in drawing order. CADCraft cut the first
along x and the second along y, which mirrors the corners whenever the
two distances differ.
- Fillet bulges follow the drawing direction: negative on a clockwise
rectangle.
- A fillet or chamfer too large for the shorter side leaves each corner
as two coincident vertices (8 vertices, no arcs), not 4 vertices.
- Chamfer and Fillet replace each other: the option set last wins.
CADCraft kept the fillet when a chamfer was set after it.
- Area sizes the rectangle so that the outline, with its corners cut
off, encloses the area given: L = (A + 2*d1*d2) / W for a chamfer and
(A + (4 - pi)*r^2) / W for a fillet. This applies to the JSON form too.
- Chamfer, fillet, width, elevation, thickness and rotation carry over to
the next RECTANG (AutoCAD opens it with "Current rectangle modes:
Fillet=2.0000" or "Elevation=7.5000 Thickness=2.2500 Rotation=30.96").
They are kept in LastUsed; the JSON form stays stateless.
The new test rectang_vertices_match_autocad pins 12 of the measured
cases, one or more per rule. Three older tests change with the measured
behaviour: an oversized fillet now gives 8 coincident-pair vertices, and
two tests that draw several rectangles in one session set the remembered
rotation or fillet back explicitly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each thread kept up to 8192 glyph outlines in front of the shared cache with no size limit, and
held them after the shared cache let them go. They are now held within MAX_SHAPED_POINTS / 16
points per thread, and an outline above a quarter of that is read from the shared cache instead.
The generation test reads the cache before checking the generation, so another test's change in
between can't fail it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each thread's text meshes were capped at 4096 entries but not by size; CJK text at full detail
could hold hundreds of MB per core. They are now capped at 16 MiB per thread (with the shared
cache's size estimate), and a mesh above a quarter of that is read from the shared cache instead.
A font lookup that ran while a font was being registered could keep the old answer (a "not
found") on that thread until the next change. The generation is read before the lookup, and the
answer is kept only under that generation, so a lookup overtaken by a change starts over.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add the safe macOS event bridge adapted from #683 and six opening/quit regression tests. All six cargo xtask ci gates passed, with 2,014 tests, plus packaged LaunchServices smoke tests.
Co-authored-by: Isaac Levine <[email protected]>
Adapted from PR #683 to current main, retaining the existing accessibility dependency and async opening behavior. Validated together with the Apple-event module and regression tests.
Co-authored-by: Isaac Levine <[email protected]>
Display lists are built on all cores, but every text looked its font up,
and every character its font lacks (all of a CJK text's) its fallback
font, glyph outline and glyph mesh, through shared tables behind global
locks; text-heavy drawings spent most of the build waiting on them.
Font lookups, fallback faces, FONTALT, glyph outlines and glyph meshes
now have per-thread caches in front of the shared ones (a generation
counter empties them when fonts or FONTALT/FONTFALLBACK change).
On screen, filled glyphs outside the area being looked at are left out,
as hatch patterns already are (the canvas builds again when the view
leaves that area); plots and exports keep every glyph. Zoomed in, every
glyph of every text was filled at that zoom's detail and drawn each
frame, i.e. on every mouse move.
Synthetic 3.8 MB drawing (24,000 TEXT and 2,500 MTEXT in Chinese, 30,000
lines), macOS, Apple silicon: display list at fit 335 -> 103 ms;
triangles at 16x zoom 11.2 M -> 0.44 M, at 64x 19.0 M -> 45 k.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 09:58:53 -06:00
571 changed files with 66815 additions and 4538 deletions
Checks for the crates you changed: `cargo test -p <crate>`, `cargo clippy -p <crate> --all-targets -- -D warnings`, `cargo xtask layers`, `cargo xtask assets`, `cargo xtask wasm`, `cargo xtask parity` (regenerates `docs/parity-checklist.md`).
Headless column ([RFC-0052](https://github.com/storytold/craft-contrib/blob/main/rfcs/0052-headless-reach.md)): `cargo xtask parity` marks a covered menu item `headless: yes` because its command is in the engine registry that `cadcraft-cli` and the MCP server load. An uncovered item takes `no`/`partial` and a `reach` (`window`, `os`, `engine-gap`) from `HEADLESS` in `xtask/src/parity.rs` (a path ending in ` > ` covers its submenu), or reads `unknown`. Never write `yes` there. A covered leaf is `yes` whatever its marks say, so a submenu mark stays while any leaf under it is uncovered; drop a mark only once commands cover every leaf it matches (the check then fails on it as stale).
Paths and conventions:
- No crate allows `unsafe` (`unsafe_code = "forbid"` in the workspace).
@@ -19,10 +19,13 @@ Generated-in-code assets are original and have no file to list:
- the standard linetype and hatch-pattern libraries (`crates/doc/src/library.rs`; industry-common
names, our own dash/spacing values);
- the colour index palette, generated from its structure (`crates/color/src/lib.rs`);
- the sample drawings (`crates/engine/src/sample.rs`).
- the sample drawings (`crates/engine/src/sample.rs`);
- the synthetic two-hexagon hatch logo (`crates/io/tests/it/hatch_loop_flags.rs`, `logo`):
original contributor geometry, generated in code from invented points, under MIT OR Apache-2.0.
| Asset | Author | Source | Licence | Notes |
|---|---|---|---|---|
| `crates/ui-egui/src/i18n/zh_shared.tsv` | @V1dalTheAbidal | [craft-i18n #444](https://github.com/storytold/craft-i18n/pull/444), [pinned Simplified Chinese CADCraft catalog](https://github.com/storytold/craft-i18n/blob/9fa32aecf2759cd61bb216a958df68da619798f3/locales/zh-hans/cadcraft.tsv#L201) | MIT OR Apache-2.0 | Exact generated one-row projection for offline builds; AI-assisted, not native-speaker reviewed. |
| `licenses/jpeg-encoder-0.6.1/` | jpeg-encoder contributors and Independent JPEG Group | [jpeg-encoder 0.6.1](https://crates.io/crates/jpeg-encoder/0.6.1) | (MIT OR Apache-2.0) AND IJG | Dependency license and SIMD notices; source hashes in SOURCE.json. |
| `epaint_default_fonts::EGUI_ICONS`, `epaint_default_fonts::EMOJI_ICON` (dependency font inputs) | John Slegers | [egui 173cc737](https://github.com/storytold/egui/tree/6d518fc799681571963842f95b55a6b68431b15a/crates/epaint_default_fonts/fonts), [emoji-icon-font](https://github.com/jslegers/emoji-icon-font) | MIT (Copyright (c) 2014 John Slegers; full upstream text in `NOTICE`) | egui-icons.ttf is the five-glyph subset; emoji-icon-font.ttf is the full monochrome fallback. Registered by the production default font definitions; dependency assets unmodified here, no font file copied into this repository. |
| `krilla 0.8.2 / icc/sGrey-v2-magic.icc` (dependency-embedded) | Clinton Ingram | [craft-libs 9f89fe8 vendor/krilla/icc/sGrey-v2-magic.icc](https://github.com/storytold/craft-libs/blob/9f89fe8f6d72ab4db4cc06f186381a6a254463ab/vendor/krilla/icc/sGrey-v2-magic.icc) (Krilla 0.8.2 upstream 3ffdf0588cf98050aad6edba51ca70162e1fb5b5) | CC0-1.0 | Embedded by the pinned PDF writer (`craft-pdf` 0.1.0, Krilla 0.8.2); unmodified dependency asset, no file copied into this repository. SHA-256 `4110169287e5f1b5149ca9f1da1814d32943905bba8030e849d1a3b729a19481`. |
@@ -43,6 +46,12 @@ Generated-in-code assets are original and have no file to list:
| `assets/app-icon/cadcraft-256.png` | CADCraft contributors | generated | MIT OR Apache-2.0 | |
| `assets/app-icon/cadcraft-1024.png` | CADCraft contributors | generated | MIT OR Apache-2.0 | |
| `assets/app-icon/cadcraft-macos-512.png` | CADCraft contributors | generated (macOS margin variant) | MIT OR Apache-2.0 | |
| `assets/app-icon/README.md` | CADCraft contributors | original work for this repository | MIT OR Apache-2.0 | How each icon is generated and which mark each channel uses |
| `assets/app-icon/cadcraft-nightly.png` | CADCraft contributors | generated from `assets/app-icon/cadcraft-1024.png` | MIT OR Apache-2.0 | Nightly mark: same glyph, deeper background `#0c657b`; the Linux nightly tar's icon |
| `assets/app-icon/cadcraft-nightly-1024.png` | CADCraft contributors | generated from `assets/app-icon/cadcraft-1024.png` | MIT OR Apache-2.0 | 1024 master the nightly `.icns` is generated from |
| `assets/app-icon/cadcraft-nightly.ico` | CADCraft contributors | generated from `assets/app-icon/cadcraft-nightly-1024.png` | MIT OR Apache-2.0 | Windows nightly icon (16–256 px entries) for `build.rs` |
| `assets/app-icon/cadcraft-nightly.icns` | CADCraft contributors | generated from `assets/app-icon/cadcraft-nightly-1024.png` | MIT OR Apache-2.0 | macOS nightly bundle icon (`CFBundleIconFile cadcraft-nightly`) |
| `assets/app-icon/nightly-provenance.json` | CADCraft contributors | original work for this repository | MIT OR Apache-2.0 | The exact background transform that produced the nightly set |
| `packaging/macos/dmg/background.svg` | @XusBadia | original work for this repository (2026-10-08), "CADCraft macOS DMG window background"; derived from the CADCraft app icon (`assets/app-icon/`, referenced via `<image>`, not copied); text is outlined Inter / JetBrains Mono glyph paths (OFL fonts the project already uses); no third-party material modified | MIT OR Apache-2.0 (same as the code: `LICENSE-MIT`, `LICENSE-APACHE`) | Finder window background of the macOS DMG; `packaging/macos/dmg/generate.py` renders it to `background.tiff` (see `packaging/macos/dmg/README.md`) |
| `packaging/macos/dmg/background.tiff` | @XusBadia | Rendered from `packaging/macos/dmg/background.svg` by `packaging/macos/dmg/generate.py` | MIT OR Apache-2.0 (same as the code: `LICENSE-MIT`, `LICENSE-APACHE`) | 1x + 2x HiDPI TIFF for the macOS DMG window; includes the app icon (see its row) and LittleCMS's built-in sRGB profile ("No copyright, use freely") |
| `examples/apartment.dxf` | CADCraft contributors | sample drawing made with cadcraft-cli commands | MIT OR Apache-2.0 | Original |
@@ -70,7 +79,7 @@ Generated-in-code assets are original and have no file to list:
| `crates/ui-egui/src/i18n/bs.tsv` | Nine (@nine-codes) with Claude Code (AI-assisted) | Original Bosnian translations of CADCraft English strings, shared with storytold/craft-i18n `locales/bs/` | MIT OR Apache-2.0 (`LICENSE-MIT`, `LICENSE-APACHE`) | No proprietary localization resources copied; not yet reviewed by a native speaker |
| `crates/ui-egui/src/i18n/cs.tsv` | @Losminek (AI-assisted) | Original Czech translations of CADCraft English strings | MIT OR Apache-2.0 (`LICENSE-MIT`, `LICENSE-APACHE`) | No proprietary localization resources copied |
| `crates/ui-egui/src/i18n/ru.tsv` | @pechnikov2026-star | Original Russian translations of CADCraft English strings | MIT OR Apache-2.0 (`LICENSE-MIT`, `LICENSE-APACHE`) | No proprietary localization resources copied |
| `crates/ui-egui/src/i18n/fr.tsv` | @pechnikov2026-star | Original French translations of CADCraft English strings | MIT OR Apache-2.0 (`LICENSE-MIT`, `LICENSE-APACHE`) | No proprietary localization resources copied |
| `crates/ui-egui/src/i18n/fr.tsv` | @pechnikov2026-star; terminology pass by @YannFR81 | Original French translations of CADCraft English strings; AI-assisted consistency pass (imperative prompts, cote/espace objet/réseau/présentation) | MIT OR Apache-2.0 (`LICENSE-MIT`, `LICENSE-APACHE`) | No proprietary localization resources copied |
| `crates/ui-egui/src/i18n/zh.tsv` | @mayloglog | Original Simplified Chinese translations of CADCraft English strings | MIT OR Apache-2.0 (`LICENSE-MIT`, `LICENSE-APACHE`) | No proprietary localization resources copied |
| `crates/ui-egui/src/i18n/sv.tsv` | Erik Holmbom (@holmbom) with Claude Code (AI-assisted) | Original Swedish translations of CADCraft English strings | MIT OR Apache-2.0 (`LICENSE-MIT`, `LICENSE-APACHE`) | No proprietary localization resources copied; terminology and the running app reviewed by a native speaker |
| `crates/ui-egui/src/i18n/it.tsv` | Emanuele Bottelli (AI-assisted); terminology corrections: Andrea Brandi (@starise) with OpenAI Codex (AI-assisted) | Original Italian translations of CADCraft English strings | MIT OR Apache-2.0 (`LICENSE-MIT`, `LICENSE-APACHE`) | No proprietary localization resources copied; targeted Chamfer terminology review by a native speaker |
@@ -79,5 +88,41 @@ Generated-in-code assets are original and have no file to list:
| `crates/ui-egui/src/i18n/hu.tsv` | @Skaywalker | Original Hungarian translations of CADCraft English strings | MIT OR Apache-2.0 (`LICENSE-MIT`, `LICENSE-APACHE`) | No proprietary localization resources copied |
| `crates/ui-egui/src/i18n/tr.tsv` | @ogzhnklvz (AI-assisted) | Original Turkish translations of CADCraft English strings | MIT OR Apache-2.0 (`LICENSE-MIT`, `LICENSE-APACHE`) | No proprietary localization resources copied; written from the English strings, no other catalog used as a source; the running app reviewed by a native speaker |
| `crates/ui-egui/src/i18n/el.tsv` | @Camthalion77 with ChatGPT (AI-assisted); 46 later rows: @V1dalTheAbidal with Claude Code (AI-assisted) | Original Greek translations of CADCraft English strings | MIT OR Apache-2.0 (`LICENSE-MIT`, `LICENSE-APACHE`) | No proprietary localization resources copied; the 46 later rows were read by their contributor, a native Greek speaker; independent native proofreading of the whole file pending |
| `crates/ui-egui/src/i18n/vi.tsv` | @2ez4gcx with Claude Code (AI-assisted) | Original Vietnamese translations of CADCraft English strings | MIT OR Apache-2.0 (`LICENSE-MIT`, `LICENSE-APACHE`) | No proprietary localization resources copied; terminology chosen with a native speaker, full proofreading pending |
| `crates/ui-egui/src/i18n/vi.tsv` | @2ez4gcx with Claude Code (AI-assisted) | Original Vietnamese translations of CADCraft English strings | MIT OR Apache-2.0 (`LICENSE-MIT`, `LICENSE-APACHE`) | No proprietary localization resources copied; terminology and the craft-i18n#401 phase 1 changes reviewed by a native Vietnamese speaker; older rows not yet proofreadin full |
| `crates/ui-egui/src/i18n/ka.tsv` | Davit Matchakhelidze (@devius), native speaker, with Claude Code | Original Georgian translations of CADCraft English strings | MIT OR Apache-2.0 (`LICENSE-MIT`, `LICENSE-APACHE`) | No proprietary localization resources copied; written from the English strings, no other catalog used as a source; terminology and doubtful strings decided by a native Georgian speaker; no font assets added (the Georgian face comes from craft-fonts) |
| `crates/ui-egui/src/i18n/ta.tsv` | @newsbaba24x7 (AI-assisted) | Original Tamil translations of CADCraft English strings, shared with storytold/craft-i18n `locales/ta/` | MIT OR Apache-2.0 (`LICENSE-MIT`, `LICENSE-APACHE`) | No proprietary localization resources copied; written from the English strings; the 1,289 rows from craft-i18n reviewed there for language and terminology by native speakers, and the whole Tamil interface reviewed in the running app by native speakers Radhika and Mohan Raj (2026-11-14); no font assets added (Tamil comes from an installed font or the craft-fonts face) |
## PDF import
The CAD mapping and initial synthetic PDF tests are adapted from CADCraft contributor
direct distance entry, window and crossing selection, grips, and right-click-to-repeat behave
the way decades of drafting habit expect.
- **Open files.** DXF is read and written natively (ASCII and binary, R12 through 2018), and DWG
files (R13 through 2018) open and save through the open-source acadrust library. Export to SVG
and PNG today.
- **Open files.** DXF is read natively (R12 through 2018, with binary support from R13) and
written as 2000 through 2018 (ASCII and binary). DWG files (R13 through 2018; R13 and R14
untested, 2018 tested only on synthetic files) open through the open-source acadrust library
and save as 2000 through 2018. New drawings default to
2018 (AC1032) in both formats. In the app's Save dialog, File ▸ Default Save Format
(also Options ▸ Open and Save, `saveVersion`, default 2018) sets the version for untitled
drawings; drawings with a file keep their own version, subject to supported-version mapping
and the DWG minimum. SAVEAS `version` overrides this choice and is remembered for later
saves. Export to SVG and PNG today.
- **Fast and native.** Pure Rust and egui, no Electron, no web view. One binary on macOS
(universal), Windows, Linux and FreeBSD, plus a WebAssembly build for the browser.
- **Built for agents.** Every menu item, tool and prompt is a command. Agents can type at the
@@ -114,11 +120,11 @@ numbers):
| Layers & properties | Layers palette and Layer Properties Manager (on/off, freeze, lock, plot, colour, linetype), layer tools (isolate, freeze, off, lock, match, previous), Properties palette with per-object editing, linetypes, lineweights, colour index and true colour |
| Annotation | All DIM* commands with full DIMSTYLE variables, overrides and every arrowhead, associative dimensions that follow geometry, MLEADER, TABLE, TrueType fonts (`.ttf`, `.otf`, `.ttc` collections), MTEXT formatting codes (fonts, heights, colours, stacked fractions), our own single-stroke drafting font |
| Hatch & blocks | Pick-point hatch boundaries with islands, pattern, solid and gradient fills from our own pattern library, BLOCK/INSERT, attributes and nested blocks |
| Files | DXF read (R12–2018, ASCII and binary) and write (R2000), including dimension styles, associativity, tables and constraints; DWG read (via the acadrust library) and write (R2000); PDF plotting, SVG and PNG export. Entities CADCraft doesn't model yet are not kept on save: see [file-format parity](docs/file-format-parity.md) |
| Files | DXF read (R12–2018, binary from R13) and write (2000–2018, ASCII and binary), including dimension styles, associativity, tables and constraints; DWG read (via the acadrust library; R13 and R14 untested, 2018 tested only on synthetic files) and write (2000–2018). New drawings save as 2018 (AC1032); opened drawings keep their supported version, except DWG defaults to at least 2004. In the app's Save dialog, File ▸ Default Save Format (also Options ▸ Open and Save, `saveVersion`, default 2018) sets the version for untitled drawings; drawings with a file keep their own version, subject to supported-version mapping and the DWG minimum. SAVEAS `version` overrides this choice and is remembered for later saves. DXF uses R2000 structure with the chosen `$ACADVER`. PDF plotting, SVG and PNG export. Entities CADCraft doesn't model yet are not kept on save: see [file-format parity](docs/file-format-parity.md) for version selection and fidelity |
| Parametric | Geometric and dimensional constraints, AUTOCONSTRAIN, PARAMETERS with expressions, conflict detection; constraints re-solve after every edit |
| Grips | Hot grips with Space to cycle Stretch, Move, Rotate, Scale and Mirror |
| Interface languages | English, Ukrainian (Українська), Brazilian Portuguese (Português (Brasil)), German (Deutsch), Spanish (Español), Czech (Čeština), Russian (Русский), French (Français), Simplified Chinese (简体中文, with an installed CJK font), Italian (Italiano), Korean (한국어, with an installed Hangul font), Swedish (Svenska), Arabic (العربية, with an installed Arabic font), Hungarian (Magyar), Turkish (Türkçe), Greek (Ελληνικά), Bosnian (Bosanski) and Georgian (ქართული), live switching and a remembered Auto/system-language choice; [details](docs/localization.md) |
| Interface languages | English, Ukrainian (Українська), Brazilian Portuguese (Português (Brasil)), German (Deutsch), Spanish (Español), Czech (Čeština), Russian (Русский), French (Français), Simplified Chinese (简体中文, with an installed CJK font), Italian (Italiano), Korean (한국어, with an installed Hangul font), Swedish (Svenska), Arabic (العربية, with an installed Arabic font), Hungarian (Magyar), Turkish (Türkçe), Greek (Ελληνικά), Bosnian (Bosanski), Georgian (ქართული) and Tamil (தமிழ், with an installed Tamil font), live switching and a remembered Auto/system-language choice; [details](docs/localization.md) |
**Stage: pre-alpha** · next: alpha, when the six rows of the [alpha gate](docs/roadmap.md#alpha-gate) pass (five fail today; the gate was revised on 2026-11-19 and its hours are not re-estimated yet)
> **Last reviewed:** 2026-11-19 · **Last updated:** 2026-11-20 · **Change:** minor (Upcoming updated for what merged on 2026-11-19 and 2026-11-20; previously major: alpha gate revised from user reports: six rows, Windows first; Upcoming re-ranked into three priority tiers; previously minor: re-audit against main 41d9b5e95) · **Target:** Autodesk AutoCAD 2027
> **Last reviewed:** 2026-11-19 · **Last updated:** 2026-11-25 · **Change:** minor (Upcoming updated for what merged from 2026-11-21 to 2026-11-25; previously minor: Upcoming updated for what merged on 2026-11-19 and 2026-11-20; previously major: alpha gate revised from user reports: six rows, Windows first; Upcoming re-ranked into three priority tiers; previously minor: re-audit against main 41d9b5e95) · **Target:** Autodesk AutoCAD 2027
CADCraft targets full parity with AutoCAD (2D drafting first, then annotation, layouts and
plotting, DWG, parametrics and 3D), plus what AutoCAD doesn't have: agent control over MCP, a
@@ -115,7 +115,7 @@ and the beta checklist are in [docs/roadmap.md](docs/roadmap.md).
- The open findings of the security audit (#1919–#1935): check each against the input limits that
landed on 2026-11-11, close what is fixed and fix the rest. A crafted handle that makes new entities
overwrite existing ones (#1921) is fixed by #1276.
- A saved file that crashes AutoCAD 2021 (#3303) and dimension text lost on save (#3299).
- A saved file that crashes AutoCAD 2021 (#3303); dimension text lost on save (#3299) was fixed on 2026-11-20.
- Crashes and hangs with a reproduction: the web build on a large DXF (#1603), a DWG with 3D content
(#2174), startup on older graphics hardware (#1724, #1631, #3222).
@@ -131,7 +131,7 @@ and the beta checklist are in [docs/roadmap.md](docs/roadmap.md).
- The prompt options that still say "not available yet" (gaps F1).
- Layouts print at scale on a system printer (#3216); the menu bar and panels can be restored since
#3308.
- 661 pull requests are open (2026-11-20; 714 the day before). About 230 were mergeable, passed CI and were small; they are
- 602 pull requests are open (2026-11-25; 661 on 2026-11-20). About 230 were mergeable, passed CI and were small; they are
reviewed and landed in this order, the longest-waiting authors first within a row.
**3. Lower priority: affects fewer people and nothing breaks without it.**
@@ -141,6 +141,8 @@ and the beta checklist are in [docs/roadmap.md](docs/roadmap.md).
but a file with 3D content must open safely (tier 1).
- Menu breadth against AutoCAD for Mac as a headline number.
Done from 2026-11-21 to 2026-11-25: PDFIMPORT, a PDF page as editable lines, polylines, solid hatches and text (#3375 in #3419); dynamic block references that rotate, flip, array, scale, stretch polar, align and look up, with their grips (#963, #993, #1030, #1098, #1699, #1723, #1752 in #3424; authoring is still open); the proxy graphics of other applications' objects drawn (#2697, #3435, #3437) and dimensions kept as read drawn from their `*D` block (#3439); saves that keep layout plot settings (#3233, #3386, #3390), DXF 2007+ table cell text (#3392), hatch boundary flags (#3389), fit text (#3391) and registered applications (#2918); the Array window for ARRAYRECT and ARRAYPOLAR (#3394); ATTDIA and the Edit Attributes dialog on INSERT (#3411) and constant attribute values drawn (#3462); Edit > Paste from the system clipboard (#3366, #3460, #3461; #3320 open); opening from Finder and quit prompts on macOS (#1347 in #3344, not yet run on a Mac); an already-open drawing selects its tab when opened from the interface (#899 in #3422; the control channel, MCP, scripts and LISP still open a second copy); Tab through every object snap candidate (#1673); the Write Block dialog for WBLOCK (#1778); Generate Boundary (#2804); mitred wide polylines (#3453; the extents leave out the mitre tip, #3443); DIMASSOC 1 (#2977); crossing selection of block references by what they draw (#3445); an option to turn off the update check (#3097).
Done on 2026-11-19 and 2026-11-20: the hostile-input fixes #1276, #2820, #2821 and #2765 (#3304, #3305), clicks while the mouse moves and right-click or Space as Enter (#3307), the interface reset (#3308), paper units (#3309), the UCS command (#3310), -ATTEDIT, -RENAME and -LAYER options (#3311), TRIM/EXTEND depth (#3312), dimension values kept on save (#3335), the stencil switch (#3336), a typed OPEN path (#3343) and double-click text editing (#3345).
Done before that: precision input (#379, #441, #60, #519), prompt options in TRIM/EXTEND,
@@ -170,6 +172,7 @@ REFEDIT (#818), XCLIP (#2354), dynamic block references (#838–#883), and the D
| Date | Change | Summary |
|---|---|---|
| 2026-11-25 | minor | Upcoming updated for the merges of 2026-11-21 to 2026-11-25 (PDF import, dynamic block reference actions, proxy graphics, what saves keep, Array window, ATTDIA, system clipboard paste, macOS opening from Finder, WBLOCK dialog, Generate Boundary); #3299 fixed; pull-request count 661 → 602; percentages and hours not re-scored |
| 2026-11-20 | minor | Upcoming updated for the merges of 2026-11-19 and 2026-11-20 (security stacks, input, interface reset, paper units, UCS, prompt options, TRIM/EXTEND, text editing in place); pull-request count 714 → 661; percentages and hours not re-scored |
| 2026-11-19 | major | Alpha gate revised from user reports (six rows, Windows first; block authoring, xref editing in place and exact curve geometry moved to beta); Upcoming re-ranked into three tiers: urgent (security, leaks, crashes, lost work), parity, lower priority; percentages and hours not re-scored |
| 2026-10-24 | minor | Re-audit against main 41d9b5e95: language table, CI gate and open-PR count re-checked against main 41d9b5e95 |
(CONFIG_DIR,"the settings folder (logs, autosave, workspace, plotters); empty means no settings folder"),
(LOCALE,"the interface language, instead of the system's"),
(VSYNC,"1 presents with vsync, 0 without it (default: without on Linux and BSD)"),
(STENCIL,"0 opens the window without a stencil buffer, for drivers that show a black window; clipped layout viewports then draw unclipped"),
(
STENCIL,
"0 opens the window without a stencil buffer, 1 keeps it on every attempt; unset, a start that can't draw with it drops it (clipped layout viewports then draw unclipped)",
),
(WAYLAND,"1 keeps the native Wayland backend instead of XWayland; 0 or unset is off"),
(NO_NATIVE_MENU,"macOS: 1 keeps the menus inside the window; 0 or unset is off"),
(SYSTEM_CURSOR,"1 uses the system cursor instead of the drawn crosshair; 0 or unset is off"),
@@ -46,8 +49,10 @@ pub(crate) struct Env {
pub(crate)locale: Option<String>,
/// Present with vsync (default: off on Linux and BSD, on elsewhere).
pub(crate)vsync: Switch,
/// Off: the window has no stencil buffer (default: on). Some old drivers (Mesa on Intel HD
/// 4000, old Intel drivers on Windows) accept a stencil pass and then present a black window.
/// Off: the window has no stencil buffer; on: it keeps one on every attempt at starting the
/// graphics. Default: it starts with one, and a start that can't draw with it drops it (see
/// `renderer`). Some old drivers (Mesa on Intel HD 4000, old Intel drivers on Windows) accept a
/// stencil pass and then present a black window.
pub(crate)stencil: Switch,
/// Keep the native Wayland backend instead of XWayland.
/// Drain queued menu events into commands (Discord opens externally), rebuild Open Recent, retranslate on a language change and refresh enablement when 300 ms have elapsed.
"note":"The stable 1024 master, padded as its designer made it; the nightly files are derived from it, never upscaled from a smaller icon."
},
"transform":{
"summary":"The app mark (near-black strokes, cream highlights and their antialiasing) is copied unchanged; only the background square is deepened.",
"background":{
"from":"#14a3c7",
"to":"#0c657b",
"rule":"A pixel whose channel distance from the stable background is at most 180 is scaled by 0.62; fully transparent pixels and every other colour are left as they were."
}
},
"outputs":{
"cadcraft-nightly.png":"256 px PNG of the icon the Linux tar carries as cadcraft-nightly.png",
"cadcraft-nightly-1024.png":"the padded 1024 master the icns is generated from",
"cadcraft-nightly.ico":"16, 24, 32, 48, 64, 128 and 256 px PNG entries, the Windows executable and window icon",
"cadcraft-nightly.icns":"icp4 icp5 icp6 ic07 ic08 ic09 ic10 PNG entries for the macOS bundle (CFBundleIconFile cadcraft-nightly)"
},
"not_done_here":"No badge, crescent or N was added, and the stable cadcraft.png/.ico/.icns files are untouched."
.params("{name (\"*NAME\": exploded), file?: DXF/DWG path (defines or redefines block `name`, default the file name, from its model space; base point $INSBASE), at: [x,y], scale?: number | [x, y], rotation? (degrees), basePoint?: [x,y] (block coordinates), attribs?: {TAG: value}, explode?: bool}")
.params("{name (a block, or \"*Model_Space\" for a drawing that is a dynamic block's own)} → {parameters, actions, other} | null (not a dynamic block)")
.params("{handle (a dynamic block reference), name (a custom property as Properties names it: a visibility state, a lookup, a distance or\"Position1 X\"), value (lengths in drawing units)} → {properties}")
.params("{handle (a dynamic block reference), name (a custom property as Properties names it: a visibility state, a lookup, a distance,\"Position1 X\", an angle or a flip state), value (lengths in drawing units, angles in degrees; a flip state by name or 0/1)} → {properties}")
.params("{handle, node (the parameter's graph id), part: base|end|at, to: [x,y] (drawing coordinates)} → {properties}: a distance's arrow changes the distance (snapped to its values), a position's square moves it")
.params("{handle, node (the parameter's graph id), part: base|end|at|basex-endy|basey-endx, to: [x,y] (drawing coordinates)} → {properties}: a distance's arrow changes the distance (snapped to its values), a position's square moves it, a rotation's circle turns its angle, a polar or XY parameter's squares move its base, end or corners")
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.