MantisBT - Community
View Issue Details
0031835Community[OCCT] OCCT:Modeling Algorithmspublic2020-10-10 13:092020-10-24 12:41
Vico Liang 
bugmaster 
normalblock 
verifiedfixed 
[OCCT] 7.5.0 
[OCCT] 7.5.0 
bugs/modalg_7/bug31835_1,bug31835_2
0031835: Modeling Algorithms - step by step Boolean common produces bad shape on given three cylinders
There are three cylinders with same size which are perpendicular with each other.
1. Load the given file three_cylinder.brep there are three cylinders: cylinder1, cylinder2, cylinder3.
2. do boolean common with any two shapes: common1 = cylinder1 x cylinder2
3. do bollean common between common1 and cylinder3.

The final shape is bad from the result view.

It maybe a modeling problem or meshing problem.

Test environment is occt 7.5.0 beta.

It works well in occt 7.4.0.
pload MODELING VISUALIZATION

# OK
#plane p1    0    0 -200 0 0 1
#plane p2 -200    0    0 1 0 0
#plane p3    0 -200    0 0 1 0
#pcylinder c_1 p1 100 400
#pcylinder c_2 p2 100 400
#pcylinder c_3 p3 100 400

# OK
pcylinder  c_1 100 400
ttranslate c_1 0 0 -200
pcylinder  c_2 100 400
trotate    c_2 0 0 0 1 0 0 90
ttranslate c_2 0 200 0
pcylinder  c_3 100 400
trotate    c_3 0 0 0 0 1 0 90
ttranslate c_3 -200 0 0

# KO
#restore three_cylinder.brep c
#explode c So

# KO
plane p1 -200 2.22044604925033e-14 12.6935294289015 1 -1.11022302462516e-16 0
pcylinder c_1 p1 100 400
plane p2 0 0 -187.306470571099 0 0 1
pcylinder c_2 p2 100 400
plane p3 0 200 12.6935294289015 0 -1 1.11022302462516e-16
pcylinder c_3 p3 100 400

