cad-editor/src/scene
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven 3f060a570a fix(pick): hit-test lineweight width and thickness walls
Selection tested a flat 8 px radius around each wire's centreline and
nothing else, so two things the user can see were not pickable.

A wire renders as a band `line_weight_px` wide, so pick now widens to that
rendered half-width via `pick_tolerance_px`, mirroring the wire shader's
`select(0.5, half_width, lwdisplay_enable)`. Behaviour is unchanged for
every standard weight (the widest, 2.11 mm, renders 7.97 px half-width —
just under the 8 px threshold); this keeps the two sides from drifting
apart if the display boost in `lineweight_to_px` ever changes.

Entities extruded by a DXF thickness draw their wall as four edges with
nothing in between, so the interior was a hole the cursor fell through.
WireModel gains `pick_tris`: triangles hit-testing treats as solid and the
renderer never uploads. Kept apart from `fill_tris` because that channel
reaches the GPU, and a wall that rendered shaded would change how every
thickness drawing looks. Ranked below `fill_tris` — those are drawn, these
are not, so where they overlap the drawn face is what the user means.

Walls are dropped when a wire is projected into a floating viewport:
`points` are reprojected and clipped into paper coords there, so cloned
model-space triangles would hit-test at a model-scale offset. Extruded
entities stay selectable by their edges, which do get projected.

The wall loop runs on every hover that misses everything else, so it
rejects on the wire's AABB first — an extruded circle is ~128 triangles
and a drawing full of thickness would otherwise project every wall on
each mouse move.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 14:58:55 +03:00
..
cache fix(pick): hit-test lineweight width and thickness walls 2026-07-17 14:58:55 +03:00
convert fix(pick): hit-test lineweight width and thickness walls 2026-07-17 14:58:55 +03:00
model fix(pick): hit-test lineweight width and thickness walls 2026-07-17 14:58:55 +03:00
pick fix(pick): hit-test lineweight width and thickness walls 2026-07-17 14:58:55 +03:00
pipeline fix(render): install the GPU error handler once per device, throttled 2026-07-17 10:38:53 +03:00
text fix(pick): hit-test lineweight width and thickness walls 2026-07-17 14:58:55 +03:00
view chore(glam): use camera-module projection API for deprecated Mat4 rh ctors 2026-07-17 01:49:26 +03:00
annotative.rs feat(annotative): synthesize per-object contexts + editable UI 2026-07-13 22:38:29 +03:00
camera_ops.rs fix(view): show geometry far off the drawing plane 2026-07-15 22:21:38 +03:00
entity.rs fix(solid): keep SOLID fills placed on UTM-scale drawings 2026-07-15 22:55:51 +03:00
group_layer.rs feat(ui): bulk layer on/off, lock, freeze, transparency + Ctrl+A (#236) 2026-07-03 16:06:10 +03:00
layout.rs feat(layout): reopen a drawing in the space it was saved in 2026-07-12 01:01:40 +03:00
mod.rs fix(export): project viewport text into paper space 2026-07-16 10:06:15 +03:00
modify.rs perf(undo): record entity deltas instead of cloning the whole document 2026-07-15 11:11:17 +03:00
mspace.rs feat(nav): turntable orbit, selection/cursor pivot, Shift+MMB rotate (#229) 2026-07-01 21:58:04 +03:00
page_setup.rs fix(io): resolve root named-objects dict robustly on foreign DWGs 2026-07-13 16:28:21 +03:00
paper.rs perf(render): unify model/paper/block spaces on one resident wire path 2026-07-14 20:50:37 +03:00
preview.rs fix(stretch): free crossing-window corners from Ortho, draw filled marquee (#291) 2026-07-10 13:32:32 +03:00
project.rs fix(pick): hit-test lineweight width and thickness walls 2026-07-17 14:58:55 +03:00
selection.rs perf(undo): record entity deltas instead of cloning the whole document 2026-07-15 11:11:17 +03:00