Commit Graph
115 Commits
Author SHA1 Message Date
Hakan Seven 79bc800728 Merge pull request #1320 from ghost/styled-dimension-preview 2026-09-17 07:11:10 +03:00
Hakan Seven 0c9cb72069 Merge pull request #1316 from ghost/hide-dynamic-dimension-placement 2026-09-17 07:09:06 +03:00
Christopher Overbeck acbbb23297 feat(dimension): styled placement previews for creation commands
Show the styled dimension and its value while placing a dimension, using
the same builder the command commits with. Each creation command
(DIMLINEAR, DIMALIGNED, DIMANGULAR, DIMRADIUS, DIMDIAMETER, DIMARC,
DIMJOGGED, DIMORDINATE, DIMCONTINUE, DIMBASELINE, QDIM) reports the
dimensions it would commit at the current stage through
`CadCommand::dimension_preview`. The application applies the current
creation style, or the base dimension's style for DIMCONTINUEMODE=1,
and the same viewport measurement scale as commit, then tessellates the
transient entity through the normal dimension renderer.

While the second definition point is being acquired, a hovered model
snap supplies a provisional viewport scale; once both points are fixed,
hovering another viewport does not change the value. Angular dimensions
never receive length compensation. Degenerate geometry, an invalid
scale, or conflicting viewports fall back to the plain rubber-band
preview so no misleading value is shown.
2026-09-16 13:58:44 -05:00
Christopher Overbeck c05d6ba44f Hide dynamic input during dimension line placement 2026-09-16 10:36:32 -05:00
Christopher Overbeck 5424a19482 Track mixed paper and viewport dimension references 2026-09-15 16:00:11 -05:00
Christopher Overbeck 2ee3782850 Fix viewport dimension acquisition and preserve measurement scaling 2026-09-15 14:13:19 -05:00
Christopher Overbeck 369e0c9fc5 Merge remote-tracking branch 'origin/main' into feat/viewport-dimensions
# Conflicts:
#	src/app/command_driver.rs
#	src/scene/mod.rs
2026-09-15 13:53:12 -05:00
Christopher OverbeckandClaude Fable 5.1 30c5ccbba1 Measure paper-space dimensions through the viewport they were picked in
DIMLINEAR / DIMALIGNED / DIMRADIUS / DIMDIAMETER / DIMANGULAR created on a
sheet now report the model measurement of the geometry seen through a
viewport, at any viewport scale, while definition points, the dimension line
and the text stay in paper coordinates and the annotation keeps its sheet
size (DIMSCALE is untouched).

A viewport frame is a similarity - uniform scale plus in-plane twist - so
projecting the model span onto the paper axis and compensating gives exactly
the raw paper measurement times 1/scale. No geometry is rewritten: the
compensation is persisted once as a negative DIMLFAC override on the
dimension and applied once by the linear formatter, so preview text,
dimension text, the properties measurement row and DXF/DWG export all agree.
User measurement multipliers fold into the same magnitude, and an explicit
text override still bypasses formatting entirely, so it is never re-scaled.
Angular dimensions are never compensated - a similarity preserves angles.

Mixed input (one point through viewport A, another through viewport B or on
the sheet) is refused rather than silently mis-measured: the command line
explains why and the dimension falls back to plain paper measurement.

A dimension measured through a viewport is left unassociated: its definition
points are projected paper coordinates, so inferring a paper-space
association would bind it to geometry that is not there. PR3 records the real
dimension -> viewport -> entity chain.

The result is one ordinary dimension entity carrying one style override, so
undo/redo works through the existing history with no new out-of-document
state.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-15 12:40:44 -05:00
Hakan Seven 801e00e940 Merge pull request #1263 from ramox81/codex/annotation-menu 2026-09-15 12:29:27 +03:00
ramox81 768eaf5b2d feat(annotate): expose annotation panel tools 2026-09-14 21:05:53 +03:00
Hakan Seven 6c0badbdc8 fix: resolve annotation pull request findings 2026-09-14 20:16:46 +03:00
ramox81 a35c996f9f fix(annotate): complete table and data workflows 2026-09-14 14:54:55 +03:00
ramox81 6505b27818 fix(annotate): align annotation ribbon workflows 2026-09-14 11:55:08 +03:00
Hakan Seven d66e89ca19 Complete application localization across all supported languages 2026-09-07 01:05:02 +03:00
PanosandClaude Opus 5 391a74a615 perf: let one tessellation serve every background
Switching to a Layout re-tessellated the whole model — `memo_miss=186455`,
2034 ms — to arrive at geometry identical to what was already in the memo.
The only thing that differed was colour.

`local_wires_for` already knows this: it stores the raw colour and drops
its background argument with `let _ = bg_color;`, noting that
`Batches::finalize` applies `adapt_to_bg` last, "so the cache no longer
has to rebuild on BACKGROUND / layout-switch". The tessellation memo's
guard had not been told, and still mixed the background in, so every
entry was discarded on a switch.

`finalize` now records what its colour resolution consumed — the raw
colour, the raw glyph colours, and the three flags it branches on — as
`WireModel::bg_adapt`, and `resolve_colors_for_bg` replays it for another
background. The guard drops the background, so a memo entry serves any
layout.

