Refactor to prepare for follow-on change

This commit is contained in:
Hanno Braun 2024-03-20 13:11:42 +01:00
parent 2bacac3a73
commit 82686e1a88

View File

@ -101,13 +101,16 @@ impl SplitFace for Shell {
.expect("Updated shell must contain updated face");
// Build the edge that's going to divide the new faces.
let dividing_half_edge_a_to_d = HalfEdge::line_segment(
[b.start_position(), d.start_position()],
None,
core,
)
.update_start_vertex(|_, _| b.start_vertex().clone(), core)
.insert(core);
let dividing_half_edge_a_to_d = {
let half_edge = HalfEdge::line_segment(
[b.start_position(), d.start_position()],
None,
core,
);
half_edge
.update_start_vertex(|_, _| b.start_vertex().clone(), core)
.insert(core)
};
let dividing_half_edge_c_to_b = HalfEdge::from_sibling(
&dividing_half_edge_a_to_d,
d.start_vertex().clone(),