fj-kernel 0.46.0

Early-stage, next-generation, code-first CAD application. Because the world needs another CAD program.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{
    objects::{Shell, Solid},
    storage::Handle,
};

/// Update a [`Solid`]
pub trait UpdateSolid {
    /// Add a shell to the solid
    fn add_shell(&self, shell: Handle<Shell>) -> Solid;
}

impl UpdateSolid for Solid {
    fn add_shell(&self, shell: Handle<Shell>) -> Solid {
        let shells = self.shells().cloned().chain([shell]);
        Solid::new(shells)
    }
}