Skip to main content

Module selection

Module selection 

Source
Expand description

Selection panel — the selection filter (which entity kinds a viewport click may pick), rendered as a single horizontal row in the shell’s bottom STATUS BAR (not a side-panel section). Follows the panel pattern: a small state struct + a show_status_bar(&mut self, ui, state) the bottom bar calls once per frame in modeling mode; EngineState stays the single brain (it owns the filter + the selection), borrowed in.

  • Filter — a leading “All” tristate CHECKBOX followed by a real CHECKBOX per kind (COMPONENT / SOLID / FACE / EDGE / VERTEX / PLANE; COMPONENT = promote a pick on assembly-component geometry to the whole component; PLANE = the construction datum/plane cards, pickable like any face). The engine honors the filter in select_top_at (via the planes-aware pick_top_at with the enabled kinds), so a plain click grabs only an allowed kind — a FACE-only filter selects a face, a SOLID-only filter the owning solid, a PLANE-only filter the construction plane under the cursor. Defaults to ALL kinds enabled (everything under the cursor is pickable, highest-priority kind wins). Reference-selection mode temporarily constrains it to the active field’s allowed kinds — while that picker is active the row is LOCKED (greyed + non-interactive) so a click can’t overwrite the constraint. The model state is the engine’s selection_filter; this panel just reads/writes it.

The quick actions on the current selection (Clear / Hide / Edit-owning-feature

  • the feature-from-selection actions) live in the dedicated crate::panels::context_bar (the engine-native successor to the old app’s floating selection action bar).

The panel owns only the per-frame hits map (widget screen rects) the headed verifier reads to drive real clicks, exactly like the toolbar/history panels.

Structs§

SelectionPanel
The selection panel’s own state: the per-frame map of egui widget screen rects, published to JS for the headed verifier to drive real clicks. Rebuilt each frame (there is no DOM — egui is drawn on the canvas).

Statics§

HIT_KEYS
The hit keys this panel publishes (see automation::hit_keys).