Inline redundant method

This commit is contained in:
Hanno Braun 2025-03-21 21:25:47 +01:00
parent 803115c89c
commit 5fe9676949
2 changed files with 5 additions and 14 deletions

View File

@ -3,7 +3,7 @@
mod delaunay;
mod polygon;
use fj_interop::TriMesh;
use fj_interop::{MeshTriangle, TriMesh};
use crate::{Core, geometry::Tolerance, operations::presentation::GetColor};
@ -68,7 +68,10 @@ impl Triangulate for FaceApprox {
for triangle in triangles {
let points = triangle.map(|point| point.point_global);
mesh.push_triangle(points, color);
mesh.triangles.push(MeshTriangle {
inner: points.into(),
color,
});
}
}
}

View File

@ -17,18 +17,6 @@ impl TriMesh {
Self::default()
}
/// Add a triangle to the mesh
pub fn push_triangle(
&mut self,
triangle: impl Into<Triangle<3>>,
color: Color,
) {
self.triangles.push(MeshTriangle {
inner: triangle.into(),
color,
});
}
/// Determine whether the mesh contains the provided triangle
///
/// Returns true, if a triangle with any combination of the provided points