Commit Graph
2670 Commits
Author SHA1 Message Date
ramox81 2e112f9aeb Complete revolve workflow and properties 2026-09-03 13:40:23 +03:00
Hakan Seven e6429d5712 Merge pull request #980 from ramox81/codex/extrude-grip-preview
Fix extruded solid grip preview and taper range
2026-09-03 12:52:26 +03:00
Hakan Seven 4679eb2a5e fix: finish extrude grip preview integration 2026-09-03 12:52:03 +03:00
Hakan Seven 46323379b3 Merge remote-tracking branch 'origin/main' into codex/extrude-grip-preview 2026-09-03 12:50:52 +03:00
Hakan Seven 0d427a89ee Merge pull request #985 from HakanSeven12/fix-dimaunit-surveyor
fix(dimension): render surveyor angular units
2026-09-03 12:46:48 +03:00
Hakan Seven 612ec8d60f Merge main and localize surveyor units 2026-09-03 12:45:24 +03:00
Hakan Seven 020571cc41 Merge pull request #984 from NgoQuocViet2001/fix-power-right-assoc
fix(expr-eval): make ^ right-associative
2026-09-03 12:41:37 +03:00
Hakan Seven ce66701342 Merge pull request #982 from NgoQuocViet2001/fix-dim-color-overrides
fix(dimension): honour per-object text and extension-line colour overrides
2026-09-03 12:41:23 +03:00
Hakan Seven 7a8b61de20 Merge pull request #981 from NgoQuocViet2001/fix-engineering-units-carry
fix(dimension): carry engineering-unit inches up to feet
2026-09-03 12:41:12 +03:00
NgoQuocViet2001 9db030eb1f fix(expr-eval): make ^ right-associative
parse_power accepted a single exponent (`unary ('^' unary)?`), so a
chained power stopped after the first `^`. The remaining `^2` was left
unconsumed, and eval_to_string's embedded-expression scan then handed it
back as literal text: typing `2^3^2` into a coordinate or distance field
produced the string "8^2" rather than 512, and `2^3^2+1" produced "8^3".

Recurse into parse_power for the exponent so `2^3^2` reads as
`2^(3^2)", the standard right-associative meaning, and the whole
expression is consumed.
2026-09-03 15:32:56 +07:00
NgoQuocViet2001 074e589ce8 fix(dimension): render DIMAUNIT 4 as a surveyor's bearing
DIMAUNIT 4 is Surveyor's units, but format_angular_value matched only
0-3 and let 4 fall through the catch-all to decimal degrees. An angular
dimension in a drawing authored with surveyor units therefore read as
plain degrees, while AUNITS 4 in the same drawing writes a bearing for
the coordinate readout — the two disagreed on one angle.

