DiscussionsIssue archiveOCCT:Modeling Algorithms

Archived issue #0031835

Modeling Algorithms - step by step Boolean common produces bad shape on given three cylinders

CommunityOCCT:Modeling Algorithmsclosed17 public notes

Search issues

Description

There are three cylinders with same size which are perpendicular with each other.
1. Load the given file Attachment 3 (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.

Steps to reproduce

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 Attachment 3 (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

Public activity

17 archived notes

Participants are labeled by their role within this record.

01Commenter 1
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 Attachment 3 (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.
02Commenter 2
The script gives no error in the version 7.3.0. However, the visual look of the result is incorrect, too. See the picture Attachment 1 (PNG).
03Author
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?
04Commenter 4
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.
05Commenter 5
I have attached the picture Clipboard02.png with the visual result on 7.4.0.
06Commenter 6
Dear Vico, on which platform it works well on 7.4.0?
07Author
Dear msv, I'm running on my desktop with msvc 2017.
08Commenter 8
Could you provide the extract of code that calls the operation?
09Commenter 2
Branch [archived branch] has been created by Participant.

[revision removed]


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().
10Commenter 10
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.
11Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
12Author
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();
13Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
14Commenter 14
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/
15Commenter 15
For integration:
occt - CR31835
products - none
16Commenter 1
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
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
17Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]