Expand description
Render settings (R14 — the CADmaterials semantics: per-kind material
variants, hover color, flat-shading toggle, user-persisted overrides) and
the selection/hover emphasis state (R17/R24 — name-keyed, fed by the host’s
SelectionFilter). Plain data, shared by the engine core and the wgpu
renderer; JSON in/out at the R3 boundary.
Structs§
- Emphasis
- The emphasis state (selection + hover), name-keyed like
SelectionFilter. Solid-level emphasis cascades to that solid’s faces/edges (theSelectionState._applyToSolidbehavior). - Form
Field - The GENERAL form field — the schema element ONE form engine renders for BOTH
the display-settings dialog AND the schema-driven feature dialogs. Unlike
SettingsField(which uses&'static strbecause the settings schema is compile-time), this owns its strings so it can carry a per-feature schema pulled from the kernel catalogue at run time, and it carries apath(a chain of JSON object keys) so a field can bind to a NESTED value —["transform","position"],["boolean","operation"]— not just a top-level key. The settings form ispath == [key]. - Render
Settings - The viewer’s material palette + display toggles. Defaults are the
CADmaterialsvalues. - Settings
Field - One field of the settings form: the camelCase
apply_json/to_jsonkey, a human label, a UI group, and the widgetkind. The ordered list of these (seesettings_schema) fully describes the form — a UI shell generates a widget per field with no per-field code. - Sketch
Colors - The sketcher’s overlay palette as plain
0xRRGGBBhex — the ONE place the default color literals live.RenderSettingsstores each of these as an editableRgbafield (defaults derived from here via [hex]) and hands the sketch tessellation/overlay builders a liveSketchColorsview viaRenderSettings::sketch_colors, so the sketch renderer reads its colors from the display settings just like faces/edges/vertices do — no scattered constants. - Vertex
Ref - A selected/hovered vertex reference: vertices have no kernel names, so they resolve by owning solid + position.
Enums§
- Emphasis
State - The visual state of one displayed face/edge (hover wins over selected, the
SelectionStateorder). - Face
Color Mode - How base face color is chosen per solid.
- Field
Kind - The kind of one settings field — the closed set of widget shapes the generic form renderer knows how to emit. Plain data, NO egui dependency: the schema lives in the engine, the renderer (brep-app / a later brep-ui) walks it.
Constants§
- RENDER_
QUALITY - The “Render Quality” dropdown levels shown in Settings, each mapped to a
display-tessellation LOD factor. Higher quality = finer mesh = SMALLER factor
(chord tolerance = extent · 1.5e-3 · factor). Order is coarse→fine, the order
the ComboBox lists them.
lod_factorstays the internal representation the tessellation path reads; only the SETTINGS UI/serialization speaks in levels.
Functions§
- parse_
css_ hex - Parse
#rrggbb/#rgb/0xrrggbb(returns None on anything else). - settings_
form_ fields - Lift the compile-time display-settings schema into general
FormFields so the ONEfield_inputengine (which the feature dialogs also use) renders the settings panel too — a single schema-driven dialog engine, not two. - settings_
schema - The Rust-owned settings schema: the ordered list of display-settings fields,
grouped, analogous to the kernel feature schemas. Adding a field here (plus
its
apply_json/to_jsonhandling) makes the whole UI grow a widget for it with ZERO renderer changes.
Type Aliases§
- Rgba
- sRGB color in 0..1 + alpha.