forked from 1b-agent/opencadstudio-upstream
web: XREFs, data links & extraction, ARCHIVE transmittals, worker-side saves
The last four big web-vs-desktop gaps.
XREFs: XATTACH reads the picked drawing's bytes and registers them
name-keyed (the image/PDF-underlay pattern), pre-parses on the web
worker, and the commit merge produces the same xref block flow as
native. Opened drawings resolve xrefs from the registry (trailing-name
match) before cache build; unresolved references produce ONE warning
listing the names and the fix — drop the referenced files on the page
(drops and picker opens now register their bytes) and reopen or
XRELOAD. XRELOAD works off the registry on unsaved drawings too.
Data Link & Extraction: spreadsheet links read picked xlsx/csv bytes
(calamine from slices / CSV from string) through a session registry,
so preview, refresh, and table-insert work on web; extraction takes
external drawings via a multi-file picker parsed on the worker, and
outputs CSV/TXT/.dxex via download_bytes. The disabled 'Add folder'
button explains why.
ARCHIVE/ETRANSMIT: assembles the drawing plus registered images, PDF
underlays, and session plot tables into a deterministic ZIP (minimal
writer over flate2 — no new dependency) delivered as
{stem}_transmit.zip; skipped dependencies are reported by name.
Save/autosave off the UI thread: the parse worker gains a serialize
action (protocol v5) — the document is prepared once on the main
thread (clone, styles, dimension bake), then the DWG/DXF writer pass,
the dominant cost, runs on the worker; any worker failure falls back
to inline serialization with the identical shared implementation.
The save path also clears the dirty flag only when the tab didn't
change mid-write, and the runtime-fields sidecar now carries
graphic_data, fixing a pre-existing loss of raw DWG round-trip bytes
on web-opened documents.
This commit is contained in:
1 parent
c643a10ed9
commit
2e1006348b
44 files changed
+2564
-330
No files matched your search
@@ -3153,6 +3153,7 @@ pub(super) fn message_attribute(source: &str) -> Option<(&'static str, &'static
|
||||
"XREF Reloaded \"{}\"" => Some(("insert", "xref-reloaded")),
|
||||
"XREF Save the drawing first to resolve relative XREF paths." => Some(("insert", "xref-save-the-drawing-first-to-resolve-relativ")),
|
||||
"XREF Unloaded (skipped): \"{}\"" => Some(("common", "xref-unloaded-skipped")),
|
||||
"XREF Unresolved external references: {names} — drop the referenced DWG/DXF files on the page to register them, then reopen this drawing or run XRELOAD." => Some(("insert", "xref-unresolved-external-references")),
|
||||
"Y (mm)" => Some(("plot", "y-mm")),
|
||||
"Yards" => Some(("common", "yards")),
|
||||
"Yellow" => Some(("common", "yellow")),
|
||||
@@ -3190,11 +3191,14 @@ pub(super) fn message_attribute(source: &str) -> Option<(&'static str, &'static
|
||||
"that object" => Some(("modal", "that-object")),
|
||||
"those objects" => Some(("modal", "those-objects")),
|
||||
"units" => Some(("common", "units")),
|
||||
"{cmd}: cannot build the transmittal ZIP ({e})." => Some(("file", "cmd-cannot-build-the-transmittal-zip-e")),
|
||||
"{cmd}: cannot create folder ({e})." => Some(("file", "cmd-cannot-create-folder-e")),
|
||||
"{cmd}: cannot package the drawing ({e})." => Some(("file", "cmd-cannot-package-the-drawing-e")),
|
||||
"{cmd}: no hatch objects." => Some(("view", "cmd-no-hatch-objects")),
|
||||
"{cmd}: no text or dimension objects." => Some(("view", "cmd-no-text-or-dimension-objects")),
|
||||
"{cmd}: not yet implemented." => Some(("view", "cmd-not-yet-implemented")),
|
||||
"{cmd}: packaged {copied} file(s) into {}" => Some(("file", "cmd-packaged-copied-file-s-into")),
|
||||
"{cmd}: skipped {n} referenced file(s) not loaded in this session: {names}" => Some(("file", "cmd-skipped-n-referenced-file-s-not-loaded-in")),
|
||||
"{count} object(s) added to selection." => Some(("common", "count-object-s-added-to-selection")),
|
||||
"{count} object(s) pasted." => Some(("common", "count-object-s-pasted")),
|
||||
"{error}. External-change checks remain active." => Some(("file", "error-external-change-checks-remain-active")),
|
||||
@@ -3543,6 +3547,9 @@ pub(super) fn message_attribute(source: &str) -> Option<(&'static str, &'static
|
||||
"Save Block As" => Some(("common", "save-block-as")),
|
||||
"Save Data Extraction" => Some(("common", "save-data-extraction")),
|
||||
"CSV" => Some(("common", "csv")),
|
||||
"Pick the file again to load its contents in the browser." => Some(("file", "pick-the-file-again-to-load-its-contents")),
|
||||
"Adding folders is not available in the browser. Add drawing files instead." => Some(("file", "adding-folders-is-not-available-in-the-browser")),
|
||||
"Drawing not loaded in the browser: {name}." => Some(("file", "drawing-not-loaded-in-the-browser")),
|
||||
"Export STL" => Some(("common", "export-stl")),
|
||||
"STL Files" => Some(("common", "stl-files")),
|
||||
"Export STEP AP203" => Some(("common", "export-step-ap203")),
|
||||
|
||||
Reference in new issue
Block a user