fix: report every fillet refusal of a radius too big as too large (#477)
`fit: reduce` acts only on refusals marked too large. Three kinds weren't: the corner build's contact lines leaving their faces or running backwards, and a curved chain's contact reaching past the end of the seam it trims. Two more were hidden: a later edge's too-large refusal lost to an earlier edge's other error, and the corner build's lost to the local blend's in `fillet`. The messages are unchanged. Refs #293 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ccc36dc1f9
commit
aa156f4a9f
5 files changed
+65
-7
No files matched your search
@@ -20,7 +20,7 @@ use std::collections::{HashMap, HashSet};
|
||||
use solidcraft_geom::Vec3;
|
||||
use truck_modeling::{self as mt, builder};
|
||||
|
||||
use crate::blend::{plane_normal, unsupported, vtx};
|
||||
use crate::blend::{plane_normal, too_large, unsupported, vtx};
|
||||
use crate::body::{Body, Solid, p3, v3};
|
||||
use crate::{KernelError, Result, guard};
|
||||
|
||||
@@ -331,7 +331,7 @@ fn build(cur: &Body, sel_pts: &[(Vec3, f64)], round: bool) -> Result<Body> {
|
||||
let check_extension = |q: Vec3, fi: usize| -> Result<Vec3> {
|
||||
let face = faces.get(fi).ok_or_else(|| KernelError::Failed("face".into()))?;
|
||||
if !crate::blend::extension_fits(face, v, q, size * 1e-7) {
|
||||
return Err(unsupported("a fillet larger than the faces next to it"));
|
||||
return Err(too_large("a fillet larger than the faces next to it"));
|
||||
}
|
||||
Ok(q)
|
||||
};
|
||||
@@ -465,7 +465,7 @@ fn build(cur: &Body, sel_pts: &[(Vec3, f64)], round: bool) -> Result<Body> {
|
||||
let (pa, pb) = (vtx(&a), vtx(&b));
|
||||
let orig = vtx(e.absolute_back()) - vtx(e.absolute_front());
|
||||
if (pb - pa).dot(orig) <= size * 1e-9 * orig.len() {
|
||||
return Err(unsupported("a fillet larger than the faces next to it"));
|
||||
return Err(too_large("a fillet larger than the faces next to it"));
|
||||
}
|
||||
let x = builder::line(&a, &b);
|
||||
lines.insert((e.id(), f), x.clone());
|
||||
|
||||
Reference in new issue
Block a user