From 9f53a76296f44435d4370bd467129a601a9cde10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Sun, 28 Apr 2024 10:53:43 +0200 Subject: [PATCH] fix some accuracy issue in trimesh center-of-mass calculation --- src/mass_properties/mass_properties_trimesh3d.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mass_properties/mass_properties_trimesh3d.rs b/src/mass_properties/mass_properties_trimesh3d.rs index 502fbc9e..aa7416d9 100644 --- a/src/mass_properties/mass_properties_trimesh3d.rs +++ b/src/mass_properties/mass_properties_trimesh3d.rs @@ -156,7 +156,7 @@ pub fn trimesh_signed_volume_and_center_of_mass( vertices: &[Point], indices: &[[u32; DIM]], ) -> (Real, Point) { - let geometric_center = Point::new(-10.0, -10.0, -10.0); // utils::center(vertices); + let geometric_center = crate::utils::center(vertices); let mut res = Point::origin(); let mut vol = 0.0;