On a large thin sheet the probes around the fixed point stepped clean through the sheet (twice the mesh tolerance of a 465 mm part is more than its 0.8 mm thickness), so a point exactly on the face touched no material and the fold was refused. The probes now also step a quarter of the thickness. Co-authored-by: jonaswre <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2 files changed
+27
-2
No files matched your search
@@ -345,9 +345,12 @@ fn on_sheet_material(st: &ModelState, i: usize, p: Vec3) -> bool {
|
||||
if mesh.triangles.is_empty() {
|
||||
return true;
|
||||
}
|
||||
// Twice the display mesh's chord tolerance (see `ModelBody::mesh`).
|
||||
// Twice the display mesh's chord tolerance (see `ModelBody::mesh`), and a quarter of the
|
||||
// thickness: on a large thin sheet the first steps from a point on its face clean through
|
||||
// it, so a point on the face would touch nothing (#685).
|
||||
let step = 2.0 * (mb.body.size() * 1e-3).max(1e-3);
|
||||
let offsets = [-step, 0.0, step];
|
||||
let thin = st.sheets.get(i).map_or(step, |sh| (sh.t * 0.25).min(step));
|
||||
let offsets = [-step, -thin, 0.0, thin, step];
|
||||
offsets.iter().any(|&dx| offsets.iter().any(|&dy| offsets.iter().any(|&dz| mesh.contains(p + Vec3::new(dx, dy, dz)))))
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user