Skip to content

Commit

Permalink
recalculate volume only if determinante != 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Oekn5w authored and lordofhyphens committed Dec 2, 2019
1 parent fa45426 commit e7f7acf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xs/src/admesh/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ void stl_transform(stl_file *stl, double const *trafo3x4) {
if(det < 0)
stl_reverse_all_facets(stl);
stl_get_size(stl);
stl_calculate_volume(stl);
if(det - 1.0 > 1e-04)
stl_calculate_volume(stl);
calculate_normals(stl);
}

Expand Down Expand Up @@ -247,7 +248,8 @@ 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);
stl_calculate_volume(stl_dst);
if(det - 1.0 > 1e-04)
stl_calculate_volume(stl_dst);
calculate_normals(stl_dst);
}

Expand Down

0 comments on commit e7f7acf

Please sign in to comment.