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