parry3d/transformation/convex_hull3/
error.rs

1#[derive(thiserror::Error, Debug, PartialEq)]
2/// Errors generated by the convex-hull calculation.
3pub enum ConvexHullError {
4    /// Reached an impossible configuration in the convex-hull calculation,
5    /// likely because of a bug.
6    #[error("Internal error: {0}")]
7    InternalError(&'static str),
8    /// The convex hull calculation was unable to find a support point.
9    /// This generally happens if the input point set contains invalid points (with NaN coordinates)
10    /// or if they are almost coplanar.
11    #[error("Input points are either invalid (NaN) or are almost coplanar.")]
12    MissingSupportPoint,
13    /// The convex-hull calculation failed because less than 3 points were provided.
14    #[error("Less than 3 points were given to the convex-hull algorithm.")]
15    IncompleteInput,
16    /// Reached a piece of code we shouldn’t (internal error).
17    #[error("Internal error: unreachable code path")]
18    Unreachable,
19    /// One of convex-hull's triangle was not constructed properly
20    #[error("Detected unfinished triangle")]
21    UnfinishedTriangle,
22    /// Edge has more than 2 vertexes
23    #[error("Detected t-junction for triangle {0}, edge: ({1}, {2})")]
24    TJunction(usize, u32, u32),
25    /// The convex-hull contains duplicate points
26    #[error("Detected duplicate points {0} and {1}")]
27    DuplicatePoints(usize, usize),
28}