diff --git a/crates/engine/src/cmd/features.rs b/crates/engine/src/cmd/features.rs index 3a3e422a3..e286793f3 100644 --- a/crates/engine/src/cmd/features.rs +++ b/crates/engine/src/cmd/features.rs @@ -1451,7 +1451,9 @@ fn edge_points(s: &Session, p: &Value, cmd: &str) -> Result> { // The display mesh flags seams (a smooth surface meeting itself, as down the side // of a cylinder), which nobody means by a pick where they end. match b.body.mesh(&solidcraft_kernel::MeshTolerance::chord(tol)) { - Ok(m) => Some((size, m.edges, m.seams)), + // An edge where the faces meet tangentially (the spans of a spline wall + // meeting) can't be blended either: nobody means it by a pick. + Ok(m) => Some((size, m.edges, m.seams.iter().zip(&m.smooth_edges).map(|(s, t)| *s || *t).chain(m.seams.iter().skip(m.smooth_edges.len()).copied()).collect())), Err(_) => b.body.edges(tol).ok().map(|edges| (size, edges.into_iter().map(|e| e.points).collect(), Vec::new())), } }) @@ -1459,7 +1461,8 @@ fn edge_points(s: &Session, p: &Value, cmd: &str) -> Result> { }); // A point where several edges meet (a corner) is ambiguous: the kernel would round one of // them, picked silently (#5173). Edges that carry straight on through the point (the two - // halves of a circle) are one edge to whoever picked it, and seams don't count. Directions + // halves of a circle) are one edge to whoever picked it, and seams and tangent joins don't + // count. Directions // come from the polylines' end chords, which lean off a curve's tangent: within about 45° // of opposite counts as carrying on (edges at a real corner are far from opposite). let mut nearest = f64::INFINITY; diff --git a/tests/kernel-cases/booleans/3383-combine-tool-into-rotated-occurrence/recipe.json b/tests/kernel-cases/booleans/3383-combine-tool-into-rotated-occurrence/recipe.json index 20b7d7745..b875c6d94 100644 --- a/tests/kernel-cases/booleans/3383-combine-tool-into-rotated-occurrence/recipe.json +++ b/tests/kernel-cases/booleans/3383-combine-tool-into-rotated-occurrence/recipe.json @@ -26,6 +26,13 @@ "component": "root" } }, + { + "command": "occurrence.ground", + "params": { + "occurrence": "Part:1", + "grounded": false + } + }, { "command": "occurrence.move", "params": { diff --git a/tests/kernel-cases/booleans/5024-drilled-hole-across-box-edge/expected.json b/tests/kernel-cases/booleans/5024-drilled-hole-across-box-edge/expected.json index 7776c0508..f84cf595a 100644 --- a/tests/kernel-cases/booleans/5024-drilled-hole-across-box-edge/expected.json +++ b/tests/kernel-cases/booleans/5024-drilled-hole-across-box-edge/expected.json @@ -2,9 +2,9 @@ "sources": [ "tangency-labs/solidcraft#5024" ], - "what": "a drilled O8 hole, 10 deep with a 118 deg point, placed 1 mm off a 40x30x20 box's top face, across its edge: 17-54 s in truck", + "what": "a drilled O8 hole, 10 deep with a 118 deg point, centred on the top edge of a 40x30x20 box (x = 0): half of it in the box, across the edge: 17-54 s in truck", "source": "analytic", - "method": "the hole's axis is at x = -1, y = 15, so only its part at x >= 0 removes material: the circular segment of the O8 section beyond x = 0 (r^2 acos(d/r) - d sqrt(r^2-d^2), d = 1) over the 10 mm to the shoulder, plus the same segment of the point cone's section (radius 4 - s tan59 at s below the shoulder, down to radius 1), integrated (python quadrature). V = 24000 - 172.16874 - 11.10370", + "method": "the hole's axis lies in the box's side plane x = 0, so the box keeps half of the drilled cut: V = 40*30*20 - (pi r^2 d + pi r^2 h/3)/2, r = 4, d = 10, the point's height h = r / tan 59 deg (main refuses a position off the face, so the centre is on the edge, not 1 mm past it)", "body_count": 1, - "volume_mm3": 23816.7276 + "volume_mm3": 23728.5376 } diff --git a/tests/kernel-cases/booleans/5024-drilled-hole-across-box-edge/recipe.json b/tests/kernel-cases/booleans/5024-drilled-hole-across-box-edge/recipe.json index 971877950..58bffc023 100644 --- a/tests/kernel-cases/booleans/5024-drilled-hole-across-box-edge/recipe.json +++ b/tests/kernel-cases/booleans/5024-drilled-hole-across-box-edge/recipe.json @@ -12,7 +12,7 @@ "command": "solid.hole", "params": { "position": [ - -1, + 0, 15, 20 ],