mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-12 13:58:28 +00:00
Simplify Surface::surface_from_uv
to from_uv
This commit is contained in:
parent
f850e47537
commit
ec64299df1
@ -24,7 +24,7 @@ pub trait BuildSurface {
|
|||||||
let (u, u_line) = GlobalPath::line_from_points([a, b]);
|
let (u, u_line) = GlobalPath::line_from_points([a, b]);
|
||||||
let v = c - a;
|
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 points_surface = {
|
||||||
let [a, b] =
|
let [a, b] =
|
||||||
@ -38,7 +38,7 @@ pub trait BuildSurface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Build a plane from the provided `u` and `v`
|
/// Build a plane from the provided `u` and `v`
|
||||||
fn surface_from_uv(
|
fn from_uv(
|
||||||
u: impl Into<GlobalPath>,
|
u: impl Into<GlobalPath>,
|
||||||
v: impl Into<Vector<3>>,
|
v: impl Into<Vector<3>>,
|
||||||
core: &mut Core,
|
core: &mut Core,
|
||||||
|
@ -84,6 +84,6 @@ impl SweepSurfacePath for SurfacePath {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Surface::surface_from_uv(u, path, core)
|
Surface::from_uv(u, path, core)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -198,7 +198,7 @@ mod tests {
|
|||||||
let mut core = Core::new();
|
let mut core = Core::new();
|
||||||
|
|
||||||
let shared_face = Face::new(
|
let shared_face = Face::new(
|
||||||
Surface::surface_from_uv(
|
Surface::from_uv(
|
||||||
GlobalPath::circle_from_radius(1.),
|
GlobalPath::circle_from_radius(1.),
|
||||||
[0., 1., 1.],
|
[0., 1., 1.],
|
||||||
&mut core,
|
&mut core,
|
||||||
@ -257,7 +257,7 @@ mod tests {
|
|||||||
|
|
||||||
let invalid_solid = Solid::new(vec![Shell::new(vec![
|
let invalid_solid = Solid::new(vec![Shell::new(vec![
|
||||||
Face::new(
|
Face::new(
|
||||||
Surface::surface_from_uv(
|
Surface::from_uv(
|
||||||
GlobalPath::circle_from_radius(1.),
|
GlobalPath::circle_from_radius(1.),
|
||||||
[0., 1., 1.],
|
[0., 1., 1.],
|
||||||
&mut core,
|
&mut core,
|
||||||
@ -266,7 +266,7 @@ mod tests {
|
|||||||
)
|
)
|
||||||
.insert(&mut core),
|
.insert(&mut core),
|
||||||
Face::new(
|
Face::new(
|
||||||
Surface::surface_from_uv(
|
Surface::from_uv(
|
||||||
GlobalPath::circle_from_radius(1.),
|
GlobalPath::circle_from_radius(1.),
|
||||||
[0., 0., 1.],
|
[0., 0., 1.],
|
||||||
&mut core,
|
&mut core,
|
||||||
@ -305,7 +305,7 @@ mod tests {
|
|||||||
|
|
||||||
let invalid_solid = Solid::new(vec![Shell::new(vec![
|
let invalid_solid = Solid::new(vec![Shell::new(vec![
|
||||||
Face::new(
|
Face::new(
|
||||||
Surface::surface_from_uv(
|
Surface::from_uv(
|
||||||
GlobalPath::circle_from_radius(1.),
|
GlobalPath::circle_from_radius(1.),
|
||||||
[0., 1., 1.],
|
[0., 1., 1.],
|
||||||
&mut core,
|
&mut core,
|
||||||
@ -314,7 +314,7 @@ mod tests {
|
|||||||
)
|
)
|
||||||
.insert(&mut core),
|
.insert(&mut core),
|
||||||
Face::new(
|
Face::new(
|
||||||
Surface::surface_from_uv(
|
Surface::from_uv(
|
||||||
GlobalPath::circle_from_radius(1.),
|
GlobalPath::circle_from_radius(1.),
|
||||||
[0., 0., 1.],
|
[0., 0., 1.],
|
||||||
&mut core,
|
&mut core,
|
||||||
@ -350,7 +350,7 @@ mod tests {
|
|||||||
let shared_edge = HalfEdge::circle([0., 0.], 1., &mut core);
|
let shared_edge = HalfEdge::circle([0., 0.], 1., &mut core);
|
||||||
|
|
||||||
let invalid_solid = Solid::new(vec![Shell::new(vec![Face::new(
|
let invalid_solid = Solid::new(vec![Shell::new(vec![Face::new(
|
||||||
Surface::surface_from_uv(
|
Surface::from_uv(
|
||||||
GlobalPath::circle_from_radius(1.),
|
GlobalPath::circle_from_radius(1.),
|
||||||
[0., 0., 1.],
|
[0., 0., 1.],
|
||||||
&mut core,
|
&mut core,
|
||||||
|
Loading…
Reference in New Issue
Block a user