mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-10 17:25:57 +00:00
Update name of method
This commit is contained in:
parent
4f42f01076
commit
c93ff10f68
@ -299,7 +299,7 @@ mod tests {
|
||||
&core
|
||||
.layers
|
||||
.geometry
|
||||
.generator_for_surface(&surface)
|
||||
.of_surface_2(&surface)
|
||||
.unwrap()
|
||||
.generator,
|
||||
point_surface,
|
||||
@ -339,7 +339,7 @@ mod tests {
|
||||
&core
|
||||
.layers
|
||||
.geometry
|
||||
.generator_for_surface(&surface)
|
||||
.of_surface_2(&surface)
|
||||
.unwrap()
|
||||
.generator,
|
||||
point_surface,
|
||||
|
@ -32,7 +32,7 @@ pub fn approx_vertex(
|
||||
Some(position) => position,
|
||||
None => {
|
||||
let position_global = convert_point_surface_to_global(
|
||||
&geometry.generator_for_surface(surface).unwrap().generator,
|
||||
&geometry.of_surface_2(surface).unwrap().generator,
|
||||
position_surface,
|
||||
tolerance,
|
||||
geometry,
|
||||
|
@ -4,7 +4,7 @@ use fj_math::{Aabb, Vector};
|
||||
|
||||
use crate::{
|
||||
geometry::{
|
||||
traits::GenTriMesh, repr::tri_mesh::convert_point_surface_to_global,
|
||||
repr::tri_mesh::convert_point_surface_to_global, traits::GenTriMesh,
|
||||
Geometry, Tolerance,
|
||||
},
|
||||
topology::Face,
|
||||
@ -23,10 +23,8 @@ impl super::BoundingVolume<3> for &Face {
|
||||
(self.region().exterior().deref(), self.surface())
|
||||
.aabb(geometry)
|
||||
.map(|aabb2| {
|
||||
let surface = &geometry
|
||||
.generator_for_surface(self.surface())
|
||||
.unwrap()
|
||||
.generator;
|
||||
let surface =
|
||||
&geometry.of_surface_2(self.surface()).unwrap().generator;
|
||||
let tri_mesh =
|
||||
surface.generate_tri_mesh(aabb2, tolerance, geometry);
|
||||
let tri_mesh = tri_mesh.into_iter().map(|point| {
|
||||
|
@ -184,7 +184,7 @@ mod tests {
|
||||
&core
|
||||
.layers
|
||||
.geometry
|
||||
.generator_for_surface(&surface)
|
||||
.of_surface_2(&surface)
|
||||
.unwrap()
|
||||
.generator,
|
||||
point,
|
||||
@ -262,7 +262,7 @@ mod tests {
|
||||
&core
|
||||
.layers
|
||||
.geometry
|
||||
.generator_for_surface(&surface)
|
||||
.of_surface_2(&surface)
|
||||
.unwrap()
|
||||
.generator,
|
||||
point,
|
||||
|
@ -213,7 +213,7 @@ impl Geometry {
|
||||
}
|
||||
|
||||
/// # Access the geometry generator for the provided surface
|
||||
pub fn generator_for_surface(
|
||||
pub fn of_surface_2(
|
||||
&self,
|
||||
surface: &Handle<Surface>,
|
||||
) -> Option<&SurfaceGeom> {
|
||||
|
@ -17,7 +17,7 @@ pub struct TransformedSurface {
|
||||
|
||||
impl GenTriMesh for TransformedSurface {
|
||||
fn origin(&self, geometry: &Geometry) -> Point<3> {
|
||||
let surface = geometry.generator_for_surface(&self.surface).unwrap();
|
||||
let surface = geometry.of_surface_2(&self.surface).unwrap();
|
||||
self.transform
|
||||
.transform_point(&surface.generator.origin(geometry))
|
||||
}
|
||||
@ -28,7 +28,7 @@ impl GenTriMesh for TransformedSurface {
|
||||
tolerance: Tolerance,
|
||||
geometry: &Geometry,
|
||||
) -> (Triangle<3>, [Scalar; 3]) {
|
||||
let surface = geometry.generator_for_surface(&self.surface).unwrap();
|
||||
let surface = geometry.of_surface_2(&self.surface).unwrap();
|
||||
let (triangle, barycentric_coords) =
|
||||
surface
|
||||
.generator
|
||||
@ -47,7 +47,7 @@ impl GenTriMesh for TransformedSurface {
|
||||
) -> Vec<Point<2>> {
|
||||
// The triangle mesh is generated in 2D surface coordinates. No need to
|
||||
// transform that.
|
||||
let surface = geometry.generator_for_surface(&self.surface).unwrap();
|
||||
let surface = geometry.of_surface_2(&self.surface).unwrap();
|
||||
surface
|
||||
.generator
|
||||
.generate_tri_mesh(boundary, tolerance, geometry)
|
||||
|
@ -95,7 +95,7 @@ impl AddHole for Shell {
|
||||
&core
|
||||
.layers
|
||||
.geometry
|
||||
.generator_for_surface(location.face.surface())
|
||||
.of_surface_2(location.face.surface())
|
||||
.unwrap()
|
||||
.generator,
|
||||
location.position,
|
||||
|
@ -117,7 +117,7 @@ impl SolidValidationError {
|
||||
|
||||
Some((
|
||||
convert_point_surface_to_global(
|
||||
&geometry.generator_for_surface(s).unwrap().generator,
|
||||
&geometry.of_surface_2(s).unwrap().generator,
|
||||
local_curve_geometry.path.point_from_path_coords(
|
||||
geometry
|
||||
.of_vertex(h.start_vertex())
|
||||
|
@ -229,7 +229,7 @@ fn distances(
|
||||
.path;
|
||||
let surface_coords = path.point_from_path_coords(path_coords);
|
||||
Some(convert_point_surface_to_global(
|
||||
&geometry.generator_for_surface(surface).unwrap().generator,
|
||||
&geometry.of_surface_2(surface).unwrap().generator,
|
||||
surface_coords,
|
||||
tolerance,
|
||||
geometry,
|
||||
|
Loading…
Reference in New Issue
Block a user