mod curve;
mod edge;
mod face;
mod sketch;
mod vertex;
use std::collections::BTreeMap;
use fj_math::Vector;
use crate::{
objects::{GlobalEdge, Objects, Vertex},
services::Service,
storage::{Handle, ObjectId},
};
pub trait Sweep: Sized {
type Swept;
fn sweep(
self,
path: impl Into<Vector<3>>,
objects: &mut Service<Objects>,
) -> Self::Swept {
let mut cache = SweepCache::default();
self.sweep_with_cache(path, &mut cache, objects)
}
fn sweep_with_cache(
self,
path: impl Into<Vector<3>>,
cache: &mut SweepCache,
objects: &mut Service<Objects>,
) -> Self::Swept;
}
#[derive(Default)]
pub struct SweepCache {
pub global_vertex: BTreeMap<ObjectId, Handle<Vertex>>,
pub global_edge: BTreeMap<ObjectId, Handle<GlobalEdge>>,
}