Format the bearing from the dimension's own DMS path so it carries
DIMADEC, DIMAZIN and DIMDSEP, quantise before picking the quadrant so a
value just short of a cardinal does not quote a quarter turn, and offer
the option in the dimension-style dialog.
2026-09-03 15:23:42 +07:00
NgoQuocViet2001 6c6b394e56 fix(dimension): honour per-object text and extension-line colour overrides
The Properties panel reads and writes ACAD_DSTYLE overrides for all three
dimension colours (DIMCLRD 176, DIMCLRE 177, DIMCLRT 178), but the
renderer consulted the override only for DIMCLRD and took DIMCLRE/DIMCLRT
straight from the dimension style. Editing 'Text color' on a dimension
therefore showed the new colour in the panel while the drawing kept
rendering the inherited style colour — which for the common
DIMCLRT = ByLayer default is the layer colour. (#898)

Route all three through one helper so the renderer and the panel read the
same value.
2026-09-03 15:13:57 +07:00
ramox81 37a60329b1 fix: preserve grip clicks when dismissing hover menu 2026-09-03 11:07:15 +03:00
ramox81 ea6eb58c53 Fix extruded solid grip preview and taper range 2026-09-03 10:35:02 +03:00
NgoQuocViet2001 4a3b416103 fix(dimension): carry engineering-unit inches up to feet
format_engineering split feet from inches before rounding to DIMDEC, so a
remainder that rounds up to a full foot printed out of range: 35.999" at
two decimals read 2'-12.00" instead of 3'-0.00". A magnitude that rounded
away to zero also kept a lone minus sign.

Round on the decimal grid first and split afterwards, matching the carry
handling already used by format_architectural and format_fractional.
2026-09-03 14:28:13 +07:00
gianlucafiore 3ad0423393 Merge pull request #979 from gianlucafiore/fix/grip-tracking-reference
fix(grips): restore tracking references during grip edits
2026-09-02 20:21:40 -03:00
gianlucafiore 96b0587a83 fix(grips): restore tracking references during grip edits 2026-09-02 20:19:23 -03:00
Karim Jerbi 46190ccba1 refactor(selection): migrate Scene.selection to Arc<RefCell> to avoid per-frame deep clone
Scene.selection was Rc<RefCell<SelectionState>> (31 fields, ~1.6KB
with poly_points) cloned deep per view_main per pane via
(*sel_ref).clone() at view/mod.rs:760. Replace with
Arc<RefCell<SelectionState>> (Arc::new(RefCell::new(...)) at
scene/mod.rs:1436,1868), SelectionCanvas holds Arc<RefCell> and
selection_overlay takes Arc<RefCell> (overlay.rs:365,415),
view_main does Arc::clone(&tab.scene.selection) (atomic bump)
instead of deep clone. sel_ref stays borrowed for field reads
(vp_size etc.).

Bench (release, n=5000): SelectionState::clone 39-68ns (64pts) /
11-22ns (0pts) vs Arc::clone 7ns — 5-9x on the hot path.

Tests:
- selection_is_arc_not_refcell: asserts type_name contains Arc
- bench_selection_state_clone / bench_selection_arc_clone / bench_selection_state_clone_empty (ignored, release)
2026-09-02 22:14:32 +01:00
Hakan Seven d2338fa10f feat(site): show project growth charts 2026-09-02 23:44:53 +03:00
Hakan Seven ffc9a6cc33 docs(readme): split project growth charts 2026-09-02 23:37:43 +03:00
Hakan Seven 2cd1d36661 fix(render): match model lineweight preview curve 2026-09-02 23:28:34 +03:00
Hakan Seven 76bdab1e5b feat(display): add model lineweight scale 2026-09-02 23:03:04 +03:00
Hakan Seven edbc4d8ff8 fix(render): correct lineweight display scaling
Remove the global display boost and scale paper-space lineweights with the current sheet zoom across wire, block-wire, and hatch paths.

Fixes #962
2026-09-02 22:32:53 +03:00
Hakan Seven 0f337db488 Keep rotation prompt visible with arc label 2026-09-02 22:02:10 +03:00
Hakan Seven 7edf268eef Keep rotation angle label on guide arc 2026-09-02 21:53:29 +03:00
Hakan Seven 833af72eb2 Update Stefano support amount 2026-09-02 21:45:10 +03:00
Hakan Seven 52134a0bc6 Render rotation guide in working plane 2026-09-02 21:42:39 +03:00
Hakan Seven 947ff94015 Keep dynamic angle input near cursor
Anchor angle boxes to the screen-space cursor and flip them at viewport edges while preserving the geometric guide.

Fixes #966
2026-09-02 21:32:37 +03:00
Hakan Seven 93b441d4b8 Unify mixed color selection
Use the shared color selector for mixed property values and remove the legacy inline palette and its state.
2026-09-02 21:28:15 +03:00
Hakan Seven 8c9ef80b90 Fix color palette width
Make palette rows fill the available panel width while reserving an embedded scrollbar lane. Keep the final row aligned with the 16-column grid.\n\nFixes #968
2026-09-02 21:17:53 +03:00
Hakan Seven 4247b0c953 Keep FILLET active after each operation
Fixes #974
2026-09-02 21:06:55 +03:00
Karim Jerbi 50cb21e4d4 refactor(ribbon): make StyleContext borrowed to avoid 8 clones per view
Replace the 8 owned clones in StyleContext construction (4 Vec<String>
+ 4 String) at ribbon/mod.rs:568 and :1059 with borrowed refs.
StyleContext is now StyleContext<'a> with &'a [String]/&'a str
(widgets.rs:313), RenderCtx holds &'a StyleContext<'a> (:633),
and call sites pass &self.x instead of .clone(). The view-local
borrow is valid for the duration of Ribbon::view() and the style
dropdown overlay.

TDD: RED style_context_tests failed E0308 (owned vs borrowed),
GREEN added lifetime and updated 4 type sites + 2 construction sites.
2026-09-02 18:20:29 +01:00
Hakan Seven fddf505c20 Fix revolve history import 2026-09-02 19:35:32 +03:00
Karim Jerbi bdedcf63fc refactor(style): dedup muted_style into ui::style::common
Centralize the 7 byte-identical `muted_style` helpers (alpha 0.68)
previously duplicated across src/ui/style/* into a single
`src/ui/style/common.rs::muted_style` (+ alias `muted_text_style`).
All 7 style windows and the style_manager wrapper now call the
common helper, ensuring a theme palette change updates one place.

`btn_s` is intentionally NOT deduped: plotstyle.rs:41 and
style_manager.rs:299 have divergent bodies (Disabled handling +
text alpha 0.45). Unifying would silently change plotstyle
disabled appearance :  documented in common.rs and covered by test.

TDD: RED `common_tests` failed E0433 (missing common), GREEN
added common.rs and wired `pub mod common`, REFACTOR replaced
locals with `use crate::ui::style::common::muted_style`.

Tests:
- common_muted_style_matches_local_copy: asserts common output equals 0.68 alpha reference
- common_muted_text_style_alias_matches: alias identity
- btn_s_bodies_documented_as_divergent: documents intentional non-dedup
2026-09-02 16:43:57 +01:00
Karim Jerbi 199a484fcb refactor(view): scope SelectionState borrow in selection_overlay block
Hold a single Ref<SelectionState> across the block; replace six redundant borrow().vp_size/last_move_pos calls with field reads on the Ref. Move the deep clone to the widget call site ((*sel_ref).clone()), preserving one clone per frame but ensuring the widget receives the same snapshot as the geometry reads.
2026-09-02 16:43:57 +01:00
Hakan Seven 742f72f003 Restore revolve profile and axis grips (#976)
Restore revolve profile and axis grips
2026-09-02 18:06:18 +03:00
Hakan Seven b1deec753c Merge main and preserve revolve history grips 2026-09-02 18:05:50 +03:00
Hakan Seven ba95c29167 Restore loft section grip editing (#975)
Restore loft section grip editing
2026-09-02 17:56:27 +03:00
Hakan Seven 47549b168b Merge main and preserve loft history grips 2026-09-02 17:56:00 +03:00
Hakan Seven 88948ea2f1 Restore SWEEP profile and path grips (#973)
Restore SWEEP profile and path grips
2026-09-02 17:51:02 +03:00
Hakan Seven d93be37d35 Merge main and preserve sweep history grips 2026-09-02 17:50:30 +03:00
Hakan Seven 0ab1860948 Prevent grip clicks from starting area selection (#972)
Prevent grip clicks from starting area selection
2026-09-02 17:47:13 +03:00
Hakan Seven 2bb491d874 fix(grips): capture placement clicks first 2026-09-02 17:46:49 +03:00
Hakan Seven dba81bc8b6 Use feature edges for normal 3D selection (#971)
Use feature edges for normal 3D selection
2026-09-02 17:45:27 +03:00
Hakan Seven 7f03456cfe fix(selection): limit solid edge candidates 2026-09-02 17:44:58 +03:00
Hakan Seven 11e25b8e73 Complete EXTRUDE behavior and editable properties (#965)
Complete EXTRUDE behavior and editable properties
2026-09-02 17:42:15 +03:00
Hakan Seven fe669b7d90 fix(extrude): preserve region profiles 2026-09-02 17:41:21 +03:00
ramox81 e998af57d6 Add live extrusion draft grip preview 2026-09-02 17:34:09 +03:00
ramox81 15c44c0f3a Restore revolve profile and axis grips 2026-09-02 17:01:35 +03:00
Karim Jerbi d6a6dd6a7d feat(table): add TABLEDIT point picking, and consolidate InputKind
- Implement `TABLEDIT` command supporting viewport point-picking on cell interiors
- Support overlapping table hit testing with selection cycling and top-table resolution
- Support `/n` and `\n` multiline paragraph breaks (`\P`) in table cell text editing
- Unify text input modes via `InputKind` (`Point`, `SingleToken`, `FreeText`) on `CadCommand`
- Migrate 15+ commands across annotate, draw, insert, layout, and view modules
- Preserve text casing, literal spaces, and bypass arithmetic eval during FreeText input
- Add dedicated `tabledit_tests` and `free_text_entry_tests` test suites
2026-09-02 14:55:49 +01:00