Fix invalid cut face calculation cause infinite loop

master
Jeremy Hu 2019-06-10 21:25:09 +09:30
parent ec1eace6bb
commit 6fc65df6e2
1 changed files with 2 additions and 0 deletions

View File

@ -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<size_t> nodeIndices;
nodeIndices.push_back(edge.firstNodeIndex);