Skip to content

Commit

Permalink
Compute HalfEdge start position
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Mar 1, 2023
1 parent 9d18768 commit d7fe518
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/fj-kernel/src/objects/full/edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ impl HalfEdge {

/// Compute the surface position where the half-edge starts
pub fn start_position(&self) -> Point<2> {
self.start_vertex.position()
// Computing the surface position from the curve position is fine.
// `HalfEdge` "owns" its start position. There is no competing code that
// could compute the surface position from slightly different data.

let [start, _] = self.boundary;
self.curve.point_from_path_coords(start)
}

/// Access the vertex from where this half-edge starts
Expand Down

0 comments on commit d7fe518

Please sign in to comment.