Skip to content

Commit

Permalink
Remove unused argument
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Mar 23, 2024
1 parent 4740b3b commit 53d1fb8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
27 changes: 11 additions & 16 deletions crates/fj-core/src/operations/build/half_edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use fj_interop::ext::ArrayExt;
use fj_math::{Arc, Point, Scalar};

use crate::{
geometry::{CurveBoundary, HalfEdgeGeometry, SurfacePath},
geometry::{HalfEdgeGeometry, SurfacePath},
objects::{Curve, HalfEdge, Vertex},
operations::{geometry::UpdateHalfEdgeGeometry, insert::Insert},
storage::Handle,
Expand All @@ -16,10 +16,7 @@ use crate::{
/// [module-level documentation]: super
pub trait BuildHalfEdge {
/// Create a half-edge that is not joined to a sibling
fn unjoined(
_: impl Into<CurveBoundary<Point<1>>>,
core: &mut Core,
) -> HalfEdge {
fn unjoined(core: &mut Core) -> HalfEdge {
let curve = Curve::new().insert(core);
let start_vertex = Vertex::new().insert(core);

Expand Down Expand Up @@ -63,7 +60,7 @@ pub trait BuildHalfEdge {
let boundary =
[arc.start_angle, arc.end_angle].map(|coord| Point::from([coord]));

let half_edge = HalfEdge::unjoined(boundary, core).insert(core);
let half_edge = HalfEdge::unjoined(core).insert(core);
core.layers.geometry.define_half_edge(
half_edge.clone(),
HalfEdgeGeometry {
Expand All @@ -85,7 +82,7 @@ pub trait BuildHalfEdge {
let boundary =
[Scalar::ZERO, Scalar::TAU].map(|coord| Point::from([coord]));

let half_edge = HalfEdge::unjoined(boundary, core).insert(core);
let half_edge = HalfEdge::unjoined(core).insert(core);
core.layers.geometry.define_half_edge(
half_edge.clone(),
HalfEdgeGeometry {
Expand All @@ -109,15 +106,13 @@ pub trait BuildHalfEdge {
boundary.zip_ext(points_surface),
);

HalfEdge::unjoined(boundary, core)
.insert(core)
.set_geometry(
HalfEdgeGeometry {
path,
boundary: boundary.into(),
},
&mut core.layers.geometry,
)
HalfEdge::unjoined(core).insert(core).set_geometry(
HalfEdgeGeometry {
path,
boundary: boundary.into(),
},
&mut core.layers.geometry,
)
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/fj-core/src/operations/join/cycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl JoinCycle for Cycle {
.into_iter()
.circular_tuple_windows()
.map(|((prev_half_edge, _), (half_edge, geometry))| {
HalfEdge::unjoined(geometry.boundary, core)
HalfEdge::unjoined(core)
.update_curve(|_, _| half_edge.curve().clone(), core)
.update_start_vertex(
|_, _| prev_half_edge.start_vertex().clone(),
Expand Down

0 comments on commit 53d1fb8

Please sign in to comment.