Commit graph

2,471 commits

Author SHA1 Message Date
Hakan Seven
745bc9fba7 fix(i18n): correct German regressions 2026-08-24 19:57:30 +03:00
ramox81
95279d10c0 Align table properties and editing behavior 2026-08-24 18:09:34 +03:00
ramox81
4e80afb0da Show effective ring segment widths 2026-08-24 18:04:01 +03:00
Hakan Seven
1fb770fb15
Merge pull request #865 from schoeller/panel-xdata
feat(properties): show XDATA records in Properties panel
2026-08-24 16:09:31 +03:00
Hakan Seven
8bceb3ecd3 fix(properties): preserve XDATA details 2026-08-24 16:09:03 +03:00
ramox81
80d7a8741e Route dimension color fields correctly 2026-08-24 15:32:38 +03:00
ramox81
c66ec7fb64 Complete linear dimension property behavior 2026-08-24 15:32:38 +03:00
ramox81
bcd9a0dc32 Align linear dimension general properties 2026-08-24 15:32:37 +03:00
ramox81
9dc4e08f77 Align dimension property editability 2026-08-24 14:10:14 +03:00
ramox81
4a08f7fe80 Complete table creation and editing workflow 2026-08-24 13:00:04 +03:00
ramox81
f0d00c1d53 Align linear dimension properties and grips 2026-08-24 12:10:29 +03:00
ramox81
f556a2b027 Complete the linear dimension workflow 2026-08-24 12:10:29 +03:00
ramox81
a30010cb3e Keep linear dimensions associated with sources 2026-08-24 12:10:29 +03:00
ramox81
9fdc920234 Use consistent dimension data revision 2026-08-24 12:10:28 +03:00
Sebastian
7c77d78b46
Update opencadstudio.ftl
Line 1449
2026-08-24 08:46:34 +02:00
ramox81
8c56c03387 fix(polyline): honor global width and fill mode 2026-08-24 09:36:57 +03:00
ramox81
00b3ef54eb fix(donut): complete diameter workflow 2026-08-24 09:29:44 +03:00
Karim Jerbi
7215faae44 feat(properties): make inherited properties editable, align dropdowns, and switch transparency to EditChoice
Enable in-place editing of inherited properties in the Properties panel:
- Transparency: Switch to PropValue::EditChoice with ByLayer and ByBlock presets to allow direct typing of any numeric percentage value (0..90%) without combo_box autocomplete interference.
- Select-all-on-click: Integrate EditChoice text inputs into build_field_key_map with dedicated widget IDs, preserving click-to-select-all across editable fields.
- Material: Provide bounded preset choices (ByLayer, ByBlock, Global, and active custom material) to avoid scanning large drawing dictionaries.
- Plot style: Implement mode-aware behavior with interactive Choice in STB mode and ReadOnlyWithTooltip in CTB mode.
- Read-only tooltips: Introduce PropValue::ReadOnlyWithTooltip to provide contextual explanations for locked fields while preserving mouse text selection and clipboard copying.
- Dropdown alignment & unified borders: Fix EditChoice internal input/caret background clipping so the container's 1px neutral/active border surrounds the entire control identically to Lineweight and text inputs.
- Document defaults & aggregation: Synchronize document header defaults when editing with No selection, and aggregate heterogeneous multi-selections (*VARIES*).
2026-08-23 23:20:34 +01:00
Sebastian
e1ba82518c
Merge branch 'main' into de_DE-patch-1 2026-08-23 23:21:55 +02:00
Sebastian
31d071246d
Update opencadstudio.ftl
Line 831
2026-08-23 23:19:56 +02:00
Hakan Seven
7794736271 fix(model): repair solid selection flows 2026-08-23 23:44:03 +03:00
Sebastian
e904844ed9
Update opencadstudio.ftl
Line 336
2026-08-23 21:58:15 +02:00
Hakan Seven
06cd0ec6a9 feat(model): add exact solid modelling tools 2026-08-23 22:53:31 +03:00
Sebastian
86a29b4b97 feat(properties): show XDATA records in Properties panel 2026-08-23 21:27:30 +02:00
Karim Jerbi
fb2ea1e831 test(draworder): large-drawing latency benchmark 2026-08-23 18:56:05 +01:00
Karim Jerbi
7c14c31f25 fix(draworder): distinct ordered sort keys for multi-select and send-to-back groups 2026-08-23 18:56:05 +01:00
Karim Jerbi
236b7756f8 feat(draworder): HATCHTOBACK command and interactive DRAWORDER workflows
Implement the AutoCAD compatible HATCHTOBACK (HB) command and enhance the interactive DRAWORDER command pipeline with comprehensive verb selection and viewport entity picking.

Key implementations and architectural details:

1. HATCHTOBACK command execution
   * Isolates entities belonging to the active layout block record or global space.
   * Filters out entities residing on locked layers using an efficient hash set lookup.
   * Records targeted delta undo operations on SortEntitiesTable objects (~100 bytes) rather than snapshotting full document structures.
   * Performs granular draw depth cache invalidation via Scene::invalidate_draw_depth, preserving existing geometry tessellations and spatial indices.
   * Emits localized user notifications when no qualifying hatch entities are found.

