Skip to main content

brep_render/
lib.rs

1//! Rendering, picking, and sketch editing for native and WebAssembly hosts.
2//!
3//! [`scene`] stores named geometry, [`pipeline`] evaluates feature histories,
4//! and [`render`] draws into a host-provided texture view. Cameras, picking,
5//! sketch state, and display settings are shared across presentation targets.
6//!
7//! [`engine_state::EngineState`] is the viewer state every shell wraps (scene,
8//! camera, selection, picking, the editable feature history, sketch mode and
9//! widget overlays); [`runner`] is the submit/poll boundary that runs histories
10//! and mesh imports; [`pick`] resolves screen points to kernel names. The
11//! kernel crate is re-exported as `brep_render::brep_kernel`. On `wasm32` the
12//! `engine` module provides the wasm-bindgen canvas API. See the README for the
13//! layering and the headless and desktop binaries.
14
15// `RenderSettings::to_json` is one `json!` literal over every setting, and
16// `json_internal!` recurses once per key — the default 128 stops short of the
17// full settings object.
18#![recursion_limit = "512"]
19
20// Re-export the kernel crate so downstream shells (e.g. `brep-app`'s wasm
21// `WorkerRunner`) can name the run-boundary types the `runner::HistoryRunner`
22// trait exposes (`brep_kernel::HistoryRequest`, …) WITHOUT taking their own
23// direct path dependency — which would have to mirror this crate's kernel
24// feature split (`default-features = false` / native `parallel`) or feature
25// unification bites. One canonical instance, reached as `brep_render::brep_kernel`.
26pub use brep_kernel;
27
28pub mod assembly_status;
29pub mod cam_sim;
30pub mod camera;
31pub mod color;
32pub mod constraint_overlays;
33pub mod controls;
34pub mod draft_analysis;
35pub mod engine_state;
36pub mod feature_dimensions;
37pub mod features;
38pub mod face_transform_help;
39pub mod formatting;
40mod geometry2d;
41pub mod geometry3d;
42pub mod history;
43mod json_support;
44pub mod metadata;
45pub mod pick;
46pub mod pipeline;
47pub mod render;
48pub mod run_trace;
49pub mod runner;
50pub mod scene;
51pub mod pmi_weld_symbol;
52pub mod sheets;
53pub mod sketch;
54pub mod sketch3d;
55pub mod style;
56pub mod thumbnail;
57pub mod visibility;
58pub mod view;
59pub mod widgets;
60
61// The wasm-bindgen browser API (attach/resize/events/camera/pick/scene-feed/
62// settings/world→screen) — the R3 seam the host UI programs against. wasm only;
63// its GPU wrapper needs a canvas/WebGPU context.
64#[cfg(target_arch = "wasm32")]
65pub mod engine;
66