and_with_history / or_with_history return, with the solid, the operand face each result face is a region of (and whether it is that face untouched) and, for each result edge, the operand edge it is (a piece of) or the pair of operand faces whose intersection made it. Faces and edges are recorded where they are created (face division, intersection edges, split edges, edges rebuilt on a moved vertex), resolved to operand terms at creation, so the passes folding in extra shells compose without bookkeeping. and / or wrap the same pass and drop the history; a missing record never fails them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01J53sR6gEaVt56soFDpTck8
44 lines
1.3 KiB
Rust
44 lines
1.3 KiB
Rust
//! Crate for operationg shapes. Provides boolean operations to Solid, and shape healing for importing shapes from other CAD systems.
|
|
|
|
// SolveCraft: warnings are not errors in the vendored copy (newer compilers flag more).
|
|
#![allow(dead_code)]
|
|
#![warn(clippy::all, rust_2018_idioms)]
|
|
#![warn(
|
|
missing_docs,
|
|
missing_debug_implementations,
|
|
trivial_casts,
|
|
trivial_numeric_casts,
|
|
unsafe_code,
|
|
unstable_features,
|
|
unused_import_braces,
|
|
unused_qualifications
|
|
)]
|
|
|
|
/// SolveCraft: report where an operation gives up (set `SHAPEOPS_TRACE`).
|
|
macro_rules! tr {
|
|
($e:expr, $tag:expr) => {
|
|
match $e {
|
|
Some(v) => v,
|
|
None => {
|
|
if std::env::var_os("SHAPEOPS_TRACE").is_some() {
|
|
eprintln!("shapeops: gave up at {} ({}:{})", $tag, file!(), line!());
|
|
}
|
|
return None;
|
|
}
|
|
}
|
|
};
|
|
}
|
|
pub(crate) use tr;
|
|
|
|
mod healing;
|
|
pub use healing::{RobustSplitClosedEdgesAndFaces, SplitClosedEdgesAndFaces};
|
|
mod transversal;
|
|
pub use transversal::{
|
|
and, and_with_history, or, or_with_history, EdgeOrigin, FaceIndex, FaceOrigin, History, ShapeOpsCurve,
|
|
ShapeOpsSurface,
|
|
};
|
|
// SolveCraft: exercised by kernel regressions in the workspace CI.
|
|
#[doc(hidden)]
|
|
pub use transversal::IntersectionCurveWithParameters;
|
|
mod alternative;
|