The writer told the bridge from a DXF file by comparing the declared and the
target version, which are both R2000 for an R2000 DWG. Kept constraint groups
of a 2013+ drawing were then put in the old node order although the bridge
reads them as the version they came from, and kept proxies took the pre-2007
DXF layout. The bridge says so itself now. The render settings test module is
skipped where acadrust isn't built.
Since #2882 a DXF of 2010 or earlier leaves out solids whose geometry only
the data store holds, and the interactive QSAVE asks before it does. The
warning's hint still said DXF 2010 and earlier keep them, which is the
version that loses them. The hint now depends on the version the file is
saved in: 2013 and later keep such solids, and the proxies a DXF before
2007 leaves out as well. Also rustfmt of the merged finish signature.
Conflicts with #2882 resolved: a DXF's loss report counts both what #2882
leaves out (solids whose ACIS geometry the version has no place for, in
either direction of 2013) and what #3234 leaves out before 2007 (proxies
whose strings it can't hold, with what goes with them), each named with its
own reason, for SAVE/SAVEAS, document.bytes, EXPORT, -WBLOCK and the
interactive QSAVE question. dxf_raw::finish takes both flags.
Conflicts with main resolved: the source form is main's Foreign::version
(#2471), recorded at read time for the same reason, instead of the PR's own
Foreign::acadver. The conversion goes to the version the text is read as,
as #1728's constraint groups do: a DXF's own version, and for the DWG
bridge the version the kept objects came from, which craft-dwg's
encode_kept_noted declares, so there they stay as read. The DWG test opts
in to in-process DWG.
nextest runs each test in its own process, and the opt-in is process-wide,
so a DWG test calls it itself. acadrust is a dev-dependency only where
craft-dwg builds its native bridge (#2526), as the other DWG test files say.
A block with a name other than *D that an unedited dimension was read with
is written with the dimension blocks (#3302). Its BLOCK_RECORD lost its
insertion units and explodability there, and the BLOCK its description.
When that block is empty, the picture is regenerated in world coordinates,
so the block now goes at the origin rather than at the read base point,
which shifted the picture.
The new DWG-saving test of #3302 opts in to in-process DWG conversion.
All boxes share one text field, so Ctrl+Z in a new box could bring back
the text typed into the last one; its undo history is cleared when a box
opens.
The draft was keyed by the object's handle only, and handles repeat across
drawings; it is now also bound to the drawing's id, so it is never shown
or submitted for another drawing's object.
At a non-unit annotation scale an annotative TEXT, attribute definition or
dimension is drawn scaled; the editor box now takes its height, position
and extents from that scaled object, as the renderer and EXPLODE do.
TEXTEDIT on a TEXT now edits it in place, so the IME goes into that box
(tested in text_double_click.rs); the command line's own IME handling is
tested where it still collects the text: TEXT's Enter text prompt.
The one-line editor was narrower than the text it edits: an egui area
caps its width, and a centred or right-justified text's box started at
its insertion point. TEXTEDIT now gives the editor the drawn text's
extents (TextEditor::extents, from the renderer's text placement), and
the box starts at the drawn left edge, is at least as wide and as tall as
the drawn text, and still grows as more is typed.
Double-clicking an MTEXT opens the editor with its contents; what is typed
is kept with Ctrl+Enter. Carried from #1425.
Co-authored-by: simanov <[email protected]>
Double-clicking single-line text, an attribute definition or a dimension
(no command running) now opens a one-line text box over it on the canvas,
as AutoCAD does, instead of asking at the command line (#842). Enter or a
click outside keeps the text, Esc cancels, and an emptied box keeps the old
text. A dimension's box shows its text override, or <> for the measured
value, with the measured value beside it; emptying it or typing <> alone
gives the measurement back.
The box answers TEXTEDIT's prompt, so the edit is one undo step and
scripts, the command line and engine.execute behave as before. The engine
describes what to edit through Interactive::text_editor, TextEditor and
EditorKind (MText, Line, Dimension), following the design in #2320.
Co-authored-by: Luminati <[email protected]>
OPEN followed by a file name, or the JSON form with only a path, typed
at the command line and entered with Enter now reads the file on the
background reader with the Opening card, instead of opening the file
picker and dropping the path (or, for the JSON form, reading it on the
UI thread). Programmatic calls (control channel, MCP, scripts, LISP)
still open synchronously and return their result.