Expand description
Picking in Rust (R23/R24), replacing the retired raycaster +
selectionMethods._pickAtEvent: returns KERNEL NAMES with the candidate
priority order VERTEX > EDGE > FACE > … > SOLID, CSS-pixel thresholds for
lines/points (the earlier picker’s worldPerPixel * 6 is exactly 6 CSS px), a
double-sided face toggle, and a ranked candidate list feeding the host’s
multi-candidate popup. Selection-filter filtering stays in the UI layer where the
filter state lives — the engine reports everything under the cursor.
CPU ray/screen-space testing over the scene’s display buffers: exact, deterministic, identical on native and wasm, and cheap at CAD face counts (per-face triangle ranges give a bbox reject before any triangle test).
Structs§
Enums§
Constants§
- EDGE_
PICK_ PX - Pick thresholds in CSS pixels (ported from
selectionMethods). - VERTEX_
PICK_ PX
Functions§
- candidates_
to_ json - Serialize candidates for the R3 JSON boundary.
- pick
- Rank candidates under CSS-pixel
(x, y). Ordered by the priority chain then depth; a SOLID entry per hit solid is appended at the end (the earlier “extras” behavior). - pick_
filtered - The nearest hit of an ALLOWED KIND under CSS-pixel
(x, y), using the same ranking aspick.filteris a set of kind strings ("SOLID","FACE","EDGE","VERTEX", case-insensitive); an empty filter means any kind. This is the type-constrained pick the reference-selection widget uses so atargetSolidfield resolves the SOLID under the cursor (candidates rank faces first, then the trailing SOLID entry —findwalks that order and returns the first candidate whose kind is allowed). Returns the full candidate (name + owning solid + position) orNoneon a miss.