Fix infinite loop bug in mergeFacesAndHoles#83
Fix infinite loop bug in mergeFacesAndHoles#83birgerbr wants to merge 1 commit intofolded:masterfrom
Conversation
When an element in `containing_faces` has size greater than 1 the `while (unassigned)` loop will never stop.
folded
left a comment
There was a problem hiding this comment.
It's been a long while since I looked at this code, but IIRC containing_faces maps from each face, to the faces that contain it, of which might be more than one. The aim is to connect each face to the one that it is directly nested within. As we peel away the outermost faces, there should always be at least one face that only has the outermost face as a parent. If that's not the case, then there's a cycle in the embedding graph, which would cause this, but the error is as a result of an earlier error.
Do you have an example that triggers this?
|
The case was when using ifcplusplus to extract the geometry from an IFC file from a customer. Unfortunately, I could not find any notes saying which IFC file it was. |
|
I am interested in this issue. I have observed infinite loops in carve sometimes, not sure if it is related to this. I tried the proposed fix and tested it with https://github.com/arnholm/angelcad-samples, but this proposed carve fix caused 2 samples to fail, so I think it is not 100% correct. PS. thank you for the carve library. |
When an element in
containing_faceshas a size greater than 1 thewhile (unassigned)loop will never stop.I don't know this algorithm and I'm not sure if this is the correct way of handling
this case, but it solves the infinite loop case.