Skip to content

Commit

Permalink
Merge pull request hannobraun#2240 from hannobraun/surface
Browse files Browse the repository at this point in the history
Rename `plane_from_uv` to `surface_from_uv`
  • Loading branch information
hannobraun authored Feb 27, 2024
2 parents 9f01511 + 84232ab commit 51b96b7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions crates/fj-core/src/objects/stores.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions crates/fj-core/src/operations/build/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand All @@ -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<GlobalPath>,
v: impl Into<Vector<3>>,
) -> Surface {
Expand Down
2 changes: 1 addition & 1 deletion crates/fj-core/src/operations/sweep/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ impl SweepSurfacePath for SurfacePath {
}
};

Surface::plane_from_uv(u, path)
Surface::surface_from_uv(u, path)
}
}
12 changes: 6 additions & 6 deletions crates/fj-core/src/validate/solid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.],
)
Expand Down Expand Up @@ -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.],
)
Expand All @@ -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.],
)
Expand Down Expand Up @@ -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.],
)
Expand All @@ -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.],
)
Expand Down Expand Up @@ -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.],
)
Expand Down

0 comments on commit 51b96b7

Please sign in to comment.