Face building speed improvements

This week I worked on improving the face processing in the DetectColidingCandidates method. This method checked for overlapping faces in the list of faces detected by the CandidateProcessing recursive method. The problem was that if we had many faces – for example, for four rectangles which had many common edges we had 28 generated faces – the number of checked combinations was very big – for the 28 faces it was 378. The solution for this was to create a list with all the faces, ordered descending by area. Each face in the list was compared to the face with the largest area and if it was contained in it, it was marked as processed and not checked on future passes through the list. Using this algorithm the number of checks was reduced to 30.

During these changes I found a problem in the BRepAlgoAPICommon method – in some cases, it returned the wrong result and by using it to compare shapes we got wrong results. I have replaced it with BRepAlgoAPIFuse and changed the checks accordingly.

Most of the tested cases work correctly now and the speed is much better. There are some more speed improvements that I want to test and some fixes needed for special shapes.

  0 COMMENTS
Status report

Leave a Reply

Pages
Blogroll





The best Android Market
AndroidPit