Skip to main content

Module panels

Module panels 

Source
Expand description

The left-control-panel modules — one file per panel, each following ONE pattern so parallel agents can add a new panel with minimal conflict:

  • a small state struct (its own editing buffers only);
  • a show(&mut self, ui: &mut egui::Ui, state: &mut EngineState, …) method the shell calls — EngineState (brep-render) stays the single brain, borrowed in; pass the ModelStore where a panel persists.

Adding a panel = add panels/<name>.rs (state struct + show), pub mod <name>; here, one field on BrepApp, and one self.<name>.show(…) call in the shell. See brep-app/README.md → “Adding a panel”.

Modules§

action_rail
action_rail — the SHARED right-side, single-column, uniform-width action toolbar. It is the ONE renderer behind BOTH the modeling context bar (super::context_bar) and the in-sketch context bar (super::sketch), so the two look and behave identically: change the layout here and both update. It draws INTO a caller-owned ui (the caller owns the top-right Area/Frame and any stacking), measures every caption up front to size the column to the WIDEST button, and stretches every button to that shared width (100%).
assembly_components
Assembly COMPONENT STATE — the engine’s component projection as owned rows.
assembly_constraints
Assembly Constraints panel — the schema-driven constraint collection widget (build-spec §8.3), driven EXACTLY like the feature history panel: a TREE of constraints, and activating one replaces the whole panel with that constraint’s dialog, drawn by the SHARED crate::form_view. The kernel’s constraint_schema_catalogue supplies the ten schemas and brep_render::features::form_fields_from_schema maps each into the shared form fields; this panel supplies the engine side and owns nothing about layout.
auto_constraints
Auto Constraints window — the Assembly workbench’s toolbar button.
bom
The assembly BOM panel — the parts list on the shared crate::column_tree widget.
bom_columns
The BOM’s COLUMN CONFIGURATION — the catalogue of known fields, the settings-textarea format, and the translation between that text and the generic crate::column_tree widget’s ColumnSpec / ColumnLayout.
bug_report
In-app Submit Bug report.
component_actions
The shared COMPONENT action set (assemblies build-spec §8.5) — the ONE entry point for per-component interactions, consumed by the selection context bar (this lane) and, through the same enum, by the assembly structure tree’s per-node action hooks (lane F seam: the tree calls run_component_action with the node’s owning ACOMP feature id — actions always ROUTE TO the owning feature, one truth, one undo lane).
context_bar
Context action toolbar — the selection-driven action bar (the engine- native successor to the old app’s floating selection action bar, SelectionFilter._syncSelectionActions + _getHistoryContextActionSpecs).
dock
The dockable / tabbed side-panel layout — an egui_tiles tree that hosts every side-panel section AND the 3D viewport as tiles the user can split, tab, resize, and drag-rearrange (IDE-style), with the layout persisted.
document_tabs
The DOCUMENT TABS seam — the outcome type the dock reports model-tab clicks through, plus the verifier global describing the open models.
expressions
Expressions / parameters panel — the variable sheet that drives feature params. The engine-owned history document carries an expressions source string (a small name = expr; DSL) plus a configurator object; the pipeline evaluates it when running features, so a numeric feature field may be the expression string "boxW" — resolved against the variables defined here.
file
File dialog — a reusable modal for model-document management: New / Open / Save / Save As of the MODEL, driven from the toolbar. Mirrors the shape of crate::palette::Palette: the caller owns ONE FileDialog, calls FileDialog::dispatch when a toolbar file button is clicked (which either acts immediately or opens the modal in a mode), and calls FileDialog::show every frame to draw the (possibly open) modal.
file_explorer
Reusable, embeddable file explorer for the application’s persistent store. It owns only transient browsing state; callers decide what activating a file means (open a document, choose a Save-As name, or insert an ACOMP part).
history
History panel — a feature tree that switches to a full-panel form.
info
The Info window — the licences, and what this build is running on.
info_windows
Pinned per-entity inspectors with editable metadata and read-only measurements.
interference
Interference results window (assemblies build-spec §9) — the floating window behind the Assembly workbench’s toolbar button.
mode_bar
mode_bar — the special-mode EXIT controls, always pinned to the TOP-RIGHT corner of the screen. Every special mode (reference-selection, sketch mode, and any future mode) surfaces its Finish / Cancel here so the exit is in a single, predictable place — the pattern the user asked for.
part_properties
The PART PROPERTIES dialog — the open document’s own BOM attributes, on the toolbar.
parts_library
The PARTS-LIBRARY document lane — the one place the app rewrites a parts-library entry from a part document, and the one place it writes a part document back to the file it came from.
pmi
The PMI panel — the view TREE on the shared crate::column_tree widget: one row per PMI view, its annotations as children, and — when an annotation is open — that annotation’s dialog through the SHARED crate::form_view (the same function the feature and constraint dialogs use; the schema comes from the kernel’s pmi_schema_catalogue).
scene
Scene panel — the engine-native Scene tree (“Scene Manager”), the second sidebar tree in the design reference. Built on the SAME reusable tree node helper (connector lines + [+]/[-] collapse boxes) the history panel uses, so the two trees read as one system.
selection
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.
settings
Display-settings panel — the schema-driven settings form. Drawn as a FLOATING window (movable + resizable egui::Window, toggled from the toolbar gear ⚙ button), mirroring the Properties window: a pub open flag the toolbar binds + a ctx-level show(&mut self, ctx, state, store) the shell calls after the panels. The panel OWNS only its transient UI state (which nodes are open); EngineState stays the single brain, borrowed in.
sketch
Sketch panel (S1) — the engine-native sketcher’s mode surfaces.
spline_anchors
The spline ANCHOR editor — the app side of brep_render’s spline_edit.
step_parts
step.parts online model library browser (Assembly workbench).
stl_import
An isolated, disposable reconstruction session. Accept transfers the exact previewed STEP into the destination document as one ordinary import feature.
toasts
Transient toast notifications — a small overlay for engine notices (e.g. a sketch solve that failed after an edit). The engine only QUEUES notices (brep_render::engine_state::EngineState::take_notices); this drains them and shows each as an auto-expiring card anchored bottom-center. Time comes from egui (ctx.input().time) — never std::time::Instant, which aborts on wasm.
toolbar
Toolbar — a top Panel strip of primary actions above the viewport: Undo / Redo, a Wireframe toggle, and Zoom-to-fit, plus the File-actions SEAM (owned by the concurrent file panel). Standard views live on the ViewCube navigation gizmo, not here.
toolbar_button
The SINGLE source of truth for toolbar-button styling — shared by the main toolbar (toolbar.rs), the context bar (context_bar.rs), and the 2D sketcher toolbar (sketch.rs). Every toolbar button goes through here, so sizing/style changes land in ONE place. The human label is in the hover TOOLTIP, and every button is SQUARE (min-width == height).
tree
A reusable, custom-painted TREE-NODE widget — the shared building block for the engine-native side panels (the history feature tree here; the Scene tree and others reuse it verbatim). egui’s default CollapsingHeader draws a disclosure TRIANGLE and no connector rules; the design reference is a classic file-tree with [+]/[-] collapse boxes + connector lines, so this module paints those itself.
update_components
UPDATE COMPONENTS — the assemblies build-spec §8.6 flow: compare each parts-library entry’s sourceSignature against the ModelStore’s CURRENT content for its sourceKey (with document_signature, the ONE signature fn), badge the outdated count on the Assembly Constraints header and the per-node rows of the structure tree, and refresh every outdated entry through the ESTABLISHED document-transport lane (refresh_library_entry): rewrite the embedded document + a fresh signature + a BLANKED snapshot per entry, then ONE reload — the kernel self-heals every instance from the refreshed documents, re-solves, and the main-side sync captures the healed snapshots back into the document.
wire_harness
The Wire Harness panel — the connection list on the shared crate::column_tree widget (its second consumer, as the widget’s own doc anticipated).
workbench_toolbar
Workbench actions toolbar — a second top strip drawn UNDER the primary toolbar, listing the ACTIVE WORKBENCH’s creatable features as one square icon button each, and (in a workbench that shows the Constraints panel — Assembly, and All as its union) a second group with one button per assembly-constraint type.