Gizmo measure fixed to work with mirrored objects

This commit is contained in:
enricoturri1966 2022-12-06 14:07:51 +01:00
parent 5351137183
commit b7740743b8

View File

@ -1052,6 +1052,10 @@ void GLGizmoMeasure::update_if_needed()
TriangleMesh volume_mesh = vol.volume->mesh(); TriangleMesh volume_mesh = vol.volume->mesh();
volume_mesh.transform(vol.world_trafo); volume_mesh.transform(vol.world_trafo);
if (vol.world_trafo.matrix().determinant() < 0.0)
volume_mesh.flip_triangles();
composite_mesh.merge(volume_mesh); composite_mesh.merge(volume_mesh);
} }