team79 / PolygonOverlayAnalysis

17 stars 8 forks source link

[Bug]solve_or陷入无限死循环 #1

Open PerhapsCaiv opened 6 years ago

PerhapsCaiv commented 6 years ago

A.txt B.txt

hi,我在构建自己的polygon进行xor时,但是函数陷入无限死循环,最终因内存不足挂掉 ,以下是构造代码 if (1) { MPolygon p11, p22; Edge temp; { std::ifstream infile("c:\A.txt"); char buffer[256]; double test[256]; int index = 0; while (!infile.eof()) { infile.getline(buffer, 256); test[index] = atof(buffer); index++; } for (int i = 0; i < index; i += 4) { temp.LPoint.x = test[i]; temp.LPoint.y = test[i + 1]; temp.RPoint.x = test[i + 2]; temp.RPoint.y = test[i + 3]; p11.external_circle.circle_edge.push_back(temp); } } { std::ifstream infile("c:\B.txt"); char buffer[256]; double test[256]; int index = 0; while (!infile.eof()) { infile.getline(buffer, 256); test[index] = atof(buffer); index++; } for (int i = 0; i < index; i += 4){ temp.LPoint.x = test[i]; temp.LPoint.y = test[i + 1]; temp.RPoint.x = test[i + 2]; temp.RPoint.y = test[i + 3]; p22.external_circle.circle_edge.push_back(temp); } } RedrawWindow(); CClientDC cdc(this); solve_or(p11, p22, &cdc); return; }

team79 commented 6 years ago

很抱歉,才看到。你解决这个问题了吗?如果没有我过段时间看看。

13037639065 commented 3 years ago

减法确实死循环