diff --git a/crates/fj-kernel/src/objects/face.rs b/crates/fj-kernel/src/objects/face.rs index ca8899f452..ddb5aff8ec 100644 --- a/crates/fj-kernel/src/objects/face.rs +++ b/crates/fj-kernel/src/objects/face.rs @@ -1,5 +1,3 @@ -use std::hash::{Hash, Hasher}; - use fj_interop::mesh::Color; use fj_math::Triangle; @@ -103,7 +101,7 @@ impl Face { /// This type exists to ease the handling of faces that use boundary /// representation. It will eventually be merged into `Face`, once /// `Face::Triangles` can finally be removed. -#[derive(Clone, Debug, Eq, Ord, PartialOrd)] +#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub struct FaceBRep { /// The surface that defines this face pub surface: Surface, @@ -167,23 +165,6 @@ impl FaceBRep { } } -impl PartialEq for FaceBRep { - fn eq(&self, other: &Self) -> bool { - self.surface() == other.surface() - && self.exteriors().eq(other.exteriors()) - && self.interiors().eq(other.interiors()) - } -} - -impl Hash for FaceBRep { - fn hash(&self, state: &mut H) { - self.surface().hash(state); - for cycle in self.all_cycles() { - cycle.hash(state); - } - } -} - /// A list of cycles, as they are stored in `Face` #[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub struct CyclesInFace(Vec, Cycle<3>>>);