The resolution recomputes from the recorded raw colour rather than from
the resolved one, which makes it idempotent and therefore safe over a set
that mixes memo hits with freshly tessellated misses. Re-adapting the
resolved colour would not be safe: `adapt_to_bg` snaps a near-white colour
to pure black on a light background, and pure black comes back pure
*white* on a dark one, losing the tint. A test pins that asymmetry so the
raw colour is not optimised away later.

The contract is tested against the real `finalize` rather than a copy of
its logic: for every background pair, building under one and resolving for
the other lands exactly where building under the other would have.

`bg_adapt` is `None` for wires built anywhere else, and the resolution
skips them, so nothing outside the block cache changes colour. It is also
`None` when the resolution would be a no-op — a preserved colour with no
canvas fill looks the same under every background — which keeps the common
case at no cost.

Ordering is unchanged: the pass runs inside the builder, before
`append_scene_markers` and `apply_refedit_fade`, both of which have their
own separate background dependency.

`wires-build` gains `colors=` so the pass has a number of its own.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-05 18:53:16 +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
Hakan Seven ff1f873633 fix(mleader): repair creation and editing 2026-08-28 19:36:48 +03:00
Hakan Seven c206c19759 fix(dimension): repair QDIM workflows 2026-08-28 19:19:45 +03:00
Hakan Seven d991289a56 chore(dimension): sync with main 2026-08-28 19:01:59 +03:00
Hakan Seven 38b02164e8 fix(dimension): repair continued workflows 2026-08-28 18:52:57 +03:00
Hakan Seven 1d58082e0a fix(dimension): repair baseline workflows 2026-08-28 08:01:44 +03:00
ramox81 cce25be83a Complete multileader creation and property behavior 2026-08-27 17:35:47 +03:00
ramox81 a5d2ff741c Complete QDIM dimension workflows 2026-08-27 16:19:23 +03:00
ramox81 d8e998b5e8 Complete continued dimension workflow 2026-08-27 15:22:12 +03:00
ramox81 45e84edae4 Align baseline dimension geometry data 2026-08-27 12:25:33 +03:00
ramox81 980a7d611b Complete baseline dimension workflow 2026-08-27 11:49:38 +03:00
ramox81 c6f6c00220 Add dimension continuation creation policy 2026-08-27 11:49:32 +03:00
Hakan Seven bc750c6d76 fix(dimension): harden jogged radius workflow 2026-08-27 08:09:02 +03:00
Hakan Seven 6ef2d75e84 fix(dimarc): complete merge integration
Preserve source-plane geometry and associative arc parameters while combining the latest properties and tolerance workflows.
2026-08-27 01:00:23 +03:00
Hakan Seven 81e7add1dd fix(tolerance): complete workflow integration
Sync current main and companion codec changes before preserving unsupported frame rows, rendering in the entity plane, and sharing final layout metrics with placement preview.
2026-08-27 00:14:08 +03:00
ramox81 5a9894fd3e Complete jogged radius dimension workflow 2026-08-26 17:17:55 +03:00
ramox81 8aca9a0aef Complete arc length dimension workflow 2026-08-26 15:32:37 +03:00
ramox81 de294447a9 Complete geometric tolerance workflow and properties 2026-08-26 13:54:20 +03:00
Hakan Seven 968ee3fda4 fix(dimension): complete ordinate workflow 2026-08-25 21:36:04 +03:00
Hakan Seven 9ded5eb04f feat(dimension): complete diameter workflow 2026-08-25 20:57:28 +03:00
Hakan Seven 8140c39e0d feat(dimension): complete radius workflow 2026-08-25 19:26:24 +03:00
Hakan Seven 649dfae337 fix(dimension): complete angular workflow 2026-08-25 18:55:25 +03:00
ramox81 e34b67c709 fix(dimension): complete ordinate workflow 2026-08-25 17:10:55 +03:00
ramox81 0ba33a55ff Add associative diameter dimension workflow 2026-08-25 15:39:44 +03:00
ramox81 d33c52a0b8 Add associative radius dimension workflow 2026-08-25 13:56:34 +03:00
Hakan Seven 97ec3ed67e fix(dimension): complete aligned workflow
Preserve association modes, source geometry, and sub-unit formatting.
2026-08-25 13:18:09 +03:00
ramox81 24b344b2b2 Complete angular dimension interaction and associations 2026-08-25 12:23:21 +03:00
ramox81 e93815d0c5 Complete angular dimension creation and associations 2026-08-25 11:29:38 +03:00
ramox81 713a02f3e0 Complete aligned dimension command flow 2026-08-25 09:52:34 +03:00
ramox81 2846ba6afc Support aligned dimension associations 2026-08-25 09:52:27 +03:00
Hakan Seven 20c7a2df58 fix(mleader): improve behavior and persistence
Keep annotation contexts, grip placement, and style dictionary entries consistent across editing and file saves.

Refs #779
2026-08-25 08:34:25 +03:00
gianlucafiore d693bcf968 fix(mleader): improve grips, styles and annotative behavior 2026-08-24 21:12:30 -03:00
Hakan Seven f40b172eb0 feat(table): complete editing workflow 2026-08-25 00:25:13 +03:00
Hakan Seven 959197bb3c feat(dimension): complete linear workflow 2026-08-24 23:42:49 +03:00
Hakan Seven 4209c35ba3 fix(polyline): render fill mode boundaries
Use kernel-produced band outlines when FILLMODE is off. Preserve centerline linetype stations through inserts, clipping, projection, and PDF export.
2026-08-24 22:18:44 +03:00