1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use fj_math::Scalar;

use crate::geometry::curve::Curve;

/// A possibly undefined curve
#[derive(Clone, Copy, Debug)]
pub enum MaybeCurve {
    /// The curve is fully defined
    Defined(Curve),

    /// The curve is undefined, but we know it is a circle
    UndefinedCircle {
        /// The radius of the undefined circle
        radius: Scalar,
    },

    /// The curve is undefined, but we know it is a line
    UndefinedLine,
}

impl From<Curve> for MaybeCurve {
    fn from(path: Curve) -> Self {
        Self::Defined(path)
    }
}