diff --git a/crates/fj-operations/src/difference_2d.rs b/crates/fj-operations/src/difference_2d.rs index d4518dc61..7c6bb8638 100644 --- a/crates/fj-operations/src/difference_2d.rs +++ b/crates/fj-operations/src/difference_2d.rs @@ -18,7 +18,7 @@ impl Shape for fj::Difference2d { fn compute_brep( &self, - objects: &Objects, + objects: &mut Objects, debug_info: &mut DebugInfo, ) -> Result { // This method assumes that `b` is fully contained within `a`: diff --git a/crates/fj-operations/src/group.rs b/crates/fj-operations/src/group.rs index f34be965f..b675b5f8a 100644 --- a/crates/fj-operations/src/group.rs +++ b/crates/fj-operations/src/group.rs @@ -12,7 +12,7 @@ impl Shape for fj::Group { fn compute_brep( &self, - objects: &Objects, + objects: &mut Objects, debug_info: &mut DebugInfo, ) -> Result { let mut faces = FaceSet::new(); diff --git a/crates/fj-operations/src/lib.rs b/crates/fj-operations/src/lib.rs index 1dc50ef78..50f5eb923 100644 --- a/crates/fj-operations/src/lib.rs +++ b/crates/fj-operations/src/lib.rs @@ -44,7 +44,7 @@ pub trait Shape { /// Compute the boundary representation of the shape fn compute_brep( &self, - objects: &Objects, + objects: &mut Objects, debug_info: &mut DebugInfo, ) -> Result; @@ -60,7 +60,7 @@ impl Shape for fj::Shape { fn compute_brep( &self, - objects: &Objects, + objects: &mut Objects, debug_info: &mut DebugInfo, ) -> Result { match self { @@ -96,7 +96,7 @@ impl Shape for fj::Shape2d { fn compute_brep( &self, - objects: &Objects, + objects: &mut Objects, debug_info: &mut DebugInfo, ) -> Result { match self { diff --git a/crates/fj-operations/src/shape_processor.rs b/crates/fj-operations/src/shape_processor.rs index 87c17fd21..21e32f1fb 100644 --- a/crates/fj-operations/src/shape_processor.rs +++ b/crates/fj-operations/src/shape_processor.rs @@ -42,9 +42,9 @@ impl ShapeProcessor { Some(user_defined_tolerance) => user_defined_tolerance, }; - let objects = Objects::new(); + let mut objects = Objects::new(); let mut debug_info = DebugInfo::new(); - let shape = shape.compute_brep(&objects, &mut debug_info)?; + let shape = shape.compute_brep(&mut objects, &mut debug_info)?; let mesh = (&shape, tolerance).triangulate(); Ok(ProcessedShape { diff --git a/crates/fj-operations/src/sketch.rs b/crates/fj-operations/src/sketch.rs index 041fca4eb..2e41b3943 100644 --- a/crates/fj-operations/src/sketch.rs +++ b/crates/fj-operations/src/sketch.rs @@ -17,7 +17,7 @@ impl Shape for fj::Sketch { fn compute_brep( &self, - objects: &Objects, + objects: &mut Objects, _: &mut DebugInfo, ) -> Result { let surface = objects.surfaces.xy_plane(); diff --git a/crates/fj-operations/src/sweep.rs b/crates/fj-operations/src/sweep.rs index b3d2dc35e..97025a3da 100644 --- a/crates/fj-operations/src/sweep.rs +++ b/crates/fj-operations/src/sweep.rs @@ -16,7 +16,7 @@ impl Shape for fj::Sweep { fn compute_brep( &self, - objects: &Objects, + objects: &mut Objects, debug_info: &mut DebugInfo, ) -> Result { let sketch = self.shape().compute_brep(objects, debug_info)?; diff --git a/crates/fj-operations/src/transform.rs b/crates/fj-operations/src/transform.rs index 5cde79679..f930b735f 100644 --- a/crates/fj-operations/src/transform.rs +++ b/crates/fj-operations/src/transform.rs @@ -13,7 +13,7 @@ impl Shape for fj::Transform { fn compute_brep( &self, - objects: &Objects, + objects: &mut Objects, debug_info: &mut DebugInfo, ) -> Result { let faces = self