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