mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-22 07:05:53 +00:00
Use public API in PartialFace
method
This commit is contained in:
parent
b2337c322e
commit
2dd5f6d68d
@ -82,18 +82,14 @@ impl PartialFace {
|
|||||||
|
|
||||||
/// Build the [`Face`] with an interior polygon from the provided points
|
/// Build the [`Face`] with an interior polygon from the provided points
|
||||||
pub fn with_interior_polygon_from_points(
|
pub fn with_interior_polygon_from_points(
|
||||||
mut self,
|
self,
|
||||||
points: impl IntoIterator<Item = impl Into<Point<2>>>,
|
points: impl IntoIterator<Item = impl Into<Point<2>>>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let surface = self.surface().expect("Need surface to build polygon.");
|
let surface = self.surface().expect("Need surface to build polygon.");
|
||||||
|
|
||||||
self.interiors.push(
|
self.with_interiors([Cycle::partial()
|
||||||
Cycle::partial()
|
.with_poly_chain_from_points(surface, points)
|
||||||
.with_poly_chain_from_points(surface, points)
|
.close_with_line_segment()])
|
||||||
.close_with_line_segment()
|
|
||||||
.into(),
|
|
||||||
);
|
|
||||||
self
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Build the [`Face`] with the provided color
|
/// Build the [`Face`] with the provided color
|
||||||
|
Loading…
Reference in New Issue
Block a user