brep_offset/lib.rs
1//! Solid offsets, shells and thickening of the BREP kernel.
2//!
3//! It is one of the implementation crates the kernel is built from. Applications
4//! should depend on [`BREP_kernel`](https://crates.io/crates/BREP_kernel), which
5//! re-exports the public API of every kernel crate at its root (`brep_kernel::…`)
6//! and adds the feature pipeline and the STEP, IGES, Parasolid (import), 3MF,
7//! GLB, STL and OBJ exchange.
8//! Many items here are public only so the other kernel crates can reach them;
9//! those are hidden from the documentation and carry no stability promise beyond
10//! the kernel's own. The kernel crates are released together, at one version.
11//!
12//! It contains:
13//!
14//! - shelling and offset shells, sharp and rounded;
15//! - thickening of sheets and faces, and sheets extruded from curves.
16//!
17//! Kernel crates it requires: [`BREP_RANSAC`](https://crates.io/crates/BREP_RANSAC), [`BREP_geometry`](https://crates.io/crates/BREP_geometry), [`BREP_topology`](https://crates.io/crates/BREP_topology), [`BREP_surface_offset`](https://crates.io/crates/BREP_surface_offset), [`BREP_boolean`](https://crates.io/crates/BREP_boolean), [`BREP_construction`](https://crates.io/crates/BREP_construction), [`BREP_blend`](https://crates.io/crates/BREP_blend). It is required by [`BREP_direct_edit`](https://crates.io/crates/BREP_direct_edit), [`BREP_kernel`](https://crates.io/crates/BREP_kernel).
18//!
19//! ## Building
20//!
21//! The crate builds natively and for `wasm32-unknown-unknown`. The `parallel`
22//! feature runs some per-face loops on rayon; `profile-wall` turns on a diagnostic
23//! wall-time partition. Both are off by default, and `BREP_kernel` forwards them.
24//!
25//! The packaged crate ships the library sources, the README, the licence and the
26//! manifest; it carries no test suite.
27//!
28//! ## License
29//!
30//! The Autodrop3d licence in `LICENSE.md`, shipped in the crate (`license-file` in
31//! the manifest). Source: <https://github.com/mmiscool/next.BREP.io_RUST_BREP_KERNEL>
32// Implementation crate of the kernel: its formerly crate-private items are public for the crates above
33// (documented hidden), and their docs may name private helpers.
34#![allow(rustdoc::private_intra_doc_links)]
35use serde::{Deserialize, Serialize};
36#[allow(unused_imports)]
37use wasm_bindgen::prelude::*;
38#[macro_use]
39extern crate brep_geometry;
40#[allow(unused_imports)]
41#[doc(no_inline)]
42pub use brep_geometry::*;
43#[macro_use]
44extern crate brep_topology;
45#[allow(unused_imports)]
46#[doc(no_inline)]
47pub use brep_topology::*;
48#[macro_use]
49extern crate brep_surface_offset;
50#[allow(unused_imports)]
51#[doc(no_inline)]
52pub use brep_surface_offset::*;
53#[macro_use]
54extern crate brep_boolean;
55#[allow(unused_imports)]
56#[doc(no_inline)]
57pub use brep_boolean::*;
58#[macro_use]
59extern crate brep_construction;
60#[allow(unused_imports)]
61#[doc(no_inline)]
62pub use brep_construction::*;
63#[macro_use]
64extern crate brep_blend;
65#[allow(unused_imports)]
66#[doc(no_inline)]
67pub use brep_blend::*;
68
69#[path = "offset/thicken_faces.rs"]
70#[doc(hidden)]
71pub mod thicken_faces;
72pub use thicken_faces::{extrude_curves_to_sheet, thicken_sheet_faces, THICKEN_FACES_REFUSAL};
73#[path = "offset/shell_rounded.rs"]
74#[doc(hidden)]
75pub mod shell_rounded;
76pub use shell_rounded::{offset_shell_rounded, SHELL_ROUNDED_REFUSAL};
77#[path = "offset/thicken.rs"]
78#[doc(hidden)]
79pub mod thicken;
80pub use thicken::{thicken_face_sheet, thicken_trimmed_sheet};
81#[path = "offset/offset_shell.rs"]
82#[doc(hidden)]
83pub mod offset_shell;
84pub use offset_shell::{
85 offset_shell, offset_shell_by_boolean, offset_shell_closed, offset_shell_with_diagnostics, offset_shell_with_options, offset_solid, OffsetCorners, ShellOptions,
86 OffsetFaceRole, OffsetShellFaceImageRecord, OffsetShellResultRecord,
87};
88pub use offset_shell::{is_offset_shell_no_retained_face, is_offset_shell_open_curved_rim};
89
90/// Hash of this crate's source (`build.rs`), one part of the kernel's source stamp.
91#[doc(hidden)]
92pub const SOURCE_HASH: Option<&str> = option_env!("BREP_KERNEL_SOURCE_HASH");