cad-editor/src/ui
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven 5755c2e130 refactor(grip): square-only marker set + oriented stretch handles
Phase 1 of bringing the grip vocabulary in line with the standard
CAD convention: drop the per-position-type shape encoding (Diamond
for translate, Circle for parameter) and use a plain square for
every endpoint / vertex / centre grip. The behavioural midpoint vs
vertex distinction stays — it lives on `GripDef::is_midpoint` and
drives `Translate` vs `Absolute` in the grip-edit dispatcher — only
the marker shape collapses.

- `GripShape` keeps `Square`, `Rectangle`, `Triangle`. Diamond /
  Circle are gone.
- `GripDef` gains `dir: Option<[f32; 2]>` — a world-XY direction
  vector consumed by `Rectangle` to orient the box along its
  segment.
- `entities::common` exposes `square_grip`, `center_grip` (same
  square marker, flagged as translate), `rectangle_grip(id, world,
  dir)` for oriented mid-segment handles, and a kept-for-Phase-2
  `triangle_grip`.
- `overlay::GripMarker` / `grips_to_screen[_paper]` thread `dir`
  through to the canvas painter; the Rectangle path rotates the
  box around the grip centre using the world-XY direction (flipping
  the sin for screen-Y).

Every existing `diamond_grip(id, w)` call becomes `center_grip(id,
w)` — the visual change is square-replacing-diamond at line
midpoints / arc midpoints / circle centres / ellipse centres /
viewport / hatch loop centroids / dimension grips / image corners /
multileader / ray / underlay / ole2frame / solid3d.

`LwPolyline` grows a stretch handle on every segment (straight or
arc), drawn as the new oriented rectangle. The grip-edit path
translates both segment endpoints for straight segments and
adjusts the arc bulge from the new midpoint for arc segments.
2026-05-29 02:07:34 +03:00
..
ribbon fix(ribbon): clear blue tool state when its popup window closes (#40) 2026-05-29 01:23:25 +03:00
about.rs chore: rename H7CAD to Open CAD Studio 2026-05-23 17:16:15 +03:00
app_menu.rs chore: rename H7CAD to Open CAD Studio 2026-05-23 17:16:15 +03:00
command_line.rs feat(dyn-input): TAB-editable distance/angle/coordinate fields 2026-05-27 14:08:57 +03:00
dimstyle.rs cargo fmt 2026-05-12 10:36:15 +03:00
layers.rs chore: remove dead UI helpers and orphan toolbar stubs 2026-05-16 00:04:44 +03:00
layout_manager.rs cargo fmt 2026-05-12 10:36:15 +03:00
mlstyle.rs cargo fmt 2026-05-12 10:36:15 +03:00
mod.rs feat: in-app update notice — checks GitHub releases on startup 2026-05-16 19:55:57 +03:00
open_progress.rs feat(io): show loading overlay while opening CAD files 2026-05-13 09:59:07 +03:00
overlay.rs refactor(grip): square-only marker set + oriented stretch handles 2026-05-29 02:07:34 +03:00
page_setup.rs cargo fmt 2026-05-12 10:36:15 +03:00
plotstyle.rs cargo fmt 2026-05-12 10:36:15 +03:00
properties.rs chore: rename H7CAD to Open CAD Studio 2026-05-23 17:16:15 +03:00
scale_popup.rs feat: correct viewport scale calculation with correct dimension and text scaling 2026-05-19 00:26:08 +03:00
shortcuts.rs cargo fmt 2026-05-12 10:36:15 +03:00
snap_popup.rs chore: rename H7CAD to Open CAD Studio 2026-05-23 17:16:15 +03:00
statusbar.rs fix(polyline): correct wide-polyline fill band arc center + add LWDISPLAY toggle 2026-05-23 07:15:26 +03:00
tablestyle.rs cargo fmt 2026-05-12 10:36:15 +03:00
textstyle.rs cargo fmt 2026-05-12 10:36:15 +03:00
update_notice.rs chore: rename H7CAD to Open CAD Studio 2026-05-23 17:16:15 +03:00