2. Interactive DrawOrderCommand state machine
   * Supports preselected entities as well as interactive on demand selection gathering.
   * Implements subverb selection supporting single character shortcuts (A for Above, U for Under, F for Front, B for Back) and case insensitive keyword parsing.
   * Enables interactive reference object picking directly in the viewport via needs_entity_pick and on_entity_pick callbacks.
   * Supports hexadecimal handle specification directly from the command line interface.

3. Ecosystem and system integration
   * Bumps DEFAULT_ALIASES_VERSION from 2 to 3 to register the HB alias while preserving existing user overrides.
   * Integrates HATCHTOBACK and HB into dynamic autocomplete registries.
   * Adds localized message strings across all 20 Fluent translation catalogs.
   * Corrects hatch boundary serialization flags to ensure outermost boundary rings consistently carry the external attribute.
2026-08-23 18:56:01 +01:00
Hakan Seven
44a40eda0b fix(model): restore saved solid booleans
Reload exact B-reps from solid history or ACIS before model operations and pin the closed-cut kernel fix.
2026-08-23 19:35:48 +03:00
Hakan Seven
e94cbedaa2 fix(save): preserve 3D view and thumbnails
Persist camera, render state, and solid fallback geometry across saves. Generate previews from a clean live viewport and refresh recent-file thumbnails immediately.
2026-08-23 17:59:12 +03:00
Hakan Seven
c4515cbbc1 fix(save): support autosave recovery files 2026-08-23 14:19:05 +03:00
Hakan Seven
73ba2b92cc fix(view): preserve rotated orientation 2026-08-23 14:19:01 +03:00
Hakan Seven
682e16210f fix(insert): honor preset attributes
Refs #853
2026-08-23 13:49:18 +03:00
Hakan Seven
94f5971fdb docs(ipc): clarify polled response reads 2026-08-23 13:23:26 +03:00
Hakan Seven
77a834800c
Merge pull request #862 from schoeller/main
request_with_poll TCP desync fix
2026-08-23 13:21:36 +03:00
201b177429 Fix two real bugs: CAM opens in new tab, Save preserves format
1. post_stl_export_to_host() now opens the CAM page with
   window.open(..., '_blank') instead of window.location().set_href() -
   the latter navigated the CAD editor's own tab away, which tears down
   its WASM/GPU/worker context. Going back afterward doesn't reliably
   restore it, and a user who then hit Save on the broken restored state
   would silently overwrite the real file with whatever that broken state
   held. A new tab leaves the original completely untouched. (User report:
   CAM froze on load, then going back and saving "blanked" the file.)

2. save_with_default_format(): a plain Save (not Save As) on an
   already-loaded document used to ALWAYS serialize using the hardcoded
   default format (DWG 2018), ignoring what the document actually was -
   confirmed live via a real corrupted attachment (a .dxf that, after one
   Save, contained binary DWG bytes under its original .dxf name and
   filename, size dropped ~11.6MB -> 1.5MB). This is a pre-existing
   upstream gap, not something the CMMS patches introduced - native builds
   never hit it because on_save_file()'s native branch has an early-return
   for "just re-save to the known path" that preserves the current
   version; web has no equivalent and always fell through to this
   function's unconditional default. Extended the same format-preservation
   logic recovery-saves already use to also apply whenever the document
   has a known current_path (i.e. it's not actually a fresh, never-saved
   drawing).
2026-08-23 18:53:06 +10:00
Sebastian
a67affcb93 fix(ipc): preserve stream shutdown on interrupt during polled reads 2026-08-23 10:46:27 +02:00
Sebastian
4fd94d324a fix(ipc): read response byte-by-byte in request_with_poll to avoid TCP desync 2026-08-23 10:41:03 +02:00
56d1c0370e Add a real Export to CAM ribbon button + filename dialog
Previously the CMMS's STL-export-and-navigate flow was only reachable by
typing STLOUT/EXPORTSTL into the command line, with no visible button and
no way to choose the filename. Adds a proper UI entry point:

- Ribbon: a new quick-access button next to Save As (same style/position,
  GEAR icon - no dedicated CAM/CNC icon asset exists), command EXPORTCAM.
- A filename dialog (ModalKind::CamExportDialog, cam_export_filename
  field) mirrors the existing Save-As dialog's shape minus the format
  picker (always STL) - defaults to "<drawing name>.stl", editable before
  confirming.
- STLOUT/EXPORTSTL commands are unchanged (still instant-export using the
  drawing's own name, no popup) - this is a second, separate entry point,
  not a replacement.
2026-08-23 18:02:09 +10:00
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
52432af928 build(deps): align codec and kernel revisions 2026-08-23 01:45:29 +03: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
d38f4cbc28
Merge pull request #859 from ramox81/codex/align-rectangle-behavior
Align rectangle command and property behavior
2026-08-22 23:04:02 +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