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 box_pick;
47pub mod pipeline;
48pub mod render;
49pub mod run_trace;
50pub mod runner;
51pub mod scene;
52pub mod pmi_weld_symbol;
53pub mod sheets;
54pub mod sketch;
55pub mod sketch3d;
56pub mod style;
57pub mod thumbnail;
58pub mod visibility;
59pub mod view;
60pub mod widgets;
61
62// The wasm-bindgen browser API (attach/resize/events/camera/pick/scene-feed/
63// settings/world→screen) — the R3 seam the host UI programs against. wasm only;
64// its GPU wrapper needs a canvas/WebGPU context.
65#[cfg(target_arch = "wasm32")]
66pub mod engine;
67