MantisBT - Community
View Issue Details
0023853Community[OCCT] OCCT:Modeling Algorithmspublic2013-03-22 17:342013-04-29 15:24
Pawel 
omy 
immediateminor 
closedfixed 
WindowsVC++ 200832 bit
[OCCT] 6.5.5 
[OCCT] 6.6.0[OCCT] 6.6.0 
bugs modalg_5 bug23853_1 bug23853_2 bug23853_3 bug23853_4
0023853: BOP regression (2) - BRepAlgoAPI_Cut
The algorithm kind of fuses shapes instead of cutting them.

This problem was introduced on 21762.
pload ALL
restore cylinder.brep s1
restore pipe.brep s2
bop s1 s2
bopcut result
checkshape result
vinit
vdisplay result
vsetdispmode result 1
Changes:
  class BOPTools_AlgoTools.

 Changed the way of finding the angle between the faces.
 Added new static functions:
 GetFaceDir - builds direction for the face;
 FindPointInFace - finds the point in the face in bi normal direction.
No tags attached.
child of 0021762closed emv Open CASCADE Integration new Boolean Operation algorithm to OCC 
? cylinder.brep (2,474) 2013-03-22 17:34
https://tracker.dev.opencascade.org/
? pipe.brep (183,152) 2013-03-22 17:34
https://tracker.dev.opencascade.org/
? cylinder1.brep (1,335) 2013-03-24 03:07
https://tracker.dev.opencascade.org/
? pipe1.brep (176,094) 2013-03-24 03:07
https://tracker.dev.opencascade.org/
? cylinder2.brep (356,437) 2013-03-24 12:18
https://tracker.dev.opencascade.org/
? pipe2.brep (161,886) 2013-03-24 12:19
https://tracker.dev.opencascade.org/
Issue History
2013-03-22 17:34PawelNew Issue
2013-03-22 17:34PawelAssigned To => bugmaster
2013-03-22 17:34PawelFile Added: cylinder.brep
2013-03-22 17:34PawelFile Added: pipe.brep
2013-03-22 17:34PawelRelationship addedchild of 0021762
2013-03-22 17:41bugmasterAssigned Tobugmaster => emv
2013-03-22 17:41bugmasterStatusnew => assigned
2013-03-23 07:05abvPrioritynormal => immediate
2013-03-23 07:05abvTarget Version => 6.6.0
2013-03-23 09:00abvNote Added: 0023878
2013-03-24 03:07PawelFile Added: cylinder1.brep
2013-03-24 03:07PawelFile Added: pipe1.brep
2013-03-24 12:18PawelFile Added: cylinder2.brep
2013-03-24 12:19PawelFile Added: pipe2.brep
2013-04-09 10:46emvNote Added: 0024034
2013-04-09 10:46emvAssigned Toemv => pkv
2013-04-09 10:46emvStatusassigned => resolved
2013-04-09 10:46emvAdditional Information Updatedbug_revision_view_page.php?rev_id=5286#r5286
2013-04-09 10:55pkvAssigned Topkv => mkv
2013-04-09 10:55pkvStatusresolved => reviewed
2013-04-09 11:12apnAssigned Tomkv => apn
2013-04-09 11:23emvNote Added: 0024035
2013-04-10 01:32PawelNote Added: 0024060
2013-04-11 10:11apnNote Added: 0024081
2013-04-11 10:11apnAssigned Toapn => emv
2013-04-11 10:11apnStatusreviewed => assigned
2013-04-11 10:17emvNote Added: 0024082
2013-04-11 10:18emvAssigned Toemv => apn
2013-04-11 10:18emvStatusassigned => feedback
2013-04-11 12:07apnTest case number => bugs modalg_5 bug23853_1 bug23853_2 bug23853_3 bug23853_4
2013-04-12 12:04apnNote Added: 0024105
2013-04-12 12:04apnAssigned Toapn => bugmaster
2013-04-12 12:04apnStatusfeedback => tested
2013-04-15 17:59omyChangeset attached => occt master df017cc9
2013-04-15 17:59omyAssigned Tobugmaster => omy
2013-04-15 17:59omyStatustested => verified
2013-04-15 17:59omyResolutionopen => fixed
2013-04-23 13:35aivStatusverified => closed
2013-04-29 15:24aivFixed in Version => 6.6.0

