diff --git a/thirdparty/nodemesh/nodemesh/modifier.cpp b/thirdparty/nodemesh/nodemesh/modifier.cpp index 6ce3f0ed..75f4cf9d 100644 --- a/thirdparty/nodemesh/nodemesh/modifier.cpp +++ b/thirdparty/nodemesh/nodemesh/modifier.cpp @@ -105,6 +105,8 @@ void Modifier::finalize() size_t newInsertNum = currentEdgeLength / targetEdgeLength; if (newInsertNum < 1) newInsertNum = 1; + if (newInsertNum > 100) + continue; float stepFactor = 1.0 / (newInsertNum + 1); std::vector nodeIndices; nodeIndices.push_back(edge.firstNodeIndex);