**What**
Typing a command with the Greek keyboard layout active (ΛΙΝΕ for LINE, ΜΙΡΡΟΡ for MIRROR) now works like typing the Latin name, in four places: starting a command, answering a prompt keyword (ΘΝΔΟ = Undo), the selection words at "Select objects" (ΑΛΛ = ALL), and command-line AutoComplete. The layout puts each Greek letter on the key of the Latin letter it sounds like (θ on U, ψ on C, ω on V, Q types `;`, W the final sigma), so `keyboard::latin_keys` maps letter by letter and ignores accents, including a combining tonos or dialytika straight after its letter. It returns `None` for a word with no Greek letter, so Latin input is never touched. ASCII characters in a Greek word are kept, in lower case (the dash of `-ΛΑΥΕΡ`), and a word with any other character is not read as Latin keys.
A command the interface handles itself answers to its Greek-typed name too: ΨΛΟΣΕ asks about unsaved changes as CLOSE does, `;ΣΑΩΕ` opens the Save picker for a drawing without a file, ΛΑΥΕΡ opens the Layers dialog.
What keeps existing behaviour:
- A word that is already a command, alias or LISP function keeps its own meaning, as typed or in another case or accent (a Greek `(defun c:ΛΙΝΕ …)` runs as itself, also when typed λινε).
- A keyword a prompt offers in its own Greek spelling (a LISP program's list) wins over its Latin reading, with Greek case folded.
- A selection word wins over a keyword on the same key, as it does for Latin typing: at COUNT's "Select object to count or [List/Spaces]", Λ is Last, like L.
- A name that exists wins over the keyword or selection word its keys spell: an existing block at BEDIT's "block name or select" and at BLOCKREPLACE's two name prompts (a block called Μ opens at BEDIT, it is not Multiple), and a loaded hatch pattern at HATCH's pattern prompt (a pattern called ΣΟΛΙΔ is that pattern, not Solid). The name is found in any case or accent and the command gets it as stored.
- Only the lookup reads the Greek keys: text that is no selection word reaches the command as typed (a Greek block name at BEDIT's "block name or select"), and an unknown Greek command is reported as typed.
Known and accepted:
- At a prompt that takes a name and offers a keyword, a Greek word whose keys spell the keyword is the keyword while no block has that name (Σ is Select at BLOCKREPLACE), as the Latin `S` is there.
- Two aliases whose Greek names differ only in case or accent can both exist (the alias editor folds ASCII only). Each runs when typed as stored; another spelling of the word runs the first of them in the store's order.
- Object snap overrides and the other point modifiers (END, FROM, M2P, TT, TK, `.X`) are not read from Greek-layout typing. They need the Latin layout, as before.
- Calls by command id are unchanged: a `cmd {json}` line and `execute` (control channel, MCP) do not read a Greek-typed name.
- In a script a line that starts with `;` is still a comment, so a line `;ΣΑΩΕ` there is not QSAVE.
Also adds 46 `el.tsv` rows for strings that were in the source but missing from the catalog when the rows were written (alias editor, save-on-close and units dialogs, a few menu and command labels). On this head the i18n report lists 39 strings that fall back to English for `el` (mostly keyboard shortcuts, right-click customization and alias import); they are not in this PR. Four command labels keep the English name in parentheses, like the rest of the catalog. The `el.tsv` row of `ATTRIBUTION.md` credits these rows (AI-assisted, read by the contributor, a native Greek speaker), and `contributors/people.toml` has the author's entry.
**Tests**
- `keyboard::tests`: the mapping, non-Greek words left alone, combining marks only straight after a Greek letter, one Greek word in any case, accent or final sigma, a character the layout does not type is no spelling of a Greek letter (the micro sign is not μ), 100 000-letter and malformed input do not panic
- `engine/tests/it/greek_keyboard.rs`: ΛΙΝΕ draws a line (lower case and accents too), `;ΣΑΩΕ`, an unknown Greek word is reported as typed, the selection word ΑΛΛ, Λ, λ and ΛΑΣΤ at COUNT's prompt count like L (Last, not the List option), keywords at MIRROR's prompt (Ν is read as No and keeps the sources, Υ erases them), a Greek LISP command runs as itself and in any case or accent, a Greek block name at BEDIT reaches the command as typed, a block called Μ opens at BEDIT (in either case), a block called Σ at BLOCKREPLACE, a loaded pattern called ΣΟΛΙΔ at HATCH's pattern prompt (upper case, lower case, accented)
- `engine/tests/greek_keyboard_aliases.rs` (its own binary, the alias store is process-global): a Greek alias keeps its meaning, as typed and in any case or accent; a word of 1 000 000 Greek letters is looked up among 5 000 Greek aliases within 5 s (170 s before the word was folded once per lookup)
- `prompt::tests`: a Greek keyword is matched as spelled, before its Latin reading
- `ui-egui`: ΨΛΟΣΕ asks before it closes a drawing with unsaved changes, and a LISP `c:ΨΛΟΣΕ` still runs as itself; ΛΑΥΕΡ (also λάυερ) opens the Layers dialog and `;ΣΑΩΕ` the Save picker; AutoComplete reads a Greek prefix as Latin keys, offers the Greek alias that Enter would run, and leaves a Greek word the drawing's LISP defines as typed
- Each fix after review landed with a test that failed before it.
**What ran** on e171e083, `cargo xtask ci` step by step: `cargo fmt --all -- --check` and `cargo clippy --workspace --all-targets -- -D warnings` clean; `cargo test --workspace --lib --bins --tests --no-fail-fast`: 3759 passed, 0 failed, 28 ignored; the doctest step (the workspace has no doctests), the i18n report, `cargo xtask assets`, `cargo xtask layers` and `cargo xtask wasm` passed. The same steps passed on e171e083 merged with main at e1d379ad, a local merge that is not pushed: 3761 passed, 0 failed, 28 ignored.
Main is merged in. The merge commit e3b3a2e0 had kept only this branch's side of `cmd/file.rs` and `cmd/file/pgp.rs`; e8a79d19 restores main's alias-persistence helpers and exports next to `greek_alias`, so those two files are main's again plus this PR's own lines.
**Docs (not edited here, per AGENTS.md)**: `docs/localization.md` "Greek (`el`) interface" and `docs/localization-parity.md` row "Greek | el" (its row count) could mention that commands typed with the Greek layout are accepted.
Nothing here is Autodesk-derived: the mapping is the standard Greek layout, written from the layout itself.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Greek keyboard-layout input is recognized as Latin keystrokes when entering commands, aliases, autocomplete prefixes, selection keywords, and prompt options.
* Greek commands and aliases can be matched across case and accent variants. Existing commands, aliases, and matching block names take precedence over Greek-layout interpretations; unrecognized input retains its original text.
* At prompts that accept either a block name or a selection keyword, Greek input is treated as a name when a matching block exists; otherwise, it can be interpreted as a selection keyword.
* Greek-layout input can also match loaded or built-in hatch pattern names, which take precedence over prompt keyword interpretation.
* In BLOCKREPLACE prompts, you can select a block reference to choose a block.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Fixes#3055.
## What
Inside an MSPACE viewport an object on a layer frozen in that viewport (VPLAYER, VP Freeze) is not drawn, but it
could still be picked, window-selected and edited through the viewport, and a selected one kept its grips.
`Drawing::is_visible` has no viewport, and selection and grips asked only that.
Three questions now take the active viewport into account:
- `select::selectable(d, e, frozen)`: what a selection can take. `frozen` is `DocState::viewport_frozen()`, the
layers frozen in the active MSPACE viewport (empty in paper space and on the Model tab). The selection functions
have `_in` variants that take it (`pick_in`, `pick_all_in`, `select_window_in`, `select_fence_in`,
`select_polygon_in`, `select_group_in`, `SelectMode::select_in`); the existing functions keep their signatures
and select as before.
- `DocState::shows(e)`: what the view being edited shows, `is_visible` plus the active viewport. Grips ask it where
#3048 made them ask `is_visible`.
- `Session::selection()`: the selection as the view being edited has it, without the model-space objects the active
viewport does not draw (`DocState::shown_selection`). The stored selection, `DocState::selection`, keeps them.
**Selecting.** Every selection made in the space being edited passes the active viewport's frozen layers:
- idle clicks and windows, "Select objects" (a pick, the implied window, W, C, BOX, F, WP, CP, ALL, G, and L and P,
which take the last object the viewport draws and the part of the Previous set it draws), selection cycling, and
prompts that pick one object;
- `select`, `selectall`, `selectsimilar`, and the group members a pick brings (PICKSTYLE);
- the commands that select for themselves: STRETCH (JSON and typed, with its own All, Last and Previous and its
multiline vertex rule), TRIM and EXTEND by fence and by crossing window;
- AutoLISP `ssget` (W, C, F, WP, CP, a point, P, L) and `entsel`;
- in the UI, the rollover highlight and the hatch under the cursor that a double-click edits. The object under
the cursor and selection cycling's badge are worked out again when the active viewport's frozen layers change
under a pointer that does not move.
**Already selected.** An object that is selected when its layer is frozen in the active viewport stays in the
stored selection until the selection is replaced or cleared, and counts as selected again once the layer is thawed
there. Until then `Session::selection()` leaves it out, and with it everything that starts from the selection: the
selection made before a command (PICKFIRST), a JSON command that names no objects, Delete, the grip edits that
cover the selection, AutoLISP's implied selection (`ssget`, `ssget "I"`, `ssgetfirst`), the palettes, and what the
session reports as the selection (`summary`, `drawing.inspect`). Two UI functions read the stored selection
themselves and now read `shown_selection` too: the hatch editor's edit mode and BEDIT's choice between editor and
dialog. The selection highlight inside the active viewport leaves the object out as well.
Adding to the selection or removing from it (a click, a window, `select` with `add` or with nothing to select
with, QSELECT appending) starts from the stored selection (`Session::stored_selection()`), so such an object is not
dropped while the selection changes around it. A command that takes the selection, or a new selection, replaces
it as before. `Session::selection()` gives the stored selection unchanged wherever the active viewport hides
none of the selected objects: in paper space, on the Model tab, and in a viewport that freezes no layer.
The UI asks for the selection several times a frame, so `DocState::drawn_in_viewport` does not look every selected
object up: a few handles are looked up one by one, and beyond that it passes over model space once.
**Grips.** Static grip painting and hit testing, hot grips (`click_grip`), the grip edit's targets and the typed
GRIP command (`griphot.rs`), and dynamic grips ask `shows`. The dynamic-grip cache key now holds the active
viewport's frozen layers: entering another viewport changes which references are shown without changing the
drawing revision, so the key did not change. The grip code asks for itself, as it does for `is_visible` since
#3048, so it does not depend on who hands it the objects.
A viewport's frozen layers hide model-space objects only, never an object on the sheet. Layer names are compared
the way the renderer compares them. Outside a viewport, and in a viewport that freezes no layer, nothing changes.
## Test
The tests build two viewports on one layout, one of which freezes a layer. Most take the same path through both:
through the viewport that freezes the layer the object on it is left out, through the other one it is taken as
before. The ones about an object that is already selected freeze and thaw its layer in the viewport being edited.
`crates/engine/tests/it/viewport_frozen_selection.rs`, 22 tests:
- selecting: a pick, window / crossing / fence, idle clicks and windows, selection cycling, every answer to
"Select objects" (with ERASE), group members, `selectall` and `selectsimilar`, STRETCH (JSON; typed crossing
window, All, a pick, Last, Previous; the multiline vertex rule), TRIM by fence and by crossing window, a prompt
for one object (BREAK), LEADER's Copy, AutoLISP `ssget` and `entsel`;
- already selected: a typed command with PICKFIRST, a JSON command without handles and Delete; Previous and Last;
the grip edits that cover the selection; what the session reports, with paper space and the Model tab unchanged;
adding to and removing from the selection; a small and a large selection (the two paths of
`drawn_in_viewport`, in a drawing whose draw order is not the order of its handles);
- grips: a shared grip, the grips of an object whose layer is frozen and thawed again while it is selected, and
what the edited view shows (model-space objects only, never an object on the sheet).
`crates/ui-egui`, 9 unit tests (hot grips, the grip and the hatch under the cursor, the viewport highlight, dynamic
grips and their cache key, BEDIT's choice, the hatch editor's edit mode, selection cycling's badge under a resting
pointer) and `tests/viewport_frozen_grips.rs`, 3 tests (no grips painted for a selected object the viewport does
not draw; the rollover highlight; the highlight under a resting pointer while the layer is frozen and thawed).
EXTEND runs TRIM's selection code and has no test of its own.
Without the change these tests fail, checked call by call with a temporary switch that is not in this PR: each of
the 60 calls of `viewport_frozen`, `shows`, `hidden_in_viewport`, `drawn_in_viewport`, `shown_selection`, `last_in`
and `stored_selection` outside tests was put back to the old behaviour on its own. 51 of them made at least one
test fail directly; 5 grip checks that sit behind `Session::selection()` did so with the getter switched back as
well; the other 4 are calls inside `DocState` that the same tests reach through their callers. Each path of
`drawn_in_viewport`, and its sort, fails a test when switched off. Of the 42 calls of `Session::selection()`, 10
have a test that fails when that one call reads the stored selection; the other 32 receive the same list and have
no test of their own. The second commit's two conditions (the hover and the badge under a resting pointer) each
have a test that fails without them.
## What ran
The seven steps of `cargo xtask ci`, one by one, on this branch at 6754b960 (main at ddfa833b plus its two commits):
fmt, clippy (workspace, all targets, `-D warnings`), test (3725 passed, 0 failed, 26 ignored; the doctest
step ran, the workspace has no doctests), the i18n report, assets, layers and wasm. All pass.
## Not in this PR
- A selected object whose layer is turned off or frozen for the whole drawing is still taken by a command that
starts from the selection, as before (ran: ERASE and MOVE typed and as JSON, and Delete, edit it). The issue asks
to keep the drawing-wide behaviour, so this PR leaves it alone.
- A command that is given object handles (`handles` in JSON, an entity name from AutoLISP) acts on them as before,
whatever the viewport draws. QSELECT and `ssget "X"` look at the whole drawing; what they put in the stored
selection is then left out like any other selected object the viewport does not draw.
- `ssget "L"` takes the last object of any space, as before; inside a viewport it now passes over the objects
that viewport does not draw.
- Object snap, hatch boundary detection, the implied cutting edges of TRIM and EXTEND, constraint inference, and
the Z that ID and DIST read from an object under the point are not selections and are unchanged.
- A block reference on a layer the viewport draws, with parts on a layer frozen in the viewport: the parts are not
drawn, but the hit geometry of a reference is built without the viewport, so a pick where such a part would be
still finds the reference. Ran on eaae189f with a test that is not in the PR: a pick, a crossing window and a
fence on such a part select the reference, and a window around the drawn part alone does not; with the layer
frozen for the whole drawing it is the other way round. It needs extents that know the viewport, which
`crates/doc` does not have, so it is left for its own change.
- Visibility that changes while an interactive command is already waiting, or while a grip list is open, is #3056.
## Compared with AutoCAD 2022
Observed as a black box, in a drawing made there for this and driven by a script: two lines, one of them on a layer
frozen (VPLAYER) in one of two layout viewports. No file from it is in this PR.
Inside the viewport that freezes the layer, the same there and here: a pick, a window, a crossing window, a fence
and a crossing polygon (`ssget`), ALL, Last, a crossing window and a fence at "Select objects", `ssget "L"`, select
all, and STRETCH's crossing window leave the object out; `ssget "X"` returns it; a command that is given the object
itself (its entity name there, `handles` here) changes it. Through the other viewport the pick, the windows, the
fence, ALL, Last and STRETCH took it.
Different, where the issue asks for more ("cannot be edited through that viewport, including when they were
already selected"):
- An object selected through the other viewport stays in the implied selection when the viewport that freezes its
layer becomes the active one (`ssgetfirst`, `ssget "I"`), and ERASE typed there erased it. Here the commands leave
it out.
- Previous: `ssget "P"` returned the set made through the other viewport whole, and CHPROP with Previous changed
the object. Here Previous takes the part of that set the viewport draws.
A comment on the issue asks which of the two is wanted. This PR follows the issue as written; if AutoCAD's
behaviour is preferred for these two cases, I will change them here.
Not observed there: grips (a script cannot read them), and freezing the layer while objects are selected (VPLAYER
is a command and cleared the selection).
## Parity rows
U5 (grips) and F15 (viewports) in docs/gaps.md. No docs edited.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Selection, picking, hover highlighting, and grip interactions now respect layers frozen in the active model-space viewport.
* Selection reports and editing tools show only objects visible in the active viewport, while stored selections retain hidden objects.
* Window, crossing, fence, point, and other selection modes now apply viewport visibility consistently.
* **Bug Fixes**
* Changing viewports or freezing and thawing layers now updates selection highlights, hover targets, and grips to match what the active viewport displays.
* Selection commands and object inspection now consistently reflect viewport visibility.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
* ui: omit hidden objects from grip painting and hit tests
Respect the drawing's existing visibility predicate when painting selection
grips and finding the grip under the pointer. A hidden handle restored through
another selection path must not show or activate grips.
The visibility predicate also suppresses grips for entities on off or frozen
layers, not only objects hidden with HIDEOBJECTS.
The frame regression uses ordinary model geometry and HIDEOBJECTS, with an
on-screen selected-object control.
* Grips: a hidden object takes no hot-grip stretch and no dynamic grips
Clicking a hot grip stretches every hot-grip object, and the set can still hold
an object that was hidden after it became hot (its grips are no longer painted,
but the stretch still moved it). `click_grip` now drops hidden objects from the
hot-grip set first.
Dynamic-block grips come from the selection, which Undo or another selection
source can restore with a hidden block reference in it; `dyngrips::of_selection`
now skips hidden references as ordinary grips already do.
Adds a test for each, a doc comment on the test helpers, and `cadcraft-io` as a
dev-dependency of the UI crate so the dynamic grips test can read the synthetic
dynamic-block fixture of the io tests.
* Grips: a hidden object in the selection takes no part in a grip edit
A grip edit took the whole selection as its targets. A hidden object that was back in the
selection (Undo, sssetfirst, a control call) was stretched with a visible object's grip that
shared its point, and the Move, Rotate, Scale and Mirror modes transformed it.
The grip edit now leaves out what the drawing does not show when a grip becomes hot: a hidden
object's own grip is never made hot, the object is not among the targets, and the typed GRIP
command does not find its grips. A grip edit with no grip left does not start.
* Use craft-dxf from craft-libs; remove crates/dxf
cadcraft-dxf moved to craft-libs unchanged as craft-dxf
(storytold/craft-libs#791) so VectorCraft can write DXF through the same tag
layer. CADCRAFT_MAX_DXF_TAGS still sets the tag limit.
* Pin craft-dxf to the merge of storytold/craft-libs#796
* address review: restore the dated measurement text in file-format-parity.md
* fix: bound or confine seven name, path and file inputs (QSELECT wildcard, layout template name, LISP OPEN/CLOSE, font manifest, xref palette, test walkers)
* address review: reserved device names, fresh fifo test dir, stat before open in build.rs
* review: honour the name alias and Unicode case in exact xrefs, reserve Windows device basenames, charge line headers, skip non-directories in the module walk
* address review: distinct exact xref names, exact-capacity LISP line queue, fail the module walk on entry errors
* address review: xrefs differing only by case cannot be loaded together; panic-free default template name
* address review: refuse detach and path changes across case-variant xrefs; ASCII case folding for xref names
* address review: report the case-variant xref a load skips; assert both xref paths in the test
* fix(engine): an atomic replacement keeps the old file's group, or drops the group bits
* address review: backup group bits, skip no-op fchown
* fix(engine): keep atomic writes of one path serialized, backup bits capped by the drawing's group
* fix(engine): the first backup takes the drawing's group, else drops its group bits
* fix(lisp): charge READ text, EQUAL string bytes, SETVAR and ENTMAKE copies, and nested callbacks against one budget
* address review: charge callback steps live and reject completion past the shared allowance
* fix: bound MOCORO copies, array EXPLODE, COMPARE bounds, attribute extraction, PDF links and control-server parsing
* address review: key extract cache by exact block, count live MOCORO objects, PDF link budget
* review: select extraction columns before copying values, count live objects for MOCORO copies
* address review: count exploded array objects before cloning; scan each block's constants once
* fix: index or bound array replacements, DIM field spellings, path samples, hatch refills and broken tables
* address review: index placeable array replacements, search past zero-length DIVIDE runs, per-part broken-table outlines
A path naming an endless device or a FIFO was buffered to EOF before any size check ran, so one short command could exhaust memory or block. These paths now go through capped_read::read_capped, which refuses non-regular files and enforces the byte limit while reading.
lisp_flush drained each line from the front of the output buffer, shifting everything after it every time, so newline-dense PRINC output cost quadratic time outside the interpreter's step budget. It now walks the buffer once and drops the printed prefix once.
* fix: index or bound four small lookups (DOF selection, xref palette, QSELECT colours, log lines)
DOF scanned the selection list per slot; the xref palette scanned the xref list per INSERT; QSELECT parsed a possibly long layer name as a colour for every entity; and a log message could carry CR/LF or other control characters that started apparent extra records. Each now uses a set or map, a length bound, or escaping, with the same results for ordinary input.
* address review: trim colour text before length limit
After BSAVE the editor's block table can still hold the older source definition.
Restore the saved source block from the host when composing a copy and when
reconciling the editor and its history, so a later save of the copy keeps it.
- #2587: a frame turned by anything but a quarter turn keeps its size about its turned
centre; the box of its two mapped corners collapsed it (a 10 x 10 square turned 45° became
14.14 x 0, and the OLE header with it) for EXPLODE, REFEDIT, paste and array placement
(austin62jake, CodeRabbit). Moves, scales, mirrors and quarter turns keep the exact
corner mapping. `recase` reads only the rewritten digits and a few after them, not the
whole 310 line (austin62jake). The PR's rotated-frame test expects the kept size.
- #2585: an `output` that contradicts the path's extension is refused, as a device that
does is; it lost silently to the extension.
- #2608: the window's state is dropped when another dialog took its place (it missed a UI
pass), so reopening reads the drawing instead of an old unsent edit (CodeRabbit); TEXT and
ATTDEF get a one-line field (Enter commits), so a line break can't turn into a space on
save; the module comment says the shortcut menu opens it.
- #2584: a tilted LWPOLYLINE/HATCH run is flattened to at most a million vertices, then
its arcs stay chords (a hostile file of arcs asked for gigabytes; austin62jake). The
file-format-parity.md hunk is dropped: maintainers update the parity docs.
- #2471: another program's proxy objects are in the DWG loss report as its proxy entities
are (left out before 2013, or when their class can't be named); they went silently.
- #1626: a drawing saved at a view keeps it in the desktop app and when it has xrefs: the
app's first frame and the xref pass both fitted the extents over it. OPEN's result says
`saved_view`; one `view::saved_view` replaces the copy of `usable_view` in files.rs.
A misplaced doc comment goes back to its test.
- #2028: a plot rotation (73) outside 0-3 is written back as 0, not as read.
- #1026: the binary code-page retry drops the first pass's tags before it runs (the peak
doubled near the tag limit); a float spelling of an integer group clamps to what the
width holds unsigned too, so 65535.0 reads as 65535 does, not 32767.
- #2658: the reference names Undo by the last command ("Undo Group of commands"); Undo
matched nothing and went to the end of Edit. Ordering and its test share one rule.
- #2612: its test's Insert gets `clip: None` (XCLIP landed after it was written).
render_look's DARK repeated the rasteriser's default background; both now
read RasterOptions::DARK_BACKGROUND. ECHO and LISTED_TABLES are renamed
MAX_ECHO_CHARS and MAX_LISTED_TABLES. No change in behaviour.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main added view twist. Kept from both: a drawing opens on the view it was saved at, with its saved twist; one that stores none fits its extents through main's twisted box. The VPORT reader takes main's twisted view centre and keeps this PR's first-*ACTIVE view; the writer writes the saved view, else main's twisted fit, with the fallback still fitting the width through the record's aspect.
A plot style alone drew black lines on the dark canvas: the tables that
change colours print colour 7 (and, in monochrome.ctb, every colour)
black. With `plot_style` and no `background`, the render now draws on
white, as a plot prints on paper; a given background still wins.
`plot_style: "none"` (or "") draws every object with its own
properties, also in a layout that shows its own plot styles. An unknown
table's error lists the built-in tables and at most ten of the
drawing's own. The app's ui.render test now draws a red line, so it
fails if the plot style isn't passed on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The MCP render tool and ui.render, in the app and headless, always drew
on the dark canvas with no plot style, so a PNG placed on a page needed
the SVG export instead.
They now take `background` ("dark", the default; "white", "paper" or
"#rrggbb") and `plot_style` (a built-in plot style table such as
monochrome.ctb or grayscale.ctb, or one the drawing holds). Colour 7 is
drawn black on a light background and white on a dark one, as on a plot.
An unknown value is refused with what is accepted. Both copies of
ui.render read the options through one function in the engine
(render_look). The render tool's description also says it returns an
image block, not text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The renderer draws a zero-width frame as a line, so leaving it out of the hit geometry made a
visible object unpickable. Also corrects where the corner tolerance switches to ulps (4 ulps
pass 1e-6 near 1.1e9).
A matrix every frame accepts (a rectangular array, plain translations) now needs no
look at the objects, and an empty matrix list never touches the drawing. ARRAYPATH
scans the selection once instead of once per item.
Covered by the existing refusal tests; copy_all is not reachable without a drawing
through any command, so there is no no-drawing test.
Putting the frame in prims() also made it a TRIM/EXTEND edge, an object snap
target and dimension geometry. prims() is back to nothing for it, the extents
arm is restored, and select::hit_polylines adds the frame's outline for picking
(none for a frame with no width or height or a bad corner).
Tests: clicking_an_ole_frame_edge_selects_it (now also a frame with no width),
ole_frame_is_not_a_trim_edge_or_snap_target.
copy_all scanned the selection for an OLE frame once per matrix before copying.
It now looks at the objects once and then only tests each matrix.
Covered by the existing refusal tests (classic_polar_array_refuses_a_turned_frame_but_not_an_upright_one).
An OLE2FRAME is drawn but prims() gave nothing for it, so hit testing never saw
it and a click on its outline picked nothing. prims() now returns the frame's four
edges from the same corner helper the extents use, so the extents arm is gone.
The renderer keeps its closed-polyline arm (one joined outline, not four segments).
Test: clicking_an_ole_frame_edge_selects_it.
ALIGN builds its matrix from two angles that agree only to rounding, so a large
scale leaves a rotation part of about scale * 1e-16 that an absolute 1e-12 bound
refused as a turn. The bound now grows with the scale; a real turn is still refused.
Test: ole_frame_accepts_a_large_scale_with_rounding_noise_in_its_rotation.
main's #2673 runs the DWG writer in a child process. The kept version now goes with the request
(encode_kept_noted, worker protocol 2), so the worker reads the bridge DXF as that version too.
The proxies proxy_classes leaves out are now counted in Unwritten, as ACAD_PROXY_OBJECT and
ACAD_PROXY_ENTITY.
- objects are found through a handle index when reading and writing clips, and removed in one pass (no scan per reference)
- the writer's handle seed starts past the clip objects, so a drawing with many clipped references gets no duplicate handles
- a clipped copy that runs out of the block budget marks the list truncated, like an unclipped one
- clipped block contents keep their own layers in plots