From 79bbc7f38d143e38147da95e49d3a1ea7db2ce0a Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 14 Apr 2025 13:50:53 +0200 Subject: [PATCH] Prepare for follow-on change --- experiments/2025-03-18/src/geometry/sketch.rs | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/experiments/2025-03-18/src/geometry/sketch.rs b/experiments/2025-03-18/src/geometry/sketch.rs index c740a86a1..3d58cfc6c 100644 --- a/experiments/2025-03-18/src/geometry/sketch.rs +++ b/experiments/2025-03-18/src/geometry/sketch.rs @@ -35,27 +35,27 @@ impl Sketch { } pub fn to_face(&self, surface: Handle) -> Face { - let VerticesFromSegments { - vertices, - coincident_vertices, - } = VerticesFromSegments::new(&self.segments, &surface); + let vertices = VerticesFromSegments::new(&self.segments, &surface); - let half_edges = vertices.into_iter().circular_tuple_windows().map( - |(start, end)| { - let curve = - Handle::new(Curve::line_from_vertices([&start, &end])); + let half_edges = + vertices.vertices.into_iter().circular_tuple_windows().map( + |(start, end)| { + let curve = + Handle::new(Curve::line_from_vertices([&start, &end])); - let [start_is_coincident, end_is_coincident] = [&start, &end] - .map(|vertex| coincident_vertices.contains(vertex)); - let is_internal = start_is_coincident && end_is_coincident; + let [start_is_coincident, end_is_coincident] = + [&start, &end].map(|vertex| { + vertices.coincident_vertices.contains(vertex) + }); + let is_internal = start_is_coincident && end_is_coincident; - Handle::new(HalfEdge { - curve, - start, - is_internal, - }) - }, - ); + Handle::new(HalfEdge { + curve, + start, + is_internal, + }) + }, + ); Face::new(surface, half_edges, false) }