Notes
(0023878)
abv   
2013-03-23 09:00   
> bopargcheck s1 s2 -C #F
Made faulty shape: s1bf_1
Faulties for FIRST shape found : 1
---------------------------------
Shapes are not suppotrted by BOP: NO
Self-Intersections : NO
Check for SI has been aborted : NO
Too small edges : NO
Bad faces : YES Cases(1) Total shapes(1)
Too close vertices : NO
Too close edges : NO

Faulties for SECOND shape found : 0

The reported "bad" face is internal cylindrical face of s1 and it is perfectly valid. My only guess the BOP fails because of tangency.
(0024034)
emv   
2013-04-09 10:46   
Git branch CR23853 is ready to be reviewed.
http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commit;h=2ab0348acc213ad49559a9894c51647977d17c5b [^]
(0024035)
emv   
2013-04-09 11:23   
Please note that it is the fix for the case with cylinder.brep and pipe.brep.
The case with cylinder1.brep and pipe1.brep is the limitation for BOP because of the location of the shapes according to each other. It does not work in OCCT6.5.x.
Try in OCCT6.5.x:
restore cylinder1.brep b1
restore pipe1.brep b2
bop b1 b2
boptuc r
don r
checkshape r
(0024060)
Pawel   
2013-04-10 01:32   
Dear emv,

thanks for fixing this issue! Indeed it works for the pair cylinder.brep/pipe.brep.

However, I'm pretty sure the cut cylinder1.brep/pipe1.brep worked fine before refactoring of BOPs so can you please elaborate more on the problem with the location?

pipe1.brep was created sweeping a profile along a helix. If I adjust the profile slightly the cut (new BOP) succeeds so as I understand this has something to do with the precision rather than location. Further, I find it surprising that the result of a cut operation looks more like fusion.

Thanks in advance.
Pawel
(0024081)
apn   
2013-04-11 10:11   
Dear BugMaster,

Branch CR23853 (and products from GIT master) was compiled on Linux and Windows platforms and tested without rebase.
SHA-1: 2ab0348acc213ad49559a9894c51647977d17c5b

Number of compiler warnings:

occt component :
Linux: 3 (3 on master)
Windows: 11 (11 on master)

products component :
Linux: 0 (0 on master)
Windows: 50 (50 on master)

Regressions:
bugs modalg_4 bug827 bug827_2 bug827_3

http://occt-tests/CR23853-master-occt/Mandriva2010/summary.html [^]

Improvements:
bugs modalg_2 bug5805_41 (expected problem TODO no. 3 is not detected)

Testing on Linux:
Total MEMORY difference: 244988144 / 244666704
Total CPU difference: 14550.879999999795 / 19935.179999999735

Testing on Windows:
Total MEMORY difference: 356074844 / 355160312
Total CPU difference: 22379.390625 / 20158.125

There are not serious differences in images found by testdiff.
(0024082)
emv   
2013-04-11 10:17   
The fix for the regressions is in the git branch CR23876.
Please rebase the branch CR23853 on CR23876 and test again.
(0024105)
apn   
2013-04-12 12:04   
Dear BugMaster,

Branch CR23853 (and products from GIT master) was compiled on Linux and Windows platforms and tested with rebase to CR23876.
SHA-1: 497973717ceb0ac7e433fa145b1d05785a0c7ac6

Number of compiler warnings:

occt component:
Linux: 2 (2 on master)
Windows: 11 (11 on master)

products component:
Linux: 0 (0 on master)
Windows: 50 (50 on master)

Regressions:
No regressions

Improvements:
No improvements

Test case:
bugs modalg_5 bug23853_1 bug23853_2 bug23853_3 bug23853_4 - OK

Testing on Linux:
Total MEMORY difference: 245185004 / 244755196
Total CPU difference: 15322.979999999603 / 19939.179999999735

Testing on Windows:
Total MEMORY difference: 354930120 / 355498904
Total CPU difference: 24136.078125 / 20193.046875

There are not serious differences in images found by testdiff.