use fj_math::Point;
use crate::{
objects::{Face, Sketch, Surface},
stores::{Handle, Stores},
};
pub struct SketchBuilder<'a> {
pub stores: &'a Stores,
pub surface: Handle<Surface>,
}
impl<'a> SketchBuilder<'a> {
pub fn build_polygon_from_points(
self,
points: impl IntoIterator<Item = impl Into<Point<2>>>,
) -> Sketch {
let face = Face::builder(self.stores, self.surface)
.with_exterior_polygon_from_points(points)
.build();
Sketch::new().with_faces([face])
}
}