View Issue Details

IDProjectCategoryView StatusLast Update
0023141CommunityOCCT:Modeling Algorithmspublic2013-04-29 15:21
ReporterQbProg Assigned Toaba 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2010 
Product Version6.5.3 
Target Version6.6.0Fixed in Version6.6.0 
Summary0023141: Suspicious if (2)
Descriptionsrc\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?
TagsNo tags attached.
Test case numberNot needed

Relationships

child of 0023132 closedomy Suspicious code snippets 

Activities

aba

2012-10-16 15:29

developer   ~0021794

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 )

aba

2012-10-16 15:31

developer   ~0021795

The Git branch CR23141 is ready to be reviewed.
Dear oan, please review.

oan

2012-10-16 19:43

developer   ~0021809

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?

jgv

2012-10-19 15:29

developer   ~0021855

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!

apn

2012-11-01 11:34

administrator   ~0022046

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

Related Changesets

occt: master 06c23d6a

2012-10-16 11:11:33

aba

Details Diff
0023141: Suspicious if (2)

Fixed condition which was always true
Affected Issues
0023141
mod - src/BRepFill/BRepFill_TrimEdgeTool.cxx Diff File

Issue History

Date Modified Username Field Change
2012-05-06 19:39 QbProg New Issue
2012-05-06 19:39 QbProg Assigned To => jgv
2012-05-07 09:16 abv Relationship added child of 0023132
2012-05-07 09:30 abv Assigned To jgv => dbv
2012-05-07 09:30 abv Status new => assigned
2012-05-10 10:38 abv Target Version => 6.5.4
2012-10-09 18:34 oan Assigned To dbv => aba
2012-10-16 15:29 aba Note Added: 0021794
2012-10-16 15:31 aba Note Added: 0021795
2012-10-16 15:32 aba Assigned To aba => oan
2012-10-16 19:43 oan Note Added: 0021809
2012-10-16 19:43 oan Assigned To oan => jgv
2012-10-16 19:44 oan Status assigned => resolved
2012-10-19 15:29 jgv Note Added: 0021855
2012-10-19 15:29 jgv Status resolved => reviewed
2012-10-23 15:48 mkv Assigned To jgv => mkv
2012-10-23 18:41 abv Target Version 6.5.4 => 6.6.0
2012-11-01 11:34 apn Note Added: 0022046
2012-11-01 11:34 apn Test case number => Not needed
2012-11-01 11:34 apn Assigned To mkv => bugmaster
2012-11-01 11:34 apn Status reviewed => tested
2012-11-16 13:03 aba Changeset attached => occt master 06c23d6a
2012-11-16 13:03 aba Assigned To bugmaster => aba
2012-11-16 13:03 aba Status tested => verified
2012-11-16 13:03 aba Resolution open => fixed
2012-12-10 17:16 aba Changeset attached => occt master 06c23d6a
2013-04-23 13:36 aiv Status verified => closed
2013-04-29 15:21 aiv Fixed in Version => 6.6.0