Skip to content

Commit

Permalink
Replace access of PartialSurfaceVertex position
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Mar 1, 2023
1 parent 3fd82aa commit 2716e4b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions crates/fj-kernel/src/builder/edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,13 @@ impl HalfEdgeBuilder for PartialHalfEdge {
next_half_edge: Partial<HalfEdge>,
) -> Curve {
let boundary = self.boundary;
let points_surface =
[&self.start_vertex, &next_half_edge.read().start_vertex].map(
|vertex| {
vertex.read().position.expect(
"Can't infer line segment without surface position",
)
},
);
let points_surface = [
&self.start_position(),
&next_half_edge.read().start_position(),
]
.map(|position| {
position.expect("Can't infer line segment without surface position")
});

let path = if let [Some(start), Some(end)] = boundary {
let points = [start, end].zip_ext(points_surface);
Expand Down

0 comments on commit 2716e4b

Please sign in to comment.