mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-06 19:08:28 +00:00
Consolidate redundant code
This commit is contained in:
parent
737ed52fa0
commit
ec3732c0b1
@ -248,31 +248,12 @@ mod tests {
|
||||
|
||||
let triangles = triangulate(face, &mut core)?;
|
||||
|
||||
let a = core
|
||||
.layers
|
||||
let [a, b, c, d, e] = [a, b, c, d, e].map(|point| {
|
||||
core.layers
|
||||
.geometry
|
||||
.of_surface(&surface)
|
||||
.point_from_surface_coords(a, core.tolerance());
|
||||
let b = core
|
||||
.layers
|
||||
.geometry
|
||||
.of_surface(&surface)
|
||||
.point_from_surface_coords(b, core.tolerance());
|
||||
let c = core
|
||||
.layers
|
||||
.geometry
|
||||
.of_surface(&surface)
|
||||
.point_from_surface_coords(c, core.tolerance());
|
||||
let d = core
|
||||
.layers
|
||||
.geometry
|
||||
.of_surface(&surface)
|
||||
.point_from_surface_coords(d, core.tolerance());
|
||||
let e = core
|
||||
.layers
|
||||
.geometry
|
||||
.of_surface(&surface)
|
||||
.point_from_surface_coords(e, core.tolerance());
|
||||
.point_from_surface_coords(point, core.tolerance())
|
||||
});
|
||||
|
||||
assert!(triangles.contains_triangle([a, b, d]));
|
||||
assert!(triangles.contains_triangle([a, d, e]));
|
||||
|
Loading…
Reference in New Issue
Block a user