1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
use fj_math::Vector;
use crate::{
objects::{Sketch, Solid},
stores::Stores,
};
use super::Sweep;
impl Sweep for Sketch {
type Swept = Solid;
fn sweep(self, path: impl Into<Vector<3>>, stores: &Stores) -> Self::Swept {
let path = path.into();
let mut shells = Vec::new();
for face in self.into_faces() {
let shell = face.sweep(path, stores);
shells.push(shell);
}
Solid::new().with_shells(shells)
}
}