diff --git a/crates/fj-core/src/operations/build/surface.rs b/crates/fj-core/src/operations/build/surface.rs index aa2ba429d..76e90495c 100644 --- a/crates/fj-core/src/operations/build/surface.rs +++ b/crates/fj-core/src/operations/build/surface.rs @@ -14,6 +14,35 @@ use crate::{ /// /// [module-level documentation]: super pub trait BuildSurface { + /// Build a surface from the provided geometry + fn from_geometry( + surface_geom: SurfaceGeom, + core: &mut Core, + ) -> Handle { + let surface = Surface::new().insert(core); + + core.layers + .geometry + .define_surface(surface.clone(), surface_geom); + + surface + } + + /// Build a surface from the provided `u` and `v` + fn from_uv( + u: impl Into, + v: impl Into>, + core: &mut Core, + ) -> Handle { + Self::from_geometry( + SurfaceGeom { + u: u.into(), + v: v.into(), + }, + core, + ) + } + /// Build a plane from the provided points fn plane_from_points( points: [impl Into>; 3], @@ -36,25 +65,6 @@ pub trait BuildSurface { (surface, points_surface) } - - /// Build a plane from the provided `u` and `v` - fn from_uv( - u: impl Into, - v: impl Into>, - core: &mut Core, - ) -> Handle { - let surface = Surface::new().insert(core); - - core.layers.geometry.define_surface( - surface.clone(), - SurfaceGeom { - u: u.into(), - v: v.into(), - }, - ); - - surface - } } impl BuildSurface for Surface {}