fj_operations/
group.rs

1use fj_interop::debug::DebugInfo;
2use fj_kernel::{objects::FaceSet, services::Services};
3use fj_math::Aabb;
4
5use super::Shape;
6
7impl Shape for fj::Group {
8    type Brep = FaceSet;
9
10    fn compute_brep(
11        &self,
12        services: &mut Services,
13        debug_info: &mut DebugInfo,
14    ) -> Self::Brep {
15        let mut faces = FaceSet::new();
16
17        let a = self.a.compute_brep(services, debug_info);
18        let b = self.b.compute_brep(services, debug_info);
19
20        faces.extend(a);
21        faces.extend(b);
22
23        faces
24    }
25
26    fn bounding_volume(&self) -> Aabb<3> {
27        let a = self.a.bounding_volume();
28        let b = self.b.bounding_volume();
29
30        a.merged(&b)
31    }
32}