pub fn generate_shell_with_progress(
inner_shell: &Mesh,
params: &ShellParams,
callback: Option<&ProgressCallback>,
) -> (Mesh, ShellResult)Expand description
Generate a printable shell with progress reporting.
This is a progress-reporting variant of generate_shell that allows tracking
the shell generation progress and supports cancellation via the progress callback.
The shell generation proceeds through these phases:
- Vertex normal computation
- Outer surface generation (normal offset or SDF)
- Inner/outer face creation
- Rim generation to connect boundaries
- Optional validation
§Arguments
inner_shell- The inner surface mesh (from offset stage)params- Shell generation parameterscallback- Optional progress callback. Returnsfalseto request cancellation.
§Returns
A tuple of (shell mesh, generation result). If cancelled via callback, returns the partial shell.
§Example
ⓘ
use mesh_shell::{generate_shell_with_progress, ShellParams};
use mesh_repair::progress::ProgressCallback;
let callback: ProgressCallback = Box::new(|progress| {
println!("{}% - {}", progress.percent(), progress.message);
true // Continue
});
let (shell, result) = generate_shell_with_progress(&inner_mesh, &ShellParams::default(), Some(&callback));