1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Sweep objects along a path to create new objects
//!
//! Sweeps 1D or 2D objects along a straight path, creating a 2D or 3D object,
//! respectively.

mod cycle;
mod face;
mod half_edge;
mod path;
mod region;
mod shell_face;
mod sketch;
mod vertex;

pub use self::{
    cycle::{SweepCycle, SweptCycle},
    face::SweepFace,
    half_edge::SweepHalfEdge,
    path::SweepSurfacePath,
    region::{SweepRegion, SweptRegion},
    shell_face::SweepFaceOfShell,
    sketch::SweepSketch,
    vertex::SweepVertex,
};

use std::collections::BTreeMap;

use crate::{
    objects::{Curve, Vertex},
    storage::{Handle, ObjectId},
};

/// A cache used for sweeping
#[derive(Default)]
pub struct SweepCache {
    /// Cache for curves
    pub curves: BTreeMap<ObjectId, Handle<Curve>>,

    /// Cache for vertices
    pub vertices: BTreeMap<ObjectId, Handle<Vertex>>,
}