Skip to content

Commit

Permalink
fix some accuracy issue in trimesh center-of-mass calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
sebcrozet committed Apr 28, 2024
1 parent d9a800f commit 9f53a76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mass_properties/mass_properties_trimesh3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ pub fn trimesh_signed_volume_and_center_of_mass(
vertices: &[Point<Real>],
indices: &[[u32; DIM]],
) -> (Real, Point<Real>) {
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;
Expand Down

0 comments on commit 9f53a76

Please sign in to comment.