Joining ribs flush with a lid's window left a zero-thickness slit far from the rib (the planar fallback glued back only one of the faces its pieces shared) and displaced the tool on the other joins. Gluing now joins every shared face pair, coincident-face separation checks there is material behind a pushed face for every join, and any join or cut that needed a retry must be closed, keep volume monotonic and leave the part unchanged outside the tool's box, or it is refused with an error. Feature command replies carry the feature's warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
392fae1af4
commit
29258767ce
15 files changed
+1322
-93
No files matched your search
@@ -286,11 +286,6 @@ thread_local! {
|
||||
static BORES: std::cell::Cell<bool> = const { std::cell::Cell::new(false) };
|
||||
}
|
||||
|
||||
/// Is a union with a narrowed bore running (see [`crate::coplanar::bore_union`])?
|
||||
pub(crate) fn narrowing_bores() -> bool {
|
||||
BORES.with(|c| c.get())
|
||||
}
|
||||
|
||||
/// Boolean of two bodies. The result may be empty (`Ok(None)`) for a cut that removes
|
||||
/// everything or an intersection of disjoint bodies. Results are checked against volume bounds
|
||||
/// and retried with shifted copies and other tolerances when they fail or look wrong.
|
||||
@@ -340,6 +335,18 @@ pub fn boolean(a: &Body, b: &Body, op: BoolOp) -> Result<Option<Body>> {
|
||||
BoolOp::Union => r = r.and_then(|result| result.map(|body| body.with_preserved_union_planar_sources(a, b)).transpose()),
|
||||
BoolOp::Intersect => {}
|
||||
}
|
||||
// A retry's result is held to what the operation can do at all; one that fails is refused
|
||||
// rather than returned wrong (issue #616).
|
||||
if (!diagnostics.events.is_empty() || diagnostics.truncated)
|
||||
&& let Ok(result) = &r
|
||||
&& let Err(e) = crate::boolean_guard::check_retry(a, b, op, result.as_ref())
|
||||
{
|
||||
let tried = diagnostics.warning().unwrap_or_default();
|
||||
r = Err(match e {
|
||||
KernelError::Failed(m) => KernelError::Failed(format!("{m} ({})", tried.trim_start_matches("Boolean retry: "))),
|
||||
other => other,
|
||||
});
|
||||
}
|
||||
if r.is_ok() {
|
||||
merge(diagnostics);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user