Wires Message::StlExport's existing STLOUT command to the CMMS when
embedded, instead of the native save-dialog flow (which was already
non-functional on the web build regardless - handle_path() has no real
filesystem to write to there, a pre-existing upstream gap, not something
this touches).
- Cargo.toml: add the Location web-sys feature (needed for
window.location().set_href()).
- src/sys.rs: post_stl_export_to_host() - POSTs STL bytes as a new
attachment (cad_export_stl action, not cad_save/cad_save_new - STL isn't
in CAD_EDITABLE_EXT, it needs its own allowlist), then navigates the
browser straight to the CMMS's Kiri:Moto CAM page for the attachment it
just created. Splits cfg.job_id's "type:id" owner token apart to build
cam-edit.php's entity_type=/entity_id= params.
- src/app/mod.rs + update/mod.rs: CmmsStlExportResult message/handler -
only ever surfaces a failure (a success already navigated away).
- src/app/update/mod.rs: Message::StlExport gains a wasm32+embedded branch
that skips the file-picker entirely and calls the above directly.
cad-edit.php?new=1 launches the editor with no attachment_id/load_url yet -
CmmsConfig's load_url/attachment_id/original_name become Optional (only
save_url/job_id/csrf_token are always required). load_from_cmms_web() and
boot_web()'s auto-load task both skip cleanly when load_url is absent (no
error, just the normal blank Start tab). post_bytes_to_host() now takes the
filename and picks cad_save (update, has attachment_id) vs cad_save_new
(create); on a successful create it writes the new id/loadUrl/originalName
back into window.CAD_EDITOR_CONFIG in place, so the tab's *next* save
updates that row instead of creating a duplicate each time.
Additive only - standalone/opencadstudio.com use is unaffected since every
new path is gated on window.CAD_EDITOR_CONFIG being present (set by the
CMMS's cad-edit.php host page, absent everywhere else).
- src/sys.rs: cmms_config() reads window.CAD_EDITOR_CONFIG; post_bytes_to_host()
POSTs saved bytes back via FormData instead of triggering a download.
- src/io/mod.rs: load_from_cmms_web() fetches bytes from the host-provided
loadUrl and feeds them through the existing load_web_bytes parse path.
- src/app/mod.rs: boot_web() auto-loads via load_from_cmms_web() when
embedded; CmmsSaveResult message variant carries the save outcome.
- src/app/update/mod.rs: CmmsSaveResult handler surfaces success/failure
in the command line.
- src/app/update/file.rs: web save branch calls post_bytes_to_host() instead
of download_bytes() when embedded.
- Cargo.toml: add Request/RequestInit/FormData to the web-sys feature list.
Temporary fence pieces used a sentinel handle, so the source spline was included as its own cutting boundary and kernel intersection recursed indefinitely.
Refs #830