Skip to main content

brep/
lib.rs

1//! # BREP
2//!
3//! Umbrella crate for the BREP CAD kernel family. It re-exports the geometry
4//! kernel unconditionally and the higher layers behind feature flags, so a
5//! single `BREP` dependency scales from headless geometry to the full app:
6//!
7//! | Module      | Feature    | Backing crate  |
8//! |-------------|------------|----------------|
9//! | [`kernel`]  | *(always)* | `BREP_kernel`  |
10//! | `gizmos`  | `gizmos`   | `BREP_gizmos`  |
11//! | `render`  | `render`   | `BREP_render`  |
12//! | `app`     | `app`      | `BREP_app`     |
13//! | `reconstruction` | `reconstruction` | `BREP_reconstruction` |
14//!
15//! `full` is an alias for `app` (which also enables `render` and `gizmos`); it
16//! does not enable `reconstruction` or `parallel`. `parallel` forwards to the
17//! kernel's rayon parallelism (tessellation and STEP import).
18//!
19//! ```toml
20//! BREP = "0.36"                                     # kernel only
21//! BREP = { version = "0.36", features = ["render"] } # + the wgpu render engine
22//! BREP = { version = "0.36", features = ["full"] }   # the eframe app, render and gizmos
23//! ```
24//!
25//! ```no_run
26//! use brep::kernel; // always present
27//! # #[cfg(feature = "render")]
28//! use brep::render; // with `features = ["render"]`
29//! ```
30
31/// The BREP geometry kernel — always available.
32pub use brep_kernel as kernel;
33
34/// In-scene gizmos and overlay widgets. Enable the `gizmos` feature.
35#[cfg(feature = "gizmos")]
36pub use brep_gizmos as gizmos;
37
38/// The windowing-agnostic wgpu render/pick engine. Enable the `render` feature.
39#[cfg(feature = "render")]
40pub use brep_render as render;
41
42/// The eframe (egui + wgpu) CAD application. Enable the `app` feature.
43#[cfg(feature = "app")]
44pub use brep_app as app;
45
46/// RANSAC recognition-to-kernel reconstruction. Enable `reconstruction`.
47#[cfg(feature = "reconstruction")]
48pub use brep_reconstruction as reconstruction;