View Issue Details

IDProjectCategoryView StatusLast Update
0032345CommunityOCCT:Modeling Algorithmspublic2021-05-05 16:46
ReporterFredK Assigned Tomsv 
PrioritynormalSeverityblock 
Status newResolutionopen 
PlatformWindowsOSWindows10 
Product Version7.5.0 
Summary0032345: CellsBuilder infinite loop
Description
explanation of the problem:

The text below explains how we use the CellsBuilder in our code. The script for the Draw tool performs the same operation and also experiences the same problem.

In our code we use the BOPAlgo_CellsBuilder to compute the differences between two TopoDS_Solids. First of all we correct both solids with a default ShapeFix_Shape.

After fixing the shapes we make a CellsBuilder with the following settings:

    -set the fuzzyValue to 1.0e-4

    -enable the use of OBB

    -disbale parallel running

    -disable CheckInverted

Then we add both arguments and use the perform function on the CellsBuilder. For some solids (the files included with this report are an example of this) the cellsBuilder seems to end up in an infinite/near infinite loop.

The solids attached to this report don't give a result after waiting at least 15 minutes (in code & in the draw script).

From what we could gather the OpenCascade code ends up in a nested for loop that has to perform a very large amount of iterations. This loop is located in IntTools_BeanFaceIntersector.cpp in the MergeSolutions() function.

To prevent this from happening we did the following:

We modified a few files to call a UserBreak() on a Message_ProgressScope in MergeSolutions() every few thousand iterations. This way we can preemtively end the CellsBuilder operation on our end if it takes longer than expected.

This modification works fine, but it would obviously be better if this modification was not needed in the first place. Even if these solids are not fit for the CellsBuilder operation it is expected that the function returns
an error or a result in a reasonable amount of time. Hence this report.

We hope that this report contains some helpful information so that this problem can be resolved in an upcoming version of OpenCascade.


Steps To Reproduce    pload ALL
    cd C:/OCCTestTemp/OpenCascadeCellsBuilderIssue/
    restore original.brep
    restore corrected.brep
    fixshape fixedInput original
    fixshape fixedOutput corrected


    bclearobjects
    bcleartools
    ;#settings
    bfuzzyvalue 1.0e-4
    buseobb 1
    brunparallel 0 ;
    bcheckinverted 0

    ;#CellsBuilder
    baddobjects fixedInput fixedOutput
    bfillds ;#THIS COMMAND TAKES A VERY LONG TIME (>= 30 minutes!)
    bcbuild r


    ;#ComputeResults example
    bcadd result fixedInput 1 fixedOutput 1 -m 1 ;#common
TagsNo tags attached.
Test case number

Attached Files

  • Miel.zip (821,828 bytes)

Activities

FredK

2021-05-05 16:46

reporter  

Miel.zip (821,828 bytes)

Issue History

Date Modified Username Field Change
2021-05-05 16:46 FredK New Issue
2021-05-05 16:46 FredK Assigned To => msv
2021-05-05 16:46 FredK File Added: Miel.zip