mesh_shell/
error.rs

1//! Error types for shell operations.
2
3use thiserror::Error;
4
5/// Result type alias for shell operations.
6pub type ShellResult<T> = Result<T, ShellError>;
7
8/// Errors that can occur during shell operations.
9#[derive(Debug, Error)]
10pub enum ShellError {
11    /// Input mesh is empty.
12    #[error("input mesh is empty")]
13    EmptyMesh,
14
15    /// SDF grid would be too large.
16    #[error("SDF grid too large: {dims:?} = {total} voxels exceeds limit of {max}")]
17    GridTooLarge {
18        dims: [usize; 3],
19        total: usize,
20        max: usize,
21    },
22
23    /// Isosurface extraction failed.
24    #[error("isosurface extraction produced empty mesh")]
25    EmptyIsosurface,
26
27    /// Tag transfer failed.
28    #[error("failed to transfer vertex tags: {details}")]
29    TagTransferFailed { details: String },
30
31    /// Shell generation failed.
32    #[error("shell generation failed: {details}")]
33    ShellGenerationFailed { details: String },
34}