View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023453 | Community | OCCT:Modeling Algorithms | public | 2012-09-29 09:41 | 2012-11-16 13:17 |
Reporter | Assigned To | ||||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.5.3 | ||||
Target Version | 6.5.4 | Fixed in Version | 6.5.4 | ||
Summary | 0023453: Infinite loop on cut operation | ||||
Description | The problem is reported by Paul Jimenez on OCCT forum http://www.opencascade.org/org/forum/thread_16268 -- I am using BRepAlgoAPI_Cut to cut a Compound of Faces with another Compound of Faces. The process occurs interactively. I was forcing the application to perform the algorithm over and over again with different faces that constantly changed. After a few seconds of doing this the application stopped responding. Fortunately, it was running in the debugger, so I was able to find the place it got stuck in. The function where it occurs is IntTools_FClass2d::Init. The loop begins at line 188 in my copy of inttools_fclass2d.cxx. It is as follows: do { gp_Pnt P3db=C3d.Value(u); if(P3da.SquareDistance(P3db)) { degenerated=Standard_False; break; } u+=du; } while(u<plbid); Local variables: plbid: 6451.7439502819680 u: 6451.7439502819643 du: 3.6379788070917132e-013 "u+=du" is not updating "u"s value because du is too small. plbid and u are the same up to the 11th decimal, which should be enough to exit the loop. In other words, a precision problem is causing this infinite loop. ... Proposed patch: File: inttools_fclass2d.cxx Line: 183 From: du=(plbid-pfbid)*0.1; To: du=(plbid-pfbid+BRep_Tool::Tolerance(edge))*0.1; I am not sure if that's the best tolerance value to use there, but at least it will guarantee a decent du. | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
The fix is integrated to branch CR23453, please review. Note that no test case is available, thus the fix is speculative: do {} while {} loop is replaced by for {} to make sure it is always finite. |
|
Reviewed with correction of misprint |
|
Dear BugMaster, Branch CR23453 (and products from GIT master) was compiled on Linux and Windows platforms and tested. Regressions: Not detected Improvements: Not detected Testing cases: Not needed |
occt: master 2478cd9d 2012-10-05 09:58:17
Committer: abv Details Diff |
0023453: Infinite loop on cut operation In IntTools_FClass2d.cxx, do {} while {} cycle is replaced by for () cycle to avoid possible infinite loop. Check for degeneration is made with Precision::Confusion() precision instead of comparison with 0. Correction of misprint |
Affected Issues 0023453 |
|
mod - src/IntTools/IntTools_FClass2d.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-09-29 09:41 |
|
New Issue | |
2012-09-29 09:41 |
|
Assigned To | => jgv |
2012-09-29 09:58 |
|
Note Added: 0021600 | |
2012-09-29 09:58 |
|
Status | new => resolved |
2012-09-29 11:02 |
|
Note Edited: 0021600 | |
2012-10-03 10:28 |
|
Note Added: 0021628 | |
2012-10-03 10:28 |
|
Status | resolved => reviewed |
2012-10-03 18:13 |
|
Assigned To | jgv => mkv |
2012-10-03 18:13 |
|
Test case number | => Not needed |
2012-10-04 17:42 |
|
Note Added: 0021660 | |
2012-10-04 17:43 |
|
Assigned To | mkv => bugmaster |
2012-10-04 17:43 |
|
Status | reviewed => tested |
2012-10-08 16:14 |
|
Changeset attached | => occt master 2478cd9d |
2012-10-08 16:15 |
|
Assigned To | bugmaster => abv |
2012-10-08 16:15 |
|
Status | tested => verified |
2012-10-08 16:15 |
|
Resolution | open => fixed |
2012-11-16 13:14 | bugmaster | Fixed in Version | => 6.5.4 |
2012-11-16 13:17 | bugmaster | Status | verified => closed |