recalculate volume only if determinante != 1

This commit is contained in:
Michael Kirsch 2019-07-10 20:18:07 +02:00 committed by Joseph Lenox
parent fa45426ac0
commit e7f7acf2f7

View File

@ -206,6 +206,7 @@ void stl_transform(stl_file *stl, double const *trafo3x4) {
if(det < 0)
stl_reverse_all_facets(stl);
stl_get_size(stl);
if(det - 1.0 > 1e-04)
stl_calculate_volume(stl);
calculate_normals(stl);
}
@ -247,6 +248,7 @@ void stl_get_transform(stl_file const *stl_src, stl_file *stl_dst, double const
if(det < 0)
stl_reverse_all_facets(stl_dst);
stl_get_size(stl_dst);
if(det - 1.0 > 1e-04)
stl_calculate_volume(stl_dst);
calculate_normals(stl_dst);
}