View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004904 | Community | OCCT:Modeling Algorithms | public | 2003-12-23 11:33 | 2008-12-23 10:53 |
| Reporter | bugmaster | Assigned To | |||
| Priority | normal | Severity | trivial | ||
| Status | closed | Resolution | fixed | ||
| OS | All | ||||
| Summary | 0004904: Bug in edge edge intersection | ||||
| Description | Bug from Open CASCADE Community Registered by Karsten Litzba http://www.opencascade.org/forumorg/bug.php?bug_id=154 During testing OCC 5.1 my program crashed while performing some simple boolean operations. I traced back the error and found it in the function IntTools_EdgeEdge::FindSimpleRoot(...). There is an infinite loop ( while(1) {...} ) to perform a bisection alogorithm. The crux is the break condition if( fabs(b-a) < myEpsT || y==0.) { return x0; } Where b and a are the endpoints of the actual interval an myEpsT is a small fix number ( with default value 1e-12 ). This is very dangerous, due to the binary representation of floating point numbers. So, if fabs(b-a) >= myEpsT and if there is no representable number in the interval [a,b], x0 = 0.5*(a+b) yields to a or b and the function never returns from the loop. Of course it is possible to change the value of myEpsT, but this is not practicable. First reason: normally the edge-edge-intersection is performed internally by boolean operations and from this stage the user has no chance to set myEpsT. Second reson: the correct value for myEpsT depends on the input parameters of the function IntTools_EdgeEdge::FindSimpleRoot(...) and cannot determined before. A solution would be, to choose myEpsT by eps*0.5*(|a|+|b|), where eps is the smallest number, so that 1.0+eps != 1.0 (2^-52 on my computer) and a, b are the initial values for the interval, where bisection is performed ( the parameters tA and tB of the FindSimpleRoot function ). In the attached file there is a code fragment to produce the error. | ||||
| Tags | No tags attached. | ||||
| Test case number | |||||
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2003-12-23 11:33 | bugmaster | Assigned To | bugmaster => mkk |
| 2003-12-23 11:33 | bugmaster | Status | new => assigned |
| 2004-01-08 11:57 | bugmaster | CC | => apv |
| 2004-01-08 11:57 | bugmaster | Status | assigned => resolved |
| 2004-01-12 13:33 |
|
CC | => aki |
| 2004-03-05 18:56 | bugmaster | Status | resolved => closed |
| 2004-03-05 18:56 | bugmaster | Resolution | @0@ => suspended |
| 2004-03-05 18:56 | bugmaster | validate | => 1 |
| 2004-12-30 11:23 | bugmaster | Assigned To | mkk => bugmaster |
| 2004-12-30 11:23 | bugmaster | Status | closed => assigned |
| 2004-12-30 11:23 | bugmaster | Resolution | suspended => @0@ |
| 2004-12-30 11:23 | bugmaster | Assigned To | bugmaster => mkk |
| 2004-12-30 11:23 | bugmaster | Customer | => |
| 2008-12-23 12:53 | bugmaster | Status | assigned => closed |
| 2008-12-23 12:53 | bugmaster | Resolution | @0@ => fixed |
| 2011-08-02 11:31 | bugmaster | Category | OCCT:MOA => OCCT:Modeling Algorithms |