Skip to content

Commit

Permalink
Add SurfacePath::reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Feb 16, 2023
1 parent 819001e commit 7f7a675
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/fj-kernel/src/geometry/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ impl SurfacePath {
Self::Line(line) => line.point_from_line_coords(point),
}
}

/// Create a new instance that is reversed
#[must_use]
pub fn reverse(self) -> Self {
match self {
SurfacePath::Circle(circle) => Self::Circle(circle.reverse()),
SurfacePath::Line(line) => Self::Line(line.reverse()),
}
}
}

/// A path through global (3D) space
Expand Down

0 comments on commit 7f7a675

Please sign in to comment.