A through-all hole's tool is twice the largest body long, and the boolean's tolerances followed that length: a 6 mm hole through a 920 mm part was traced at nearly 1 mm, wider than the hole, and the cut came out empty or failed. When every other strategy has failed, the boolean is now asked again (unshifted, then once shifted) at tolerances scaled to where the bodies meet: the overlap of their boxes and the thinner operand's thickness. Its result is checked as the others are and held to the retry guard. It runs last, so whatever an earlier strategy answered is kept as it was, and only for single-shell operands (bodies in several pieces are retried a piece at a time, each with this pass of its own). The sampled shortcut also gave up on a slender tool lying across its box (a long hole drilled at an angle fills little of it): it now samples past the first 2000 points until enough land inside, so a tool that misses a body leaves that body as it is. Bodies that had enough samples in the first 2000 are sampled exactly as before. Baseline: the 90 actions that newly pass, rechecked one by one with the final build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
17db109c5d
commit
78d9aa0153
3 files changed
+169
-89
No files matched your search
@@ -1051,6 +1051,18 @@ fn a_through_hole_into_a_shelled_box_rim() {
|
||||
);
|
||||
}
|
||||
|
||||
/// #559: a 6 mm hole drilled at an angle through a 920 mm prism, its through-all tool nearly
|
||||
/// 1.9 m long beside a thin bar it misses. The bar's cut came out empty: the tool filled too
|
||||
/// little of its own box for the sampled shortcut, and the boolean's tolerances (from the
|
||||
/// tool's length) were wider than the hole.
|
||||
#[test]
|
||||
fn an_oblique_through_hole_beside_a_thin_bar() {
|
||||
reproduces(
|
||||
Some("examples/regressions/oblique_cut_of_cylinder.json"),
|
||||
json!([{"command": "solid.hole", "params": {"diameter": 6.0, "position": [296.66666666666663, -458.66666666666663, 848.7633333333333]}}]),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_hole_through_a_sheet_metal_base() {
|
||||
let mut c: Vec<Value> = rectangle(json!("XY"), [0., 0.], [60., 40.]).into();
|
||||
|
||||
Reference in new issue
Block a user