diff --git a/src/lunarmp/model/ModelSimplification.cpp b/src/lunarmp/model/ModelSimplification.cpp index 6be8c51..0421129 100644 --- a/src/lunarmp/model/ModelSimplification.cpp +++ b/src/lunarmp/model/ModelSimplification.cpp @@ -93,8 +93,13 @@ void ModelSimplification::modelSimplification(std::string input_file, std::strin } case SimplifyType::EDGE_RATIO_STOP: { auto edge_ratio_threshold = data_group.settings.get("edge_ratio_threshold"); -// edgeCollapseGarlandHeckbert(mesh, edge_ratio_threshold); - edgeCollapseBoundedNormalChange(mesh, mesh.edges().size() * edge_ratio_threshold); + double edge_count_threshold = mesh.number_of_edges() * edge_ratio_threshold; + if (edge_count_threshold < 1000) { + edgeCollapseGarlandHeckbert(mesh, edge_ratio_threshold); + } + else { + edgeCollapseBoundedNormalChange(mesh, edge_count_threshold); + } simplification_time = t.time(); break; }