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.
Some old graphics drivers (Mesa on Intel HD 4000, old Intel drivers on
Windows) accept a render pass with a stencil buffer and then present a
black window. Setting CADCRAFT_STENCIL to 0, no or false (any case) opens
the window without one, so the app is usable on those machines. The
window and the canvas take the stencil bits from the same place, so they
always agree. Without a stencil buffer, clipped layout viewports draw
unclipped; a warning in the log says so. --help lists the variable.
Co-authored-by: Luca Toniolo <[email protected]>
Conflicts in io/dxf_write/common.rs and sections.rs: the writer keeps the
used-handle set from #3304 and the paper-units marker from #3309 next to the
UCS tables and each layout's UCS.
The two socket tests put their socket at <temp>\cadcraft-single-instance-<pid>-<test>\instance-test.sock,
about 58 bytes on top of %TEMP%. uds_windows allows 107 bytes, so a long %TEMP% made
UnixListener::bind(...).unwrap() panic and left launches_at_once_open_one_window with no window.
- Shorten the folder and socket names to cc-si-<pid>-<test>\t.sock (about 33 bytes).
- Skip a test with a note when no socket can be bound at its path, instead of panicking.
- Add a test that the test socket path stays within 40 bytes of %TEMP%.
Collecting every key of the request object into a map before the token check let an
unauthenticated peer turn a line of many short distinct keys into many owned strings and
map nodes. The parser now keeps only id, method, params and token (as JSON text) and skips
the rest; a repeated key still takes the last value.
Kept proxy records were written with the groups they were read with. The
DWG bridge brings them in the DWG's own version's layout, so a 2010
drawing saved as an R2000 DXF carried 161/162 groups that R2000 readers
reject (ODA, BricsCAD: Out of range), and a 2018 DXF carried 95 instead
of 71/97.
DXF output now rewrites each proxy's groups after its AcDbProxy subclass
marker into the target version's form: 95 or 71/97 for the drawing
format, 92/160 graphics size, 93/161 data size, 96/162 string stream
size (none before 2007). The DWG bridge is left as it was.
From 2007 a proxy keeps its strings in a separate stream (group 96, then
162). DXF before 2007 has no such group, so converting dropped the stream's
size while keeping its bytes, and readers took them as object data. Such a
proxy is now left out of an R2000 or R2004 DXF with its dictionary entry, as
proxies of unwritten classes are, and SAVEAS and document.bytes say so on the
command line and in notSaved.
loss_on_save now lists the proxies whose strings a DXF before 2007 can't hold,
so an interactive QSAVE asks before replacing the file; the warning points to
DXF 2007 and later when proxies are what would go. The proxy report test also
The pre-save hint checked for a .dxf extension, but a save picks the
format with Format::from_path, which treats a name without one as DXF.
Such a file got "DXF keeps them" instead of the version advice.
EXPORT writes a DXF at the drawing's own version too, so before 2007 it now reports
the proxies it leaves out (echo and notSaved), as a save does.
What a pre-2007 DXF loses is now counted by the writer itself
(cadcraft_io::proxies_lost, installed in the apps with set_proxies_lost): the
drawing is written as 2007 and as the target version and the two compared.
A proxy that no version writes (its class is not written, or no written block
holds it) is no longer reported with "save as 2007 or later", and the objects
that go with a dropped proxy (its extension dictionary and the XRECORDs in it)
are reported too. The DXF writer's finish returns the foreign objects it kept
for this.
The count reads the drawing the file is written from: the committed drawing
during a reference edit (the working copy is not counted again), the drawing
EXPORT writes while the Block Editor is open (for the SAT-text report too), and
the drawing -WBLOCK writes, which now reports a pre-2007 DXF's losses as well.
- lisp: namedobjdict, dictsearch, dictnext, tblobjname; handent and entget of non-graphic objects (#1659, #1661)
- lisp: tblobjname matches names as the roles spell them; records cache held by a weak drawing reference (#1659)
- lisp: CodeRabbit follow-ups on non-graphic objects (#1659, #1661)
- lisp: test an imported DIMSTYLE's group-105 handle (#1659, #1661)
- docs: a DIMSTYLE's own name is in group 105 (#1659)
- engine: install AutoLISP's object records with their own setter (#1659, #1661)
- Windows: a file opened while CADCraft runs opens as a tab in the running window
- single instance: only a refused or missing socket counts as stale (review)
- single instance: the Windows socket test removes its temporary folder (review)
- single instance: the socket is named after the whole session name (review)
- single instance: a short fixed socket name, relative paths refused (review)
- single instance: Cargo.lock lists uds_windows, the fallbacks log at warn (review)
Co-authored-by: Alex-BB44 <[email protected]>
Every craft-libs git dependency and patch entry moves from be0b1e6552 to
craft-libs main at 453b0da782. Cargo.lock changes only the revision of
each craft-libs package.
Every craft-libs git dependency moves from 3af2280ee3 to craft-libs main
at be0b1e655229e34f1ad263ef3d2170e46449c39b, which includes
storytold/craft-libs#1580: DWG fields from a drawing saved before DWG
2007 keep their format when it is saved as DWG 2007 or later.
Cargo.lock adds craft-dds, which craft-image-codecs now uses.
Moves the allow_in_process call below the local use items in ten tests, matching the order every other function body in these files uses. Behavior does not change.
Every craft-libs git dependency (Cargo.toml, its [patch.crates-io]
entries and apps/cadcraft-web/Cargo.toml) moves from eleven different
revisions to craft-libs main at 3af2280ee3434a2c860012df2f440652621c2c81.
Cargo.lock keeps one copy of each craft-libs crate and adds harfrust
0.13.3 and read-fonts 0.43.3, which craft-font-catalog now needs.
craft-dwg at this revision refuses to convert DWG when no worker process
is configured (storytold/craft-libs#1345). The app and the CLI configure
one at startup and are unaffected. The tests that read or write DWG in
their own process now call cadcraft_io::dwg_worker::allow_in_process(),
which cadcraft-io re-exports. dwg_worker.rs now checks that a worker
that cannot start is an error instead of a fallback to this process.
A drawing's folder that is also a font folder or on the search path was searched again without its
guards, so a rejected link was opened on the second pass. Guards now follow the folder however the
search reaches it. The guard test held its lock across a later search and would have deadlocked, and
the font walk tests ignored an error reply from open or render.
CodeRabbit's CLI found that a name corrected to another case (Alias for alias) was looked inside
before the roots judged it, and that a case match the roots refused ended the search before the
next candidate. Each corrected name is now checked before it is probed, and each match before it
is taken. The guard test no longer expects a candidate that is never opened once an earlier one
read, and the MCP test helper refuses an error reply instead of reading it as a success.
The font search opened a candidate by name, so a link under a name the .shx filter missed (or a
Windows short name for one) was followed out of the roots. A drawing folder now carries a guard that
the search asks about every file before opening it; the roots supply it, and a link is judged by
where it leads. One font leading out no longer disables the others beside it. Documents that a
refusal inside command_line comes back in the reply's error field without isError, and adds doc
comments to the remaining functions the change touches.
On Windows app.ron can hold a 64x64 window (e.g. saved while minimized).
eframe restores it as is, so the next launch shows an unusable tiny window.
Such an entry is now dropped from app.ron before launch.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* 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 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
On macOS the Open and Save panels ran modally inside winit's event handler, and resizing one aborted the app (#1527). Every file dialog now goes through CadApp::pick_then / pick_then_open. On macOS, Services::start_pick shows the dialog as a sheet on the window and the answer is acted on in a later frame. The answer is bound to the drawing that asked for it. Windows and Linux are unchanged.
Fixes#1527
Co-authored-by: mocenigo <[email protected]>
Without a path the screenshot was written into a private temp directory, and std::env::temp_dir panics on wasm32 (no file system), which stopped the whole web app: the page's call never got a reply and nothing after it ran. On wasm the PNG now comes back inline (pngBase64, width, height, bytes), as ui.render's does. Native builds are unchanged.
The web shell queues the page's calls as control requests (the channel the desktop control server uses) and answers them on the next frame. PendingReply gains try_reply, so a transport that cannot block can poll it, and cancels a request the app has not started when it is dropped, as a timed-out wait does: the page was told the call failed, so the app skips it. The API is installed in every mode; opening, saving, the file name and the unsaved flag stay with the host messages.