()
| 172 | } |
| 173 | |
| 174 | fn main() -> Result<(), anyhow::Error> { |
| 175 | let level_set = example_level_set(); |
| 176 | |
| 177 | let domain = Aabb3d::new(Vector3::new(-1.5, -1.5, -1.5), Vector3::new(1.5, 1.5, 1.5)); |
| 178 | let cube_size = 0.05; |
| 179 | |
| 180 | let mesh = marching_cubes(level_set, &domain, cube_size)?; |
| 181 | |
| 182 | println!( |
| 183 | "Vertices: {} triangles: {}", |
| 184 | mesh.vertices.len(), |
| 185 | mesh.triangles.len() |
| 186 | ); |
| 187 | |
| 188 | #[cfg(feature = "io")] |
| 189 | io::vtk_format::write_vtk(&mesh, "out/sdf_test.vtk", "mesh")?; |
| 190 | |
| 191 | Ok(()) |
| 192 | } |
nothing calls this directly
no test coverage detected