diff --git a/crates/fj-kernel/src/objects/mod.rs b/crates/fj-kernel/src/objects/mod.rs index 903a2ae77..a4350354f 100644 --- a/crates/fj-kernel/src/objects/mod.rs +++ b/crates/fj-kernel/src/objects/mod.rs @@ -128,9 +128,13 @@ impl Objects { } /// The store for [`Surface`]s -#[derive(Debug, Default)] +#[derive(Debug)] pub struct Surfaces { store: Store, + + xy_plane: Handle, + xz_plane: Handle, + yz_plane: Handle, } impl Surfaces { @@ -138,4 +142,36 @@ impl Surfaces { pub fn insert(&self, surface: Surface) -> Handle { self.store.insert(surface) } + + /// Access the xy-plane + pub fn xy_plane(&self) -> Handle { + self.xy_plane.clone() + } + + /// Access the xz-plane + pub fn xz_plane(&self) -> Handle { + self.xz_plane.clone() + } + + /// Access the yz-plane + pub fn yz_plane(&self) -> Handle { + self.yz_plane.clone() + } +} + +impl Default for Surfaces { + fn default() -> Self { + let store = Store::new(); + + let xy_plane = store.insert(Surface::xy_plane()); + let xz_plane = store.insert(Surface::xz_plane()); + let yz_plane = store.insert(Surface::yz_plane()); + + Self { + store, + xy_plane, + xz_plane, + yz_plane, + } + } }