Skip to content

Commit

Permalink
Merge pull request #612 from hannobraun/sweep
Browse files Browse the repository at this point in the history
Fix inconsequential bug in sweep algorithm
  • Loading branch information
hannobraun authored May 20, 2022
2 parents c255947 + 7c26846 commit a431d0a
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions crates/fj-kernel/src/algorithms/sweep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,17 @@ pub fn sweep_shape(
vertex_bottom_to_edge
.entry(vertex_bottom.clone())
.or_insert_with(|| {
let curve = target
.insert(edge_source.get().curve())
.unwrap();

let vertex_top = source_to_top
.vertices()
.get(&vertex_source.canonical())
.unwrap()
.clone();

target
.merge(Edge::new(
curve,
Some([vertex_bottom, vertex_top]),
))
let points = [vertex_bottom, vertex_top]
.map(|vertex| vertex.get().point());

Edge::builder(&mut target)
.build_line_segment_from_points(points)
.unwrap()
})
.clone()
Expand Down

0 comments on commit a431d0a

Please sign in to comment.