Skip to content

Commit

Permalink
Use public API in PartialFace method
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Nov 9, 2022
1 parent b2337c3 commit 2dd5f6d
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions crates/fj-kernel/src/partial/objects/face.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,14 @@ impl PartialFace {

/// Build the [`Face`] with an interior polygon from the provided points
pub fn with_interior_polygon_from_points(
mut self,
self,
points: impl IntoIterator<Item = impl Into<Point<2>>>,
) -> Self {
let surface = self.surface().expect("Need surface to build polygon.");

self.interiors.push(
Cycle::partial()
.with_poly_chain_from_points(surface, points)
.close_with_line_segment()
.into(),
);
self
self.with_interiors([Cycle::partial()
.with_poly_chain_from_points(surface, points)
.close_with_line_segment()])
}

/// Build the [`Face`] with the provided color
Expand Down

0 comments on commit 2dd5f6d

Please sign in to comment.