cad-editor/src
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
..
app fix(pick): hit-test lineweight width and thickness walls 2026-07-17 14:58:55 +03:00
entities fix(pick): hit-test lineweight width and thickness walls 2026-07-17 14:58:55 +03:00
io fix(linetype): route placeholder-complex linetypes to the dash path 2026-07-17 02:58:59 +03:00
modules fix(pick): hit-test lineweight width and thickness walls 2026-07-17 14:58:55 +03:00
plugin fix(plugin): upgrade a loaded plugin in place instead of failing on a locked binary 2026-07-15 11:35:10 -07:00
scene fix(pick): hit-test lineweight width and thickness walls 2026-07-17 14:58:55 +03:00
shaders feat(web): render hatches on WebGL2 via a texture-backed renderer 2026-07-14 00:53:51 +03:00
ui fix(overlay): clip dashed snap/track guides to the viewport 2026-07-17 13:52:29 +03:00
cli.rs feat(open): open drawings in the running editor 2026-07-15 15:18:16 +03:00
command.rs feat(commands): step POLYSOLID (select polyline, then width + height) 2026-07-16 14:47:45 +03:00
config.rs feat(ui): ribbon collapse-mode selector + start-page recent controls 2026-07-06 01:06:01 +03:00
lib.rs feat(ui): ribbon collapse-mode selector + start-page recent controls 2026-07-06 01:06:01 +03:00
main.rs feat(open): open drawings in the running editor 2026-07-15 15:18:16 +03:00
par.rs feat(wasm): sequential rayon shim for the web build 2026-06-16 17:11:20 +03:00
patreon.rs feat(supporters): merge hand-maintained supporters, rank by amount 2026-07-08 00:32:12 +03:00
snap.rs fix(snap): Intersection requires a real 3D meeting, not a plan crossing (#335) 2026-07-10 13:05:48 +03:00
sys.rs fix(web): paste clipboard text into the TEXT / MText editors 2026-06-20 17:05:02 +03:00