MantisBT - Community
View Issue Details
0023141Community[OCCT] OCCT:Modeling Algorithmspublic2012-05-06 19:392013-04-29 15:21
QbProg 
aba 
normalminor 
closedfixed 
WindowsVC++ 201032 bit
[OCCT] 6.5.3 
[OCCT] 6.6.0[OCCT] 6.6.0 
Not needed
0023141: Suspicious if (2)
src\BRepFill\BRepFill_TrimEdgeTool.cxx , line 364

  if(AC1.GetType() != GeomAbs_Circle ||
     AC1.GetType() != GeomAbs_Line ||
     AC2.GetType() != GeomAbs_Circle ||
     AC2.GetType() != GeomAbs_Line ) {

    TolInit = 1.e-8;
    nn = 6;
  }

Condition is always true, what was the original intention?
No tags attached.
child of 0023132closed omy Suspicious code snippets 
Issue History
2012-05-06 19:39QbProgNew Issue
2012-05-06 19:39QbProgAssigned To => jgv
2012-05-07 09:16abvRelationship addedchild of 0023132
2012-05-07 09:30abvAssigned Tojgv => dbv
2012-05-07 09:30abvStatusnew => assigned
2012-05-10 10:38abvTarget Version => 6.5.4
2012-10-09 18:34oanAssigned Todbv => aba
2012-10-16 15:29abaNote Added: 0021794
2012-10-16 15:31abaNote Added: 0021795
2012-10-16 15:32abaAssigned Toaba => oan
2012-10-16 19:43oanNote Added: 0021809
2012-10-16 19:43oanAssigned Tooan => jgv
2012-10-16 19:44oanStatusassigned => resolved
2012-10-19 15:29jgvNote Added: 0021855
2012-10-19 15:29jgvStatusresolved => reviewed
2012-10-23 15:48mkvAssigned Tojgv => mkv
2012-10-23 18:41abvTarget Version6.5.4 => 6.6.0
2012-11-01 11:34apnNote Added: 0022046
2012-11-01 11:34apnTest case number => Not needed
2012-11-01 11:34apnAssigned Tomkv => bugmaster
2012-11-01 11:34apnStatusreviewed => tested
2012-11-16 13:03abaChangeset attached => occt master 06c23d6a
2012-11-16 13:03abaAssigned Tobugmaster => aba
2012-11-16 13:03abaStatustested => verified
2012-11-16 13:03abaResolutionopen => fixed
2012-12-10 17:16abaChangeset attached => occt master 06c23d6a
2013-04-23 13:36aivStatusverified => closed
2013-04-29 15:21aivFixed in Version => 6.6.0

Notes
(0021794)
aba   
2012-10-16 15:29   
The condition seems to be wrong as it always returns true.
After changes the condition means: if the AC1 type or AC2 type is neither 'circle' nor 'line' variables, 'TolInit' and 'nn' are changed;
so, it becomes:
   if(AC1.GetType() != GeomAbs_Circle &&
     AC1.GetType() != GeomAbs_Line ||
     AC2.GetType() != GeomAbs_Circle &&
     AC2.GetType() != GeomAbs_Line )
(0021795)
aba   
2012-10-16 15:31   
The Git branch CR23141 is ready to be reviewed.
Dear oan, please review.
(0021809)
oan   
2012-10-16 19:43   
Dear ABA,
Please use brackets to separate distinct conditions. I suppose that solution above is made ​​regarding to priority of operators but it's not obvious and I don't sure that it's really right.

Dear JGV,
Please consider the fix from consistency side of BRepFill_TrimEdgeTool.
Is the condition described in previous note right?
(0021855)
jgv   
2012-10-19 15:29   
It seems that condition was conceived this very way. But this change may cause a lot of regressions in cases of 2d offset (may be some improvements too). We'll see!
(0022046)
apn   
2012-11-01 11:34   
Dear BugMaster,
Branch CR23141 (and products from GIT master) was compiled on Linux and Windows platforms and tested.

Regression:
Not detected

Improvements:
Not detected

Testing case:
Not needed