Commit Graph
131 Commits
Author SHA1 Message Date
FredApps 32dfdef71c Merge main into codex/cad-shared-shx-glyph 2026-11-16 07:44:49 +01:00
FredApps b3d11070e4 Merge pull request #3194 from storytold/codex/cad-shared-shx-reader
Use shared SHX container reader
2026-11-16 07:42:21 +01:00
FredApps 155fd45d61 Merge pull request #3191 from storytold/codex/cad-ui-shared-raster
Use shared codecs for preview and screenshots
2026-11-16 07:24:21 +01:00
FredApps 27256f0ba5 Merge main into codex/cad-shared-shx-reader 2026-11-16 07:23:33 +01:00
FredApps 386750bd56 Merge pull request #3193 from storytold/codex/cad-shared-shx-compiler
Use the shared SHP to SHX compiler
2026-11-16 07:22:41 +01:00
FredApps 7013ce459c Merge main into codex/cad-shared-mtext-tokenizer
Resolve the MTEXT conflicts with #3197 (jayzed80's #2952 fix) on the
shared tokenizer: Token::Unknown is now shown as typed (backslash kept,
code read as text) in plain_mtext, the layout parser and the paragraph
scan, matching main's behaviour. Drop the now-unneeded too_many_lines
expectation on parse.
2026-11-16 07:02:25 +01:00
FredApps 13de76e5b2 Merge main into codex/cad-ui-shared-raster after #3189 was squash-merged 2026-11-16 06:56:19 +01:00
FredApps e5091e052e Merge main into codex/cad-shared-shx-compiler 2026-11-16 06:49:46 +01:00
FredApps d267d6580e Merge pull request #3197 from storytold/codex/cad-shared-mtext-escapes
Use shared MTEXT escape decoding
2026-11-16 06:43:13 +01:00
Dylan M. TaylorandFredApps 2974d74bdc Use shared raster image codecs (#3189)
* Use shared raster image codecs

* Encode rendered PNGs through shared codecs

* Update raster probe and use supported BMP dimensions

* Check raster depth and TIFF page fidelity

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-15 19:30:49 -05:00
Dylan M. Taylor 11e90d34fb Merge branch 'codex/cad-shared-mtext-escapes' into codex/cad-shared-mtext-tokenizer
# Conflicts:
#	Cargo.lock
2026-11-15 19:03:33 +00:00
Dylan M. Taylor 0dae816499 Merge remote-tracking branch 'origin/main' into codex/cad-shared-mtext-escapes
# Conflicts:
#	Cargo.lock
2026-11-15 19:02:59 +00:00
Dylan M. Taylor e7a51dcc3d Merge remote-tracking branch 'origin/main' into codex/mcp-shared
# Conflicts:
#	Cargo.lock
2026-11-15 18:41:57 +00:00
Dylan M. Taylor 7cb07b2f3b Merge branch 'codex/cad-shared-mtext-escapes' of https://github.com/storytold/cadcraft into codex/cad-shared-mtext-tokenizer
# Conflicts:
#	Cargo.lock
#	Cargo.toml
2026-11-15 18:03:30 +00:00
Dylan M. Taylor 923f4174a6 Pin MTEXT escapes to merged shared decoder 2026-11-15 17:38:18 +00:00
Dylan M. Taylor 9789562ac7 Pin Base64 consumer to merged shared compatibility API 2026-11-15 17:17:19 +00:00
Dylan M. Taylor a20a46f7c3 Pin MCP cutover to merged shared protocol revision 2026-11-15 17:14:50 +00:00
Dylan M. Taylor db70717001 Use shared MTEXT lexical tokens 2026-11-15 16:06:13 +00:00
Dylan M. Taylor 173cdf6e8a Use shared MTEXT escape decoding 2026-11-15 16:00:46 +00:00
Dylan M. Taylor 5b170664aa Use shared SHX glyph interpreter 2026-11-15 15:52:39 +00:00
Dylan M. Taylor 305f452283 Use shared SHX container reader 2026-11-15 15:49:47 +00:00
Dylan M. Taylor 78bcdce794 Wire shared compiler into CAD font API 2026-11-15 15:47:14 +00:00
Dylan M. Taylor 91b14c83cf Use shared Base64 for file and control data 2026-11-15 15:39:16 +00:00
Dylan M. Taylor 072ec4500a Use shared codecs for preview and screenshots 2026-11-15 15:32:54 +00:00
Dylan M. Taylor 8a4e275466 Route MCP protocol through shared libraries 2026-11-15 15:30:38 +00:00
Dylan M. Taylor 58a13b5a64 Update raster probe and use supported BMP dimensions 2026-11-15 15:24:39 +00:00
Dylan M. Taylor 281f86d602 Encode rendered PNGs through shared codecs 2026-11-15 15:22:04 +00:00
Dylan M. Taylor caaa0e37f7 Use shared raster image codecs 2026-11-15 15:20:04 +00:00
FredAppsandFredApps 67514021ae Release: CADCraft v0.21.0 on main (#3172)
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-14 21:45:54 +01:00
Dylan M. Taylor 2a9fc8f241 Use shared DWG bridge in CADCraft 2026-11-13 23:50:21 +00:00
Dimitrios Vidalis ddfa833bc2 Grips: hidden objects paint no grips and take no grip hits (#3048)
* 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.
2026-11-13 14:12:27 +01:00
Dylan M. Taylor c736e488ba Use craft-dxf from craft-libs for DXF tags (#3040)
* 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
2026-11-11 19:51:53 -05:00
Dylan M. Taylor e1d379ad9f chore: bump version to 0.20.1 for the Flatpak update fix (#3084) 2026-11-11 14:55:43 -05:00
Dylan M. Taylor 20b4472f0b Updates: take craft-update from craft-libs main at 6e03f65bf 2026-11-11 12:43:30 -05:00
FredApps dea9f2d048 Release: CADCraft v0.20.0 (#3054) 2026-11-11 16:38:50 +01:00
Dylan M. Taylor 6d744887f4 fix(mcp): send the control token only to 127.0.0.1:PORT and read it only from a private file (#2718)
The bridge picked the token by port alone and sent it to whatever the address resolved to, so a listener another account opened on ::1 with the same port received the desktop's credential. The token is now attached only when the connected peer is exactly 127.0.0.1:PORT, where the app listens. Reading the token refuses a symlink, a non-plain file and a file others can read, and the shared temporary directory is no longer a fallback location for it.
2026-11-10 21:33:51 -05:00
Michael Higginsandmocenigo 2f8f186188 macOS: file dialogs no longer run inside the window's event handler (#1534)
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 <4894657+mocenigo@users.noreply.github.com>
2026-11-10 19:20:25 +01:00
dotCooCoo 3074f18960 Updates: take craft-update from craft-libs main at 1b34eba41 2026-11-08 19:45:36 -08:00
Dylan M. Taylor 10ffb7c7bd Merge pull request #2947 from dotCooCoo/chore/craft-update-updater-fixes
Updates: the updater reports installing, ready, installed and failed, and installs at exit
2026-11-08 22:12:58 -05:00
FredApps d847eac134 Merge pull request #1036 from vangel76/fix/fonts-mtext-hardening
fix(fonts): MTEXT keeps the text after an unterminated code; bound oblique, line spacing and relative heights
2026-11-09 00:07:20 +01:00
dotCooCoo 3a9aebc210 Updates: the updater reports installing, ready, installed and failed, and installs at exit
craft-update moves from craft-libs c5a1cbfb to c7c84230, a branch that is
craft-libs main at 0a9d1f48 with storytold/craft-libs#687 and #696 merged
in. Cargo.lock changes the craft-update entry and drops zopfli from zip.

The check result window now shows whenever the updater's status is not
idle, not only after Help > Check for Updates, and never over the startup
prompt. At the first start after an update it reports that the update
installed or why it failed. Restart to Update calls
Updater::restart_to_update. The install helper starts when the app exits
and drops the updater, so a canceled close keeps the update ready.
2026-11-08 12:45:18 -08:00
Helen Kwok 14a6cc3cdc cadcraft-ui-egui: ui.screenshot returns the PNG inline on wasm
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.
2026-11-07 08:11:48 +08:00
Helen Kwok 85b35fc5b9 cadcraft-web: window.cadcraft, the page command API from craft-web-api
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.
2026-11-07 07:59:36 +08:00
Tanish Manku deb1468d08 build: drop three egui patches nothing uses
egui_system_font_provider, egui_demo_lib and egui_inspection were patched to the egui fork
with the rest of its family (#2119), but no crate here depends on them: Cargo.lock lists
them as [[patch.unused]] and cargo warns on every build. A vendored offline build (Nix's
importCargoLock) refuses an unused git patch, so the flakes in #794 and #1814 can't build
main. Reported by @mbolling on #1814.
2026-11-05 16:10:30 -07:00
FredApps 74485a71b1 Merge branch 'main' into fix/803-mcp-render-background 2026-11-05 14:52:29 +01:00
Helen Kwok 0902a13b88 cadcraft-web: speak the host messages through craft-web-host
The transports, the message types and the origin checks come from the shared crate (storytold/craft-libs#420); CADCraft keeps the engine delivery hook, the open size limit and the upload inbox.
2026-11-05 17:50:59 +08:00
Zinadin ZidanandClaude Opus 5.5 017cc9b1fc fix(mcp): render takes a background and a plot style (#803)
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>
2026-11-05 11:20:52 +06:00
FredAppsandClaude Opus 5.5 c4d9e6ac64 fix(ui): About credits tables fit without side-scrolling and their columns resize (#2747)
* fix(ui): About credits tables fit without side-scrolling and their columns resize

The Contributors table and the Models table were egui Grids inside a
two-way scroll area: they opened wider than the dialog, so they scrolled
sideways, and Company and Model sat almost touching. Both are now
egui_extras tables. Each column opens at the width of its header and widest
cell, the spare width goes to the text columns (Name; Company and Model),
and every column edge can be dragged. Widening a column grows the table
like a spreadsheet, and only then does it scroll sideways; the header stays
put while the rows scroll. Counts and dates are right-aligned and every
cell is vertically centred.

The sorted column stays highlighted and its direction shows on the
toolbar's sort-order button, so headers no longer reserve room for an
arrow. The opening widths come from fit_widths, a pure function with unit
tests that a fitted table fills its room exactly and that only the text
columns give way when room is short.

The About dialog opens 820 points wide, so every column fits at its natural width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Let every credits column be dragged, and refit changed tables

The last column was egui's remainder column, which has no drag handle, so
it could only be resized from the edge before it. It is now an ordinary
column with its own handle.

A table keeps its column widths, so switching to a longer name left the
Name column at its old width and clipped the text. The table now goes
back to the opening fit whenever that fit changes: a longer widest cell
or a resized window. Dragged widths are dropped at that point.

fit_widths could overflow the room when one column hit the minimum,
because the other columns did not take up its share. Columns now give
way in proportion to their width above the minimum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Refit credits tables on what they measure, not the fitted widths

Comparing the fitted widths missed the case it was meant for. Name is the
only growing column, so a longer name takes its extra width from the
spare room and the fit comes out the same: a dragged Name width stayed,
clipping the longer name.

It could also drop dragged widths by accident. The fit comes from the
available width inside the scroll area, which scrolling can nudge, so
scrolling a widened table could reset it.

The table now compares the natural widths and the clip rect's width,
which scrolling does not move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 04:33:26 +01:00
Tanish Manku c2d62a2842 Merge main into land/1944 2026-11-03 17:11:42 -07:00
Tanish Manku 28421dd1d7 Merge #1944 (SHX shape fonts, big fonts and unifonts; linetype shapes) onto main 2026-11-03 14:59:22 -07:00