With fewer than two drawings the shortcut no longer goes through Session::start, which cancelled
the running command although nothing was switched. On macOS the shortcut is Ctrl+Tab, as
Cmd+Tab switches applications there.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Adds the commands document.next and document.prev (Window menu), which switch to the
neighbouring open drawing and wrap round at either end, ending a command left running in
the drawing it started in, as document.switch does. From the Start tab the keys return to
the current drawing.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* Hatch dialog: author custom PAT families and capture a repeating tile
* Handle Escape through CADCraft's window cancel intent in the hatch dialog
* Keep custom hatches in the pattern gallery and fix repeating tile capture
* Exercise keyboard input in the hatch gallery filter
* Use the active drawing’s hatch geometry and finish tile picks only after two corners
Resolve embedded pattern lines for the gallery, HATCH, HATCHEDIT and Properties. Retry an empty compact swatch at full-period scale. Add coverage for two reopened drawings with the same pattern name, incomplete picks and aligned sparse marks.
The earlier shallow-slope fix skips empty scanlines before clipping. Its regression counts 10,000 full-length marks in a 100 by 100 tile area.
* Expose hatch tile capture as a headless engine command and reuse it in the dialog
* Respect drawing visibility and localize hatch capture errors in the dialog
* Use the public UI state constructor in workspace tests and route hatch capture through CadApp::run
* Classify in-memory hatch tile capture as requiring no files
* Check the saved hatch by handle independently of entity iteration order
* Reserve the native user-defined hatch name across custom pattern entry points
* Add the Chinese command label for Capture hatch tile
chinese_menus_and_commands_are_fully_translated requires every command
label in the Simplified Chinese catalog. The Ubuntu gate failed with this
one key still in English.
---------
Co-authored-by: FredApps <[email protected]>
The in-memory plotter store is shared by the whole test process. On
FreeBSD the tests run as threads of one process (cargo test), so the
three tests that each create a "Banner Printer" collide and the later
one fails with "plotter `Banner Printer` already exists". Each test now
creates a device with its own name.
* io: take the test-only acadrust from the storytold/acadrust fork at storytold/v0.6.6
* io: say the test-only acadrust matches craft-dwg's crates.io 0.6.6 until the craft-libs repin
Adds an optional file-provider bridge for a trusted same-origin CADCraft web host. It is off until the host calls registerProvider. Provider Save and Open transfer single DXF files in memory and refuse drawings with external images or xrefs. Contributed by @alejocapo04.
A window or window polygon tested a TEXT, ATTDEF or MTEXT by the
document's box for it, an estimate from its number of characters (and
lines). On the side a justification or attachment point leaves open,
that box reaches past what the fonts draw, so a window that held all of
a text, turned or not, could miss it: a right-justified label turned by
90 degrees hung its box below the window's bottom edge.
A window still takes an object whose box it holds. A text whose box it
doesn't hold but reaches into is now also taken when the window holds
the strokes the text draws, placed as the renderer places them
(annotative scale, upright text, ATTDEF tag, mirrored and slanted text).
A window polygon does the same. Only text along the selection's edge is
shaped, so selection costs what it did. Crossing windows and polygons,
fences and picks are unchanged.
Fixes#3731.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A routine that ended in a later frame left its value behind, and the next
expression the frames carried on handed it to the prompt as its own: a
routine now starts with no value. A snapped click that came while the
frames worked out a point lent that point its viewport origin: the
expression's value now answers its prompt before the click's origin is in
place. The command an expression was typed in, when Esc or a failed
expression ended it, recorded what it had drawn in the expression's
routine, which dropped it: such a command keeps its own undo step, with
frames and without.
A string in inputs went straight to the angle parser, so empty text and
coordinates were refused and the call took the next input. Empty or blank
text is now Enter (initget bit 1 still decides), and coordinates are a
point in the current UCS in every form the prompt takes (1,1, @1,1, 1<45,
*1,1), the relative ones from the last point. Numbers, unit-bearing text
and keywords are read as before.
* AutoLISP: entnext reaches an INSERT's ATTRIBs and SEQEND (#1660)
- lisp: name an INSERT's ATTRIB and SEQEND records; entnext walks them, then the next main
entity, and entget lists a record with its owner in group -2 (#1660)
- lisp: entmod of an ATTRIB takes its value (group 1) only, as one undo step; another property,
a SEQEND, entdel and entmake of one return nil and change nothing (#1660)
- doc: the handles LISP named, shared with the drawing's snapshots and never given out by
new_handle; 65,536 names, 1,024 probes past taken handles (#1660)
- io: entity_sub_record, one record of an INSERT at a time, never its other records (#1660)
- engine: an optional host hook for that record, so EntityCodec is unchanged (#1660)
- cli, web, app: install the hook; CLI tests for the walk, the value edit, the name bounds and
the refusals (#1660)
- docs: autolisp.md on the records, their names, when a name ends, and the value-only edit (#1660)
- reused from #1753 (closed), with thanks: the entity_list extraction with the -2 owner, the
writer's record splitting, and the entnext_walks_an_inserts_attribs test skeleton
* Keep AutoLISP's attribute names within their drawing
- Hold an INSERT's attribute names in the session's LISP state, not in
cadcraft_doc::Drawing: comparing drawings is plain data again and takes no
lock. The session reserves the handles in the drawing before any change, so
new_handle still never gives one out, also after a drawing swap.
- End the names when the Block Editor closes: its drawing starts from the
host's handles, so a name given there must never resolve to a host record.
- End only the erased reference's names on ERASE. Erasing another object
leaves an attribute name holding, and OOPS still revives none.
- Go on to the next entity when an INSERT has no record provider installed.
- Refuse an ATTRIB edit whose outer list ends in an atom.
* Keep issued attribute names out of the drawing.
A copied drawing could reuse a name, and storing the names in the drawing marked a saved drawing changed.
* Name an INSERT's ATTRIBs and SEQEND apart from drawing handles
An ATTRIB or SEQEND has no handle of its own in the drawing, so the
name AutoLISP gives it is now a value of its own (an entity name for
`type`), numbered from one count for the whole process that never
gives a number twice. No handle of any drawing, of a copy of one, of
another session or of another thread can be such a name, so nothing
is reserved in the handle space any more: cadcraft-doc, `new_handle`
and the copy-then-install paths are as on main, and naming or reading
a record changes neither the drawing nor its saved state.
What a name stands for (reference, place, tag) stays in the engine's
LISP state, by document. Names end on Undo, Redo, ATTSYNC,
-BLOCKREPLACE, on opening and closing the Block Editor, and when a
change is taken back; erasing a reference ends only its names, and
OOPS or `entdel` bringing it back revives none. `entupd` of a record
answers its name; selection sets and `command` take no record.
Tests cover other sessions, documents and threads giving out handles
in a drawing copy, the copy paths (INSERT from a file, XATTACH, AUDIT,
REFCLOSE), and the AutoLISP behaviour of the names.
* Keep one ATTDEF index per state of a block's entities
EntityStore gets a content token: a clone has its store's, and every
edit gives the store one that no store has had. The DXF writer keys
its ATTDEF index on that token and keeps the indexes of several
blocks, up to a fixed number of tags in all. Two copies edited apart,
or a different edit after Undo, never read each other's definition
properties, in AutoLISP reads or in a saved file, and reads that
alternate between references of different blocks examine each
definition once.
* End record names when a command puts an earlier drawing back.
MOCORO Undo restored its history drawing, handle seed included, so the next Copy could reuse the removed reference's handle. That restore now advances the name epoch. An ATTDEF index that would pass the tag budget is not stored.
* Match an oversized ATTDEF definition in full and remember it is too large to index
* Count record names with try_update, not the deprecated fetch_update
Rust 1.100 deprecates fetch_update and names try_update in its place, so
clippy with -D warnings stopped the gate at RecordName::fresh. It is the
same operation: the checked increment and the None once the count runs
out are unchanged. try_update compiles on Rust 1.95, the workspace's
minimum.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
* Record tests check the objects they rely on
Five tests could pass without the state they are about.
The two ATTDEF index tests changed only a layer, so both states of the
block gave T the same handle, and an index kept for the wrong state
still read the right layer. One state now keeps T on the first ATTDEF
and the other passes T to the second, on another layer. With one index
shared by every store, the old tests passed and these fail.
The MOCORO and grip Copy tests did not check that a copy was made, or
that the copy after the Undo took the removed copy's handle. They now
check both, and that the name read the first copy before the Undo.
The walk at the top of the handle range compared two values that are
both nil when the line at FFFFFFFFFFFFFFFF is not in the drawing. It
now reads that line first.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
* Test that entdel preserves unrelated ATTRIB names
* Fix AutoLISP record lifetime and REFEDIT edits
* Run attribute name cases in engine integration suite
* Fix text fixtures after main merge
---------
Co-authored-by: Claude Fable 5.2 <[email protected]>
build_mesh_until asks whether it is cancelled before each 64 primitives, while
it counts them as well as while it converts them. rebuild::run goes through
run_until, so a test cancels a build at each of its checks and gets nothing
back, not a list without its mesh.
The tests, run_until and the check while counting are from 2ez4gcx's commit
1b7e064b.
Co-Authored-By: 2ez4gcx <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
An expression typed at a command's prompt ran to its end inside one call
on the interface thread, so no frame was drawn and Esc was not read until
it was over. In the window it now runs a slice per frame, as a routine at
Command: does, and Esc stops it. Every other input first waits for its
value, as before. Hosts without frames (the CLI, MCP, scripts) are
unchanged.
A leader's overrides of its dimension style (the DSTYLE list in its ACAD
xdata) were kept as raw xdata and not used, so an overridden arrow size,
scale, arrowhead or line colour did not show. They are now read into the
leader, used when it is drawn, and written back as one DSTYLE list; the
rest of the leader's ACAD xdata is kept as before.
An answer given up front to the lisp command (inputs) was handed to
getangle and getorient as their value, so 45 came back as 45. They now
read such an answer as the same answer at their prompt: a number or text
in the angular units, a point as a picked point, null as Enter. Answers
typed at the prompt already came back in radians.