Simplify Surface::surface_from_uv to from_uv

This commit is contained in:
Hanno Braun 2024-03-25 13:21:17 +01:00
parent f850e47537
commit ec64299df1
3 changed files with 9 additions and 9 deletions

View File

@ -24,7 +24,7 @@ pub trait BuildSurface {
let (u, u_line) = GlobalPath::line_from_points([a, b]);
let v = c - a;
let surface = Surface::surface_from_uv(u, v, core);
let surface = Surface::from_uv(u, v, core);
let points_surface = {
let [a, b] =
@ -38,7 +38,7 @@ pub trait BuildSurface {
}
/// Build a plane from the provided `u` and `v`
fn surface_from_uv(
fn from_uv(
u: impl Into<GlobalPath>,
v: impl Into<Vector<3>>,
core: &mut Core,

View File

@ -84,6 +84,6 @@ impl SweepSurfacePath for SurfacePath {
}
};
Surface::surface_from_uv(u, path, core)
Surface::from_uv(u, path, core)
}
}

View File

@ -198,7 +198,7 @@ mod tests {
let mut core = Core::new();
let shared_face = Face::new(
Surface::surface_from_uv(
Surface::from_uv(
GlobalPath::circle_from_radius(1.),
[0., 1., 1.],
&mut core,
@ -257,7 +257,7 @@ mod tests {
let invalid_solid = Solid::new(vec![Shell::new(vec![
Face::new(
Surface::surface_from_uv(
Surface::from_uv(
GlobalPath::circle_from_radius(1.),
[0., 1., 1.],
&mut core,
@ -266,7 +266,7 @@ mod tests {
)
.insert(&mut core),
Face::new(
Surface::surface_from_uv(
Surface::from_uv(
GlobalPath::circle_from_radius(1.),
[0., 0., 1.],
&mut core,
@ -305,7 +305,7 @@ mod tests {
let invalid_solid = Solid::new(vec![Shell::new(vec![
Face::new(
Surface::surface_from_uv(
Surface::from_uv(
GlobalPath::circle_from_radius(1.),
[0., 1., 1.],
&mut core,
@ -314,7 +314,7 @@ mod tests {
)
.insert(&mut core),
Face::new(
Surface::surface_from_uv(
Surface::from_uv(
GlobalPath::circle_from_radius(1.),
[0., 0., 1.],
&mut core,
@ -350,7 +350,7 @@ mod tests {
let shared_edge = HalfEdge::circle([0., 0.], 1., &mut core);
let invalid_solid = Solid::new(vec![Shell::new(vec![Face::new(
Surface::surface_from_uv(
Surface::from_uv(
GlobalPath::circle_from_radius(1.),
[0., 0., 1.],
&mut core,