Commit graph cad-editor/src
Author SHA1 Message Date
3f8b69c71b CMMS embedding: Export to CAM - build STL, save, navigate to Kiri:Moto
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.
2026-08-23 17:41:02 +10:00
64d0230952 CMMS embedding: support creating a brand-new file, not just editing
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.
2026-08-23 15:54:52 +10:00
494ddfece9 CMMS embedding: load-from-URL on boot, POST-save instead of download
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.
2026-08-23 14:49:00 +10:00
Hakan Seven
d133fcb42e Merge remote-tracking branch 'origin/main' 2026-08-23 00:31:08 +03:00
Hakan Seven
343b6cda7d feat(mline): align creation and editing 2026-08-23 00:30:41 +03:00
gianlucafiore
43c150199e
Merge pull request #861 from gianlucafiore/fix/ltscale-current-value
fix(ltscale): show current value before prompt
2026-08-22 17:24:48 -03:00
gianlucafiore
6ef5d66d9e fix(ltscale): show current value before prompt 2026-08-22 17:14:22 -03:00
Hakan Seven
e74d5d78fc fix(rect): merge current main
Preserve both Point and Rectangle property layouts where the two pull requests changed the same section.
2026-08-22 23:03:26 +03:00
Hakan Seven
339d9afcfe
Merge pull request #857 from ramox81/codex/align-point-behavior
Align point command, properties, and display behavior
2026-08-22 22:58:42 +03:00
Hakan Seven
27cae9467a fix(rect): harden rectangle behavior
Reject invalid trim geometry instead of silently changing dimensions.\nRegister XData application IDs so rectangle metadata survives saves.
2026-08-22 22:55:36 +03:00
Hakan Seven
7293bec1b9 fix(point): preserve relative marker sizing
Keep rendering, picking, block transforms, and plotted output on the
same viewport-relative PDSIZE geometry without overloading wire width
fields.
2026-08-22 22:22:01 +03:00
ramox81
fc047b3b38 Add multiline editing workflows 2026-08-22 20:20:35 +03:00
ramox81
2263168a2a Complete multiline command and properties behavior 2026-08-22 20:20:34 +03:00
ramox81
8dc9803c02 Align rectangle property data 2026-08-22 19:26:47 +03:00
ramox81
be40b76922 Complete rectangle command behavior 2026-08-22 19:26:46 +03:00
ramox81
c5fe70627a Honor point display geometry and sizing 2026-08-22 17:18:30 +03:00
ramox81
ba9f36adb2 Align point property layout 2026-08-22 17:18:30 +03:00
ramox81
ac99942519 Align single and continuous point commands 2026-08-22 17:18:29 +03:00
Hakan Seven
e5b84ab8de fix(plot): honor wipeout draw order 2026-08-22 15:33:43 +03:00
Hakan Seven
c22f6cde60 fix(trim): preserve source handle in fence pass
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
2026-08-22 01:11:37 +03:00
Hakan Seven
d9aead3fbc Merge pull request #856 from ramox81/codex/align-circle-behavior 2026-08-21 23:29:57 +03:00
Hakan Seven
a87ca09fa4 Merge pull request #854 from ramox81/codex/align-arc-behavior 2026-08-21 21:41:24 +03:00
Hakan Seven
bd5f9436ea Merge pull request #852 from ramox81/codex/complete-hatch-workflow 2026-08-21 21:02:14 +03:00
Hakan Seven
4bc02b6b4a fix: correct hatch geometry workflow 2026-08-21 20:52:03 +03:00
Hakan Seven
b648000e78 Merge pull request #850 from ramox81/codex/associative-center-mark 2026-08-21 20:19:54 +03:00
Hakan Seven
a59537c337 Merge pull request #848 from ramox81/codex/complete-solid-workflow 2026-08-21 19:54:38 +03:00
Hakan Seven
ee89458f8a fix(solid): use kernel geometry
Derive extrusion, bounds, edges, and fill from cadkernel while preserving precise view filtering and stable GPU uploads.
2026-08-21 19:47:03 +03:00
Hakan Seven
6c4f769d61 Merge pull request #842 from gianlucafiore/feat/non-printing-layer 2026-08-21 18:58:24 +03:00
Hakan Seven
77e1f1b876 fix(plot): respect non-printing layers
Filter nested block, attribute, table, hatch, and wipeout geometry during export while preserving canvas visibility.
2026-08-21 18:57:23 +03:00
ramox81
c5900dfff4 Remove redundant circle preview closure 2026-08-21 16:50:01 +03:00
ramox81
fc9110de21 Use circle planes in offset and break 2026-08-21 16:49:56 +03:00
ramox81
390d42a63a Support planar circle tangent snapping 2026-08-21 16:49:49 +03:00
ramox81
5b4c1da881 Use world-space circle properties and grips 2026-08-21 16:49:39 +03:00
ramox81
4f24bb7d02 Complete tangent circle workflows 2026-08-21 16:49:08 +03:00
ramox81
b0e464f4b4 Correct circle size input and persistence 2026-08-21 16:48:41 +03:00
ramox81
5f9d8a9e0e Align arc creation and editing behavior 2026-08-21 14:03:58 +03:00
ramox81
f83037271c Complete hatch creation and editing workflow 2026-08-21 12:57:19 +03:00
ramox81
ff09fc7800 Implement associative center mark workflow 2026-08-21 12:05:18 +03:00
ramox81
0ae6355c2c Correct shared center settings behavior 2026-08-21 11:46:12 +03:00
ramox81
eba4fb87a8 Complete associative centerline workflow 2026-08-21 11:01:18 +03:00
ramox81
17dc0aff39 Complete 2D solid workflow 2026-08-21 10:14:26 +03:00
gianlucafiore
2208076e50 feat(plotstyle): show layer usage by ACI 2026-08-20 23:55:44 -03:00
gianlucafiore
eb5cbaeca0 feat(layers): add non-printing layer support 2026-08-20 20:37:27 -03:00
gianlucafiore
b1b5d31be5
Merge pull request #839 from gianlucafiore/fix/extension-intersection
fix(snap): improve OTRACK and extension snapping
2026-08-20 18:51:44 -03:00
gianlucafiore
02e0960138 fix(snap): improve OTRACK and extension snapping 2026-08-20 18:46:44 -03:00
Hakan Seven
87193ce22e fix(image): preserve raster brightness 2026-08-21 00:33:28 +03:00
Hakan Seven
464971969c feat: complete freehand sketch workflow
Co-authored-by: ramox81 <184937705+ramox81@users.noreply.github.com>
2026-08-21 00:17:44 +03:00
Hakan Seven
44efb8fd53 feat(frame): complete frame controls
Preserve frame geometry for selection while separating viewport and plot visibility across supported reference entities.

Refs #642
2026-08-20 23:37:02 +03:00
Hakan Seven
2a852f4479 feat(gradient): align editing and rendering 2026-08-20 21:17:10 +03:00
Hakan Seven
667f20d604 feat(revcloud): complete editing workflow
Keep source planes intact and stored Mline offsets in sync.

Refs #626
2026-08-20 20:33:57 +03:00