bcommon r12 c_2 c_1
bcommon r123 r12 c_3
incmesh r123 0.1
vclear
vinit View1
vdefaults -autotriang 0
vdisplay -dispMode 1 r123
No tags attached.
? three_cylinder.brep (17,130) 2020-10-10 13:09
https://tracker.dev.opencascade.org/
jpg three-cylinder.jpg (54,536) 2020-10-10 13:10
https://tracker.dev.opencascade.org/
jpg two-cylinder-common.jpg (51,684) 2020-10-10 13:10
https://tracker.dev.opencascade.org/
jpg three-cylinder-common.jpg (43,786) 2020-10-10 13:10
https://tracker.dev.opencascade.org/
png Clipboard01.png (42,795) 2020-10-12 09:36
https://tracker.dev.opencascade.org/
jpg Clipboard02.jpg (21,660) 2020-10-12 15:31
https://tracker.dev.opencascade.org/
Issue History
2020-10-10 13:09Vico LiangNew Issue
2020-10-10 13:09Vico LiangAssigned To => msv
2020-10-10 13:09Vico LiangFile Added: three_cylinder.brep
2020-10-10 13:10Vico LiangFile Added: three-cylinder.jpg
2020-10-10 13:10Vico LiangFile Added: two-cylinder-common.jpg
2020-10-10 13:10Vico LiangFile Added: three-cylinder-common.jpg
2020-10-10 13:13Vico LiangDescription Updatedbug_revision_view_page.php?rev_id=23719#r23719
2020-10-12 03:53Vico LiangSeverityminor => block
2020-10-12 03:53Vico LiangTarget Version7.6.0* => 7.5.0
2020-10-12 03:53Vico LiangSummarystep by step boolean common produces bad shape on given three cylinders => regression issue: step by step boolean common produces bad shape on given three cylinders
2020-10-12 03:53Vico LiangDescription Updatedbug_revision_view_page.php?rev_id=23722#r23722
2020-10-12 09:30msvNote Added: 0095882
2020-10-12 09:36msvNote Added: 0095883
2020-10-12 09:36msvFile Added: Clipboard01.png
2020-10-12 15:21Vico LiangNote Added: 0095888
2020-10-12 15:28msvNote Added: 0095889
2020-10-12 15:31msvFile Added: Clipboard02.jpg
2020-10-12 15:32msvNote Added: 0095890
2020-10-12 17:20kgvSummaryregression issue: step by step boolean common produces bad shape on given three cylinders => [REGRESSION] Modeling Algorithms - step by step Boolean common produces bad shape on given three cylinders
2020-10-12 17:41kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23734#r23734
2020-10-12 17:42kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23735#r23735
2020-10-13 09:46msvNote Added: 0095916
2020-10-13 09:47msvAssigned Tomsv => emv
2020-10-13 09:47msvStatusnew => assigned
2020-10-13 11:10Vico LiangNote Added: 0095923
2020-10-13 12:20msvNote Added: 0095926
2020-10-13 14:30gitNote Added: 0095930
2020-10-13 14:35emvNote Added: 0095931
2020-10-13 14:35emvSummary[REGRESSION] Modeling Algorithms - step by step Boolean common produces bad shape on given three cylinders => Modeling Algorithms - step by step Boolean common produces bad shape on given three cylinders
2020-10-13 14:35emvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23764#r23764
2020-10-13 14:59gitNote Added: 0095933
2020-10-13 17:30Vico LiangNote Added: 0095940
2020-10-13 21:35gitNote Added: 0095945
2020-10-14 09:29emvNote Added: 0095949
2020-10-14 09:29emvAssigned Toemv => msv
2020-10-14 09:29emvStatusassigned => resolved
2020-10-14 10:48msvNote Added: 0095954
2020-10-14 10:48msvAssigned Tomsv => bugmaster
2020-10-14 10:48msvStatusresolved => reviewed
2020-10-17 13:22bugmasterNote Added: 0096033
2020-10-17 13:22bugmasterStatusreviewed => tested
2020-10-17 13:29bugmasterTest case number => bugs/modalg_7/bug31835_1,bug31835_2
2020-10-17 13:31bugmasterChangeset attached => occt master 135c2bd9
2020-10-17 13:31bugmasterStatustested => verified
2020-10-17 13:31bugmasterResolutionopen => fixed
2020-10-24 12:41gitNote Added: 0096225

Notes
(0095882)
msv   
2020-10-12 09:30   
Dear Vico, I checked this test on OCCT 7.4.0. It works the same as in 7.5.0beta. Here is the draw script:
restore three_cylinder.brep a
explode a
bcommon r1 a_1 a_2
puts [checkshape r1]
bcommon r r1 a_3
puts [checkshape r]
incmesh r 0.1
tricheck r


Here is the output:
This shape seems to be valid
This shape seems to be valid
cross face errors: {face1, node1, face2, node2, distance} {6 1 12 1 132.74946253594433} {7 1 12 1 106.25607663447413} 
{7 4 12 4 132.74946253594433} {10 1 12 1 106.25607663447413}
free nodes (in pairs: face / node):
{12 2} {12 3} {12 4} {12 5} {12 6} {12 7} {12 8} {12 9} {12 10} {12 11} {12 12} {12 13} {12 14} {12 15} 
{12 16} {12 17} {12 18} {12 19} {12 20} {12 21} {12 22} {12 23} {12 24} {12 25} {12 26} {12 27} {12 28} 
{12 29} {12 30} {12 31} {12 32} {12 33} {12 34} {12 35} {12 36}
Free_links 0 Cross_face_errors 4 Async_edges 0 Free_nodes 35 Small triangles 0


