diff --git a/src/kernel/geometry/curves/circle.rs b/src/kernel/geometry/curves/circle.rs index 966e7896a..f9c292576 100644 --- a/src/kernel/geometry/curves/circle.rs +++ b/src/kernel/geometry/curves/circle.rs @@ -3,7 +3,7 @@ use std::f64::consts::PI; use crate::math::{Point, Scalar, Transform, Vector}; /// A circle -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub struct Circle { /// The center point of the circle pub center: Point<3>, diff --git a/src/kernel/geometry/curves/line.rs b/src/kernel/geometry/curves/line.rs index ec85f9d8c..1e1795ff3 100644 --- a/src/kernel/geometry/curves/line.rs +++ b/src/kernel/geometry/curves/line.rs @@ -1,7 +1,7 @@ use crate::math::{Point, Transform, Vector}; /// A line, defined by a point and a vector -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub struct Line { /// The origin of the line's coordinate system pub origin: Point<3>, diff --git a/src/kernel/geometry/curves/mod.rs b/src/kernel/geometry/curves/mod.rs index 6c2b3c286..513d4a3c7 100644 --- a/src/kernel/geometry/curves/mod.rs +++ b/src/kernel/geometry/curves/mod.rs @@ -14,7 +14,7 @@ pub use self::{circle::Circle, line::Line}; /// The nomenclature is inspired by Boundary Representation Modelling Techniques /// by Ian Stroud. "Curve" refers to unbounded one-dimensional geometry, while /// while edges are bounded portions of curves. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub enum Curve { /// A circle Circle(Circle), diff --git a/src/kernel/geometry/surfaces/mod.rs b/src/kernel/geometry/surfaces/mod.rs index c12222b74..d1f3d360c 100644 --- a/src/kernel/geometry/surfaces/mod.rs +++ b/src/kernel/geometry/surfaces/mod.rs @@ -12,7 +12,7 @@ use crate::{ use super::{Curve, Line}; /// A two-dimensional shape -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub enum Surface { /// A swept curve Swept(Swept), diff --git a/src/kernel/geometry/surfaces/swept.rs b/src/kernel/geometry/surfaces/swept.rs index ecf5c2bb5..447f5c6db 100644 --- a/src/kernel/geometry/surfaces/swept.rs +++ b/src/kernel/geometry/surfaces/swept.rs @@ -4,7 +4,7 @@ use crate::{ }; /// A surface that was swept from a curve -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub struct Swept { /// The curve that this surface was swept from pub curve: Curve, diff --git a/src/kernel/topology/edges.rs b/src/kernel/topology/edges.rs index 99591ed8b..d7b5b6a3c 100644 --- a/src/kernel/topology/edges.rs +++ b/src/kernel/topology/edges.rs @@ -6,7 +6,7 @@ use crate::{ use super::vertices::Vertex; /// The edges of a shape -#[derive(Clone)] +#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub struct Edges { /// The cycles that the edges of the shape form /// @@ -34,13 +34,13 @@ impl Edges { /// The end of each edge in the cycle must connect to the beginning of the next /// edge. The end of the last edge must connect to the beginning of the first /// one. -#[derive(Clone)] +#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub struct Cycle { pub edges: Vec, } /// An edge of a shape -#[derive(Clone, Debug)] +#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub struct Edge { /// The curve that defines the edge's geometry /// diff --git a/src/kernel/topology/faces.rs b/src/kernel/topology/faces.rs index 2063faf8b..ebe9a0dea 100644 --- a/src/kernel/topology/faces.rs +++ b/src/kernel/topology/faces.rs @@ -17,7 +17,7 @@ use crate::{ use super::edges::Edges; /// The faces of a shape -#[derive(Clone)] +#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub struct Faces(pub Vec); impl Faces { @@ -34,7 +34,7 @@ impl Faces { } /// A face of a shape -#[derive(Clone)] +#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub enum Face { /// A face of a shape ///