diff --git a/crates/kernel/examples/step_board_fixture.rs b/crates/kernel/examples/step_board_fixture.rs index 69691c535e..393ea5aeb3 100644 --- a/crates/kernel/examples/step_board_fixture.rs +++ b/crates/kernel/examples/step_board_fixture.rs @@ -65,7 +65,11 @@ mod run { .enumerate() .map(|(c, bodies)| ExportProduct { name: format!("U{c}"), - bodies: bodies.iter().enumerate().map(|(k, b)| ExportBody { name: format!("U{c}_{k}"), body: b, color: Some([0.2, 0.2, 0.2]) }).collect(), + bodies: bodies + .iter() + .enumerate() + .map(|(k, b)| ExportBody { name: format!("U{c}_{k}"), body: b, color: Some([0.2, 0.2, 0.2]) }) + .collect(), children: Vec::new(), }) .collect(); diff --git a/crates/kernel/src/tests.rs b/crates/kernel/src/tests.rs index 3da88a6286..2056d1b2e8 100644 --- a/crates/kernel/src/tests.rs +++ b/crates/kernel/src/tests.rs @@ -1237,7 +1237,14 @@ fn coplanar_curved_booleans() { // the union adds the parts outside. A cylinder inside but for a flush cap adds nothing. let b = box_solid(Vec3::ZERO, Vec3::new(40.0, 30.0, 20.0)).unwrap(); let disc = PI * 25.0; - for (z0, z1, inside, outside) in [(0.0, 20.0, 20.0, 0.0), (-5.0, 20.0, 20.0, 5.0), (0.0, 25.0, 20.0, 5.0), (-5.0, 25.0, 20.0, 10.0), (5.0, 20.0, 15.0, 0.0), (5.0, 25.0, 15.0, 5.0)] { + for (z0, z1, inside, outside) in [ + (0.0, 20.0, 20.0, 0.0), + (-5.0, 20.0, 20.0, 5.0), + (0.0, 25.0, 20.0, 5.0), + (-5.0, 25.0, 20.0, 10.0), + (5.0, 20.0, 15.0, 0.0), + (5.0, 25.0, 15.0, 5.0), + ] { let c = cylinder(Vec3::new(20.0, 15.0, z0), Vec3::Z, 5.0, z1 - z0).unwrap(); let cut = measure(&boolean(&b, &c, BoolOp::Cut).unwrap().unwrap()).unwrap().volume; assert!(rel(cut, 24000.0 - disc * inside) < 1e-6, "cut z {z0}..{z1}: {cut}");