From 84232ab0861adc9407fcdf9a387f0228562b4b8c Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 27 Feb 2024 12:46:00 +0100 Subject: [PATCH] Rename `plane_from_uv` to `surface_from_uv` The previous name was plain wrong. --- crates/fj-core/src/objects/stores.rs | 6 +++--- crates/fj-core/src/operations/build/surface.rs | 4 ++-- crates/fj-core/src/operations/sweep/path.rs | 2 +- crates/fj-core/src/validate/solid.rs | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/crates/fj-core/src/objects/stores.rs b/crates/fj-core/src/objects/stores.rs index 1eb4ae0ad..7f1cfbb24 100644 --- a/crates/fj-core/src/objects/stores.rs +++ b/crates/fj-core/src/objects/stores.rs @@ -95,18 +95,18 @@ impl Default for Surfaces { let xy_plane = store.reserve(); store.insert( xy_plane.clone(), - Surface::plane_from_uv(GlobalPath::x_axis(), Vector::unit_y()), + Surface::surface_from_uv(GlobalPath::x_axis(), Vector::unit_y()), ); let xz_plane = store.reserve(); store.insert( xz_plane.clone(), - Surface::plane_from_uv(GlobalPath::x_axis(), Vector::unit_z()), + Surface::surface_from_uv(GlobalPath::x_axis(), Vector::unit_z()), ); let yz_plane = store.reserve(); store.insert( yz_plane.clone(), - Surface::plane_from_uv(GlobalPath::y_axis(), Vector::unit_z()), + Surface::surface_from_uv(GlobalPath::y_axis(), Vector::unit_z()), ); Self { diff --git a/crates/fj-core/src/operations/build/surface.rs b/crates/fj-core/src/operations/build/surface.rs index 707463ed5..95cf7b3ce 100644 --- a/crates/fj-core/src/operations/build/surface.rs +++ b/crates/fj-core/src/operations/build/surface.rs @@ -20,7 +20,7 @@ pub trait BuildSurface { let (u, u_line) = GlobalPath::line_from_points([a, b]); let v = c - a; - let surface = Surface::plane_from_uv(u, v); + let surface = Surface::surface_from_uv(u, v); let points_surface = { let [a, b] = @@ -34,7 +34,7 @@ pub trait BuildSurface { } /// Build a plane from the provided `u` and `v` - fn plane_from_uv( + fn surface_from_uv( u: impl Into, v: impl Into>, ) -> Surface { diff --git a/crates/fj-core/src/operations/sweep/path.rs b/crates/fj-core/src/operations/sweep/path.rs index e750f0210..780c6eb19 100644 --- a/crates/fj-core/src/operations/sweep/path.rs +++ b/crates/fj-core/src/operations/sweep/path.rs @@ -80,6 +80,6 @@ impl SweepSurfacePath for SurfacePath { } }; - Surface::plane_from_uv(u, path) + Surface::surface_from_uv(u, path) } } diff --git a/crates/fj-core/src/validate/solid.rs b/crates/fj-core/src/validate/solid.rs index 99fafc6a7..9d2df4cf5 100644 --- a/crates/fj-core/src/validate/solid.rs +++ b/crates/fj-core/src/validate/solid.rs @@ -193,7 +193,7 @@ mod tests { let mut core = Core::new(); let shared_face = Face::new( - Surface::plane_from_uv( + Surface::surface_from_uv( GlobalPath::circle_from_radius(1.), [0., 1., 1.], ) @@ -255,7 +255,7 @@ mod tests { let invalid_solid = Solid::new(vec![Shell::new(vec![ Face::new( - Surface::plane_from_uv( + Surface::surface_from_uv( GlobalPath::circle_from_radius(1.), [0., 1., 1.], ) @@ -264,7 +264,7 @@ mod tests { ) .insert(&mut core), Face::new( - Surface::plane_from_uv( + Surface::surface_from_uv( GlobalPath::circle_from_radius(1.), [0., 0., 1.], ) @@ -304,7 +304,7 @@ mod tests { let invalid_solid = Solid::new(vec![Shell::new(vec![ Face::new( - Surface::plane_from_uv( + Surface::surface_from_uv( GlobalPath::circle_from_radius(1.), [0., 1., 1.], ) @@ -313,7 +313,7 @@ mod tests { ) .insert(&mut core), Face::new( - Surface::plane_from_uv( + Surface::surface_from_uv( GlobalPath::circle_from_radius(1.), [0., 0., 1.], ) @@ -349,7 +349,7 @@ mod tests { HalfEdge::circle([0., 0.], 1., &mut core).insert(&mut core); let invalid_solid = Solid::new(vec![Shell::new(vec![Face::new( - Surface::plane_from_uv( + Surface::surface_from_uv( GlobalPath::circle_from_radius(1.), [0., 0., 1.], )