From 5fe9676949bf004a9046d94ae70cce67d006691d Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 21 Mar 2025 21:25:47 +0100 Subject: [PATCH] Inline redundant method --- crates/fj-core/src/algorithms/triangulate/mod.rs | 7 +++++-- crates/fj-interop/src/tri_mesh.rs | 12 ------------ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/crates/fj-core/src/algorithms/triangulate/mod.rs b/crates/fj-core/src/algorithms/triangulate/mod.rs index 581e0af65..951dae1fe 100644 --- a/crates/fj-core/src/algorithms/triangulate/mod.rs +++ b/crates/fj-core/src/algorithms/triangulate/mod.rs @@ -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, + }); } } } diff --git a/crates/fj-interop/src/tri_mesh.rs b/crates/fj-interop/src/tri_mesh.rs index cac8f20e9..c6006c4eb 100644 --- a/crates/fj-interop/src/tri_mesh.rs +++ b/crates/fj-interop/src/tri_mesh.rs @@ -17,18 +17,6 @@ impl TriMesh { Self::default() } - /// Add a triangle to the mesh - pub fn push_triangle( - &mut self, - triangle: impl Into>, - 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