Skip to content

Commit

Permalink
Improve log msgs during the simplification/preprocessing stage
Browse files Browse the repository at this point in the history
Previously, the new no. of faces printed after remove duplicates
didn't take into account the removal of repeated faces w/ opposite
orientation and of degenerate faces, i.e. those w/ repeated vertices
or too small an area.

In addition, the edge collapsing and swapping log msgs used to
speak of faces, which while technically correct, could be confusing
since we're talking 2d faces, i.e. edges.
  • Loading branch information
nmnobre committed Jul 5, 2023
1 parent 3bbb9b1 commit 1f81d74
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Simplification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,12 @@ bool floatTetWild::remove_duplicates(std::vector<Vector3>& input_vertices, std::
input_tags.push_back(old_input_tags[i]);
}

logger().info("remove degenerate triangles and duplicated opposite-oriented triangles:\n"
"the removal of degenerate triangles might leave lone vertices\n"
"these will be removed just before the next remove duplicates");
logger().info("#v: {} -> {}", V_in.rows(), input_vertices.size());
logger().info("#f: {} -> {}", F_in.rows(), input_faces.size());

return true;
}

Expand Down Expand Up @@ -491,7 +497,7 @@ void floatTetWild::collapsing(std::vector<Vector3>& input_vertices, std::vector<
// cout<<fail_flip<<endl;
// cout<<fail_env<<endl;
// std::cout<<"#v: "<<build_time<<std::endl;
logger().debug("{} faces are collapsed!!", cnt_suc);
logger().debug("{} edges ({} faces) were collapsed!!", cnt_suc, 2*cnt_suc);
}

void floatTetWild::swapping(std::vector<Vector3>& input_vertices, std::vector<Vector3i>& input_faces,
Expand Down Expand Up @@ -615,7 +621,7 @@ void floatTetWild::swapping(std::vector<Vector3>& input_vertices, std::vector<Ve
// check_surface(input_vertices, input_faces, f_is_removed, tree, params);
}

logger().debug("{} faces are swapped!!", cnt);
logger().debug("{} edges/faces were swapped!!", cnt);
return;

///////////////////
Expand Down

0 comments on commit 1f81d74

Please sign in to comment.