Skip to main content

brep_direct_edit/
lib.rs

1//! Direct editing of B-rep faces: move, rotate, offset, draft, delete and refit.
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//! - moving, rotating and offsetting faces, each checked against the soundness floor (with `*_unchecked` siblings);
15//! - drafting faces, deleting faces and healing the gap, and refitting the neighbours;
16//! - the typed reasons a face edit is refused.
17//!
18//! 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), [`BREP_offset`](https://crates.io/crates/BREP_offset). It is required by [`BREP_kernel`](https://crates.io/crates/BREP_kernel).
19//!
20//! ## Building
21//!
22//! The crate builds natively and for `wasm32-unknown-unknown`. The `parallel`
23//! feature runs some per-face loops on rayon; `profile-wall` turns on a diagnostic
24//! wall-time partition. Both are off by default, and `BREP_kernel` forwards them.
25//!
26//! The packaged crate ships the library sources, the README, the licence and the
27//! manifest; it carries no test suite.
28//!
29//! ## License
30//!
31//! The Autodrop3d licence in `LICENSE.md`, shipped in the crate (`license-file` in
32//! the manifest). Source: <https://github.com/mmiscool/next.BREP.io_RUST_BREP_KERNEL>
33// Implementation crate of the kernel: its formerly crate-private items are public for the crates above
34// (documented hidden), and their docs may name private helpers.
35#![allow(rustdoc::private_intra_doc_links)]
36use serde::{Deserialize, Serialize};
37#[allow(unused_imports)]
38use wasm_bindgen::prelude::*;
39#[macro_use]
40extern crate brep_geometry;
41#[allow(unused_imports)]
42#[doc(no_inline)]
43pub use brep_geometry::*;
44#[macro_use]
45extern crate brep_topology;
46#[allow(unused_imports)]
47#[doc(no_inline)]
48pub use brep_topology::*;
49#[macro_use]
50extern crate brep_surface_offset;
51#[allow(unused_imports)]
52#[doc(no_inline)]
53pub use brep_surface_offset::*;
54#[macro_use]
55extern crate brep_boolean;
56#[allow(unused_imports)]
57#[doc(no_inline)]
58pub use brep_boolean::*;
59#[macro_use]
60extern crate brep_construction;
61#[allow(unused_imports)]
62#[doc(no_inline)]
63pub use brep_construction::*;
64#[macro_use]
65extern crate brep_blend;
66#[allow(unused_imports)]
67#[doc(no_inline)]
68pub use brep_blend::*;
69#[macro_use]
70extern crate brep_offset;
71#[allow(unused_imports)]
72#[doc(no_inline)]
73pub use brep_offset::*;
74
75#[path = "edit/direct_edit.rs"]
76#[doc(hidden)]
77pub mod direct_edit;
78pub use direct_edit::{
79    delete_face_and_heal, delete_faces_and_heal, draft_faces, draft_faces_parted, draft_faces_unchecked, move_faces, move_faces_unchecked,
80    offset_freeform_face, offset_freeform_face_unchecked,
81    offset_revolution_face, offset_revolution_face_unchecked, offset_ruled_face, offset_ruled_face_unchecked, offset_sphere_face,
82    offset_sphere_face_unchecked, offset_torus_face, offset_torus_face_unchecked,
83    rebuild_displaced_blends, with_blend_rebuild_decline,
84    recut_moved_planes, recut_moved_planes_rigid, recut_moved_planes_unchecked, reblend_lost_fillets, resolve_face_by_point, rotate_faces, rotate_faces_unchecked,
85    route_reading, RouteReading,
86};
87pub use direct_edit::{face_refusal_slugs, face_transform_reason, FaceTransformReason};
88pub use direct_edit::{
89    refit_faces_as_one, refit_refusal_phrases, RefitCarrier, RefitReport, RefitSurfaceKind,
90};
91
92/// Hash of this crate's source (`build.rs`), one part of the kernel's source stamp.
93#[doc(hidden)]
94pub const SOURCE_HASH: Option<&str> = option_env!("BREP_KERNEL_SOURCE_HASH");