diff --git a/crates/fj-kernel/src/algorithms/intersect/curve_face.rs b/crates/fj-kernel/src/algorithms/intersect/curve_face.rs index 52d4b2709..b5cf9b76f 100644 --- a/crates/fj-kernel/src/algorithms/intersect/curve_face.rs +++ b/crates/fj-kernel/src/algorithms/intersect/curve_face.rs @@ -188,7 +188,10 @@ mod tests { let face = { let mut face = PartialFace::default(); face.with_exterior_polygon_from_points(surface.clone(), exterior); - face.with_interior_polygon_from_points(surface, interior); + face.with_interior_polygon_from_points( + Partial::from_full_entry_point(surface), + interior, + ); face.build(&mut services.objects) }; diff --git a/crates/fj-kernel/src/algorithms/triangulate/mod.rs b/crates/fj-kernel/src/algorithms/triangulate/mod.rs index 6b6e8528d..f663c3714 100644 --- a/crates/fj-kernel/src/algorithms/triangulate/mod.rs +++ b/crates/fj-kernel/src/algorithms/triangulate/mod.rs @@ -80,7 +80,7 @@ mod tests { builder::FaceBuilder, insert::Insert, objects::Face, - partial::{PartialFace, PartialObject}, + partial::{Partial, PartialFace, PartialObject}, services::Services, storage::Handle, }; @@ -135,7 +135,10 @@ mod tests { let surface = services.objects.surfaces.xy_plane(); let mut face = PartialFace::default(); face.with_exterior_polygon_from_points(surface.clone(), [a, b, c, d]); - face.with_interior_polygon_from_points(surface.clone(), [e, f, g, h]); + face.with_interior_polygon_from_points( + Partial::from_full_entry_point(surface.clone()), + [e, f, g, h], + ); let face = face .build(&mut services.objects) .insert(&mut services.objects); diff --git a/crates/fj-kernel/src/builder/face.rs b/crates/fj-kernel/src/builder/face.rs index 9130f1a94..ebbac4eca 100644 --- a/crates/fj-kernel/src/builder/face.rs +++ b/crates/fj-kernel/src/builder/face.rs @@ -20,7 +20,7 @@ pub trait FaceBuilder { /// Update the [`PartialFace`] with an interior polygon fn with_interior_polygon_from_points( &mut self, - surface: Handle, + surface: Partial, points: impl IntoIterator>>, ); } @@ -43,14 +43,11 @@ impl FaceBuilder for PartialFace { fn with_interior_polygon_from_points( &mut self, - surface: Handle, + surface: Partial, points: impl IntoIterator>>, ) { let mut cycle = PartialCycle::default(); - cycle.with_poly_chain_from_points( - Partial::from_full_entry_point(surface), - points, - ); + cycle.with_poly_chain_from_points(surface, points); cycle.close_with_line_segment(); self.interiors = vec![Partial::from_partial(cycle)]; diff --git a/crates/fj-kernel/src/validate/face.rs b/crates/fj-kernel/src/validate/face.rs index 1126f4f89..a89e42d4d 100644 --- a/crates/fj-kernel/src/validate/face.rs +++ b/crates/fj-kernel/src/validate/face.rs @@ -126,7 +126,7 @@ mod tests { [[0., 0.], [3., 0.], [0., 3.]], ); face.with_interior_polygon_from_points( - surface, + Partial::from_full_entry_point(surface), [[1., 1.], [1., 2.], [2., 1.]], ); @@ -166,7 +166,7 @@ mod tests { [[0., 0.], [3., 0.], [0., 3.]], ); face.with_interior_polygon_from_points( - surface, + Partial::from_full_entry_point(surface), [[1., 1.], [1., 2.], [2., 1.]], ); face.build(&mut services.objects)