So, it is not a regression issue.
(0095883)
msv   
2020-10-12 09:36   
The script gives no error in the version 7.3.0. However, the visual look of the result is incorrect, too. See the picture Clipboard01.png.
(0095888)
Vico Liang   
2020-10-12 15:21   
The visual look of the result is correct in version 7.4.0, but incorrect in 7.5.0 beta. anyway, this is a bug, right?
(0095889)
msv   
2020-10-12 15:28   
Yes, this is a bug. But on my computer (win64, msvc 2015) the bug is the same on 7.4.0. If it was a regression it would require its urgent fix before issuing the release 7.5.0.
(0095890)
msv   
2020-10-12 15:32   
I have attached the picture Clipboard02.png with the visual result on 7.4.0.
(0095916)
msv   
2020-10-13 09:46   
Dear Vico, on which platform it works well on 7.4.0?
(0095923)
Vico Liang   
2020-10-13 11:10   
Dear msv, I'm running on my desktop with msvc 2017.
(0095926)
msv   
2020-10-13 12:20   
Could you provide the extract of code that calls the operation?
(0095930)
git   
2020-10-13 14:30   
Branch CR31835 has been created by emv.

SHA-1: f7dbcf7512e2a3f4220b433913f2f96581219e1b


Detailed log of new commits:

Author: emv
Date: Tue Oct 13 14:31:27 2020 +0300

    0031835: Modeling Algorithms - step by step Boolean common produces bad shape on given three cylinders
    
    Fix inconsistency between IntAna_QuadQuadGeo(gp_Cylinder,gp_Cylinder) and AxeOperator::Coplanar().
(0095931)
emv   
2020-10-13 14:35   
I've checked the result in OCCT 7.4.0 built with VS2017, it is similar to the one built with OCCT 7.5.0_beta. The case is not a regression.
(0095933)
git   
2020-10-13 14:59   
Branch CR31835 has been updated forcibly by emv.

SHA-1: c5779392f6d3138fa443695fd99cf4590b30b6a4
(0095940)
Vico Liang   
2020-10-13 17:30   
Code snippet:
    BRepAlgoAPI_Common aCommonAlgoAPI;
    aCommonAlgoAPI.SetArguments(aArgumentShapes);
    aCommonAlgoAPI.SetTools(aToolShapes);
    aCommonAlgoAPI.SetFuzzyValue(1e-6);
    aCommonAlgoAPI.SetRunParallel(Standard_True);
    aCommonAlgoAPI.SetNonDestructive(Standard_True);
    aCommonAlgoAPI.SetToFillHistory(Standard_False);
    aCommonAlgoAPI.Build();
(0095945)
git   
2020-10-13 21:35   
Branch CR31835 has been updated forcibly by emv.

SHA-1: df4f95f132b3192eef399285f93b97b4a2044915
(0095949)
emv   
2020-10-14 09:29   
Dear Mikhail, could you please review the git branch CR31835?
Test results - http://jenkins-test-12.nnov.opencascade.com/view/CR31835-master-emv/view/COMPARE/ [^]
(0095954)
msv   
2020-10-14 10:48   
For integration:
occt - CR31835
products - none
(0096033)
bugmaster   
2020-10-17 13:22   
Combination -
OCCT branch : IR-2020-10-16
master SHA - ae9f4b64cacf0df612944b3694a3bdfa5f1f29cf
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-10-16 SHA - fcb5abe005e152f7f923f4cf6c02acb07c027cdc
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18027.820000000127 / 18057.130000000117 [-0.16%]
Products
Total CPU difference: 12174.330000000093 / 12182.170000000115 [-0.06%]
Windows-64-VC14:
OCCT
Total CPU difference: 19740.03125 / 19746.828125 [-0.03%]
Products
Total CPU difference: 13564.71875 / 13586.625 [-0.16%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0096225)
git   
2020-10-24 12:41   
Branch CR31835 has been deleted by inv.

SHA-1: df4f95f132b3192eef399285f93b97b4a2044915