test: failing regression test for #544 (ignored until fixed): Blind Ø2 hole into a long D-profile bar is refused ("exact fallback … takes planar faces only") although it stays clear of the round face (#551)
Adds an ignored regression test for #544; it runs once #544 is fixed.
This commit is contained in:
1 parent
6441621b8b
commit
7a8754bef7
2 files changed
+33
No files matched your search
@@ -88,3 +88,22 @@ fn struts_ending_on_a_bore_wall_join_without_a_panic() {
|
||||
result.unwrap();
|
||||
assert_eq!(s.model.state().bodies.len(), 1);
|
||||
}
|
||||
|
||||
/// A blind Ø2 hole into the flat back of a long D-profile bar ends 2 mm short of the round front,
|
||||
/// yet the cut was refused (#544). It removes π · 1² · 10 mm³ (within 5 %: the measure tessellates
|
||||
/// the small bore) and adds the bore's wall and floor to the bar's six faces.
|
||||
#[test]
|
||||
#[ignore = "fails until #544 is fixed"]
|
||||
fn blind_hole_into_a_long_d_profile_bar_stops_short_of_the_round_front() {
|
||||
let script: Value = serde_json::from_str(include_str!("../../../examples/regressions/blind_hole_in_long_d_profile.json")).unwrap();
|
||||
let steps = script.get("commands").and_then(Value::as_array).unwrap();
|
||||
let mut s = Session::default();
|
||||
s.run_script(&Value::Array(steps[..5].to_vec())).unwrap();
|
||||
let bar = volume(&s, "Slat");
|
||||
s.run_script(&Value::Array(steps[5..].to_vec())).unwrap();
|
||||
let hole = std::f64::consts::PI * 10.0;
|
||||
let removed = bar - volume(&s, "Slat");
|
||||
assert!((removed - hole).abs() < 0.05 * hole, "removed {removed} vs {hole}");
|
||||
let faces = s.model.state().body("Slat").map(|b| solidcraft_kernel::measure(&b.body).unwrap().merged.faces);
|
||||
assert_eq!(faces, Some(8));
|
||||
}
|
||||
Reference in new issue
Block a user