diff --git a/crates/fj-core/src/algorithms/approx/curve.rs b/crates/fj-core/src/algorithms/approx/curve.rs index 51bc212c7..ba205e981 100644 --- a/crates/fj-core/src/algorithms/approx/curve.rs +++ b/crates/fj-core/src/algorithms/approx/curve.rs @@ -267,7 +267,12 @@ mod tests { .map(|(point_local, _)| { let point_surface = path.point_from_path_coords(point_local); let point_global = convert_point_surface_to_global( - core.layers.geometry.of_surface(&surface), + &core + .layers + .geometry + .of_surface_2(&surface) + .unwrap() + .geometry, point_surface, tolerance, ); @@ -295,7 +300,12 @@ mod tests { .map(|(point_local, _)| { let point_surface = path.point_from_path_coords(point_local); let point_global = convert_point_surface_to_global( - core.layers.geometry.of_surface(&surface), + &core + .layers + .geometry + .of_surface_2(&surface) + .unwrap() + .geometry, point_surface, tolerance, ); diff --git a/crates/fj-core/src/algorithms/approx/vertex.rs b/crates/fj-core/src/algorithms/approx/vertex.rs index 8011be17a..532ed6c55 100644 --- a/crates/fj-core/src/algorithms/approx/vertex.rs +++ b/crates/fj-core/src/algorithms/approx/vertex.rs @@ -32,7 +32,7 @@ pub fn approx_vertex( Some(position) => position, None => { let position_global = convert_point_surface_to_global( - geometry.of_surface(surface), + &geometry.of_surface_2(surface).unwrap().geometry, position_surface, tolerance, ); diff --git a/crates/fj-core/src/algorithms/bounding_volume/face.rs b/crates/fj-core/src/algorithms/bounding_volume/face.rs index b1a0ebf4c..ab0d70aa5 100644 --- a/crates/fj-core/src/algorithms/bounding_volume/face.rs +++ b/crates/fj-core/src/algorithms/bounding_volume/face.rs @@ -23,7 +23,8 @@ impl super::BoundingVolume<3> for &Face { (self.region().exterior().deref(), self.surface()) .aabb(geometry) .map(|aabb2| { - let surface = geometry.of_surface(self.surface()); + let surface = + &geometry.of_surface_2(self.surface()).unwrap().geometry; let tri_mesh = surface.generate_tri_mesh(aabb2, tolerance); let tri_mesh = tri_mesh.into_iter().map(|point| { convert_point_surface_to_global(surface, point, tolerance) diff --git a/crates/fj-core/src/algorithms/triangulate/mod.rs b/crates/fj-core/src/algorithms/triangulate/mod.rs index 7cbdf3e98..888dfac89 100644 --- a/crates/fj-core/src/algorithms/triangulate/mod.rs +++ b/crates/fj-core/src/algorithms/triangulate/mod.rs @@ -181,7 +181,12 @@ mod tests { let [a, b, e, f, g, h] = [a, b, e, f, g, h].map(|point| { convert_point_surface_to_global( - core.layers.geometry.of_surface(&surface), + &core + .layers + .geometry + .of_surface_2(&surface) + .unwrap() + .geometry, point, core.tolerance(), ) @@ -253,7 +258,12 @@ mod tests { let [a, b, c, d, e] = [a, b, c, d, e].map(|point| { convert_point_surface_to_global( - core.layers.geometry.of_surface(&surface), + &core + .layers + .geometry + .of_surface_2(&surface) + .unwrap() + .geometry, point, core.tolerance(), ) diff --git a/crates/fj-core/src/operations/holes.rs b/crates/fj-core/src/operations/holes.rs index d7011f998..0ff2bbbe6 100644 --- a/crates/fj-core/src/operations/holes.rs +++ b/crates/fj-core/src/operations/holes.rs @@ -92,7 +92,12 @@ impl AddHole for Shell { let path = { let point = |location: &HoleLocation| { convert_point_surface_to_global( - core.layers.geometry.of_surface(location.face.surface()), + &core + .layers + .geometry + .of_surface_2(location.face.surface()) + .unwrap() + .geometry, location.position, core.tolerance(), ) diff --git a/crates/fj-core/src/validate/solid.rs b/crates/fj-core/src/validate/solid.rs index c76af7cb3..df902637d 100644 --- a/crates/fj-core/src/validate/solid.rs +++ b/crates/fj-core/src/validate/solid.rs @@ -117,7 +117,7 @@ impl SolidValidationError { Some(( convert_point_surface_to_global( - geometry.of_surface(s), + &geometry.of_surface_2(s).unwrap().geometry, local_curve_geometry.path.point_from_path_coords( geometry .of_vertex(h.start_vertex()) diff --git a/crates/fj-core/src/validation/checks/coincident_half_edges_are_not_siblings.rs b/crates/fj-core/src/validation/checks/coincident_half_edges_are_not_siblings.rs index f8fb7ed1b..2214ae981 100644 --- a/crates/fj-core/src/validation/checks/coincident_half_edges_are_not_siblings.rs +++ b/crates/fj-core/src/validation/checks/coincident_half_edges_are_not_siblings.rs @@ -229,7 +229,7 @@ fn distances( .path; let surface_coords = path.point_from_path_coords(path_coords); Some(convert_point_surface_to_global( - geometry.of_surface(surface), + &geometry.of_surface_2(surface).unwrap().geometry, surface_coords, tolerance, ))