Infinite loop in ShapeUpgrade_UnifySameDomain

Hi

ShapeUpgrade_UnifySameDomain tool sometimes goes into infinite loop. Upon further investigation, it turns out that in function
RelocatePCurvesToNewUorigin(), there are 3 nested for loops and CurEdge is not updated in following loop

for (;;) //collect pcurves of a contour
{
//HERE, edge is not found in theVEmap, but the same map contains CurEdge's vertices with some other edges in their list
RemoveEdgeFromMap(CurEdge, theVEmap);
....

//Following returns non-zero entries
const TopTools_ListOfShape& Elist = theVEmap.FindFromKey(CurVertex);
if (Elist.IsEmpty()) {
break; //end of contour in 3d
}

.....

for (; itl.More(); itl.Next())
{
//in this, CurEdge is never updated, i.e. next edge is not found
}

//Loop continues. If we detect this condition and exit from this loop, things work
}

Boolean operation I was trying contained pipe like structure with another cylinder cut (with exactly same radius as inner radius of pipe). After the operation, tried to simplify the shape which caused this infinite loop.

Will appreciate if someone can take look and put an exit condition in these loops.

OCCT version 7.6, platform Ubuntu.

Thx

Mikhail Sazonov's picture

Hello shailesh karandikar,

Thank you very much for identifying this problem. Would you be so kind to create a bug report in the bugtracker? And it is highly needed to provide an input shape that allows reproducing the bug. You can attach the brep file in the bug report.

Regards,
Mikhail

shailesh karandikar's picture

Truely appreciate quick response.

I have filed a bug (https://tracker.dev.opencascade.org/view.php?id=32949)
Tied up ATM to provide sample BREPs for testing. Will try to provide as soon as feasible.

Thx