View Issue Details

IDProjectCategoryView StatusLast Update
0026816Open CASCADEOCCT:Modeling Algorithmspublic2023-08-01 15:08
ReporternbvAssigned Tomsv 
PrioritynormalSeverityminor 
Status newResolutionopen 
Target VersionUnscheduled 
Summary0026816: Boolean operation produces invalid shape in "bugs modalg_5 bug25838" test case
DescriptionThis bug has been detected while fixing bug 0026675 and is not reproduced on the current MASTER (before fixing bug 0026675).

The main reason is incorrect processing near located edges.

-------------------------------------------------------------------
Try the following script for reproducing:

Draw[]> restore [locate_data_file bug25715_p02c3s1.brep] b1
Draw[]> restore [locate_data_file bug25838_p02c3s2.brep] b2
Draw[]> restore [locate_data_file bug25715_p02c3s3.brep] b3
Draw[]> bfuse b1 b1 b2
Draw[]> don b1 b3
Draw[]> explode b1 f
Draw[]> explode b3 f
Draw[]> donly b1_1 b1_9 b3_1
Draw[]> bopcurves b1_9 b3_1 -2d
#c_1 (c2d1_1, c2d2_1): Tolerance Reached=9.9999999999999995e-008 (FIX) and 2.0504059305500661e-005 (MASTER)

Draw[]> copy c_1 c91


Draw[]> bopcurves b1_1 b3_1 -2d
#c_1...c_5: Tolerance Reached=3.3301015655500105e-007 (FIX) and 4.1550546180586178e-006 (MASTER)

I.e. tolerance for FIX is 3.3301015655500105e-007 + 9.9999999999999995e-008 = 4.3301015655500105e-007.
Tolerance for MASTER is: 2.0504059305500661e-005 + 4.1550546180586178e-006 = 2.4659113923559279e-005.

Draw[]> mkedge ee c_3
Draw[]> donly c91 ee
Draw[]> fit

## SCRIPT 1 (begin)
for {set tpar 0.0} {$tpar <= 1.0} {set tpar [expr $tpar+0.1]} {
  cvalue c91 $tpar xx yy zz
  vertex vv xx yy zz
  distmini dd vv ee
  
  puts "$tpar : [dval dd_val]"
}
## SCRIPT 1 (end)

## OUTPUT on FIX (begin)

0.0 : 1.5692362877956714e-006
0.1 : 1.5585313640849257e-006
0.2 : 1.5491703735376827e-006
0.30000000000000004 : 1.5420205615884738e-006
0.4 : 1.5343386892894957e-006
0.5 : 1.5247160288497738e-006
0.6 : 1.514314941239327e-006
0.7 : 1.5044067252372638e-006
0.7999999999999999 : 1.4953848034815263e-006
0.8999999999999999 : 1.4850157720097117e-006
0.9999999999999999 : 1.4714760274267883e-006

## OUTPUT on FIX (end)

I.e. the distances on FIX are greater than tolerance. Therefore, edges are not shared. However, these edges are shared on MASTER (for the same reason - distances are lower then tolerance because tolerance is greater).

As result:

Draw[]> bfuse result b1 b3
Draw[]> checkshape result
#BRepCheck_IntersectingWires (on FIX) and OK (on MASTER).
Steps To ReproduceTest bugs modalg_5 bug25838

TagsNo tags attached.
Test case numberbugs modalg_5 bug25838

Relationships

related to 0026675 closedbugmaster Open CASCADE Eliminate normalization of coordinates in ApproxInt package 

Activities

msv

2015-11-24 19:59

developer   ~0048540

I have analyzed this case more deeply.

The faces b1_1 and b1_9 from the script are built on parallel cylinders. Their axes have distance 1e-6 from each other. It leads to the fact that near the place of interest the surfaces have distance about 7e-7. It is greater than tolerances of shapes (1e-7).

After intersection of these faces by the spherical surface the distance between intersection curves is about the same value 7e-7. However, in master version the reached tolerance is much greater (2e-5) and covers the distance. In fix version the intersection curves are computed more precise with the reached tolerance 3e-7, which does not cover the gap between curves.

So, the fix works more precise. Taking into account the distance between original nearly-same-domain faces (1e-6), the Boolean operation can work in this case only with help of Fuzzy option. In master version this role was successfully played by roughly computed intersection. I propose to add fuzzy value 1e-6 in this test case to make it theoretically correct.

mkv

2017-08-15 14:45

tester   ~0069394

Problem described in issue is reproduced on current state of OCCT.

Issue History

Date Modified Username Field Change
2015-10-27 11:55 nbv New Issue
2015-10-27 11:55 nbv Assigned To => msv
2015-10-27 12:07 nbv Relationship added related to 0026675
2015-10-27 14:03 nbv Steps to Reproduce Updated
2015-10-27 15:39 nbv Description Updated
2015-10-27 15:39 nbv Steps to Reproduce Updated
2015-10-28 17:31 msv Target Version 7.0.0 => 7.1.0
2015-11-24 18:01 nbv Description Updated
2015-11-24 19:59 msv Note Added: 0048540
2016-10-28 17:03 msv Target Version 7.1.0 => 7.2.0
2017-07-24 09:22 msv Target Version 7.2.0 => 7.3.0
2017-08-15 14:45 mkv Test case number => bugs modalg_5 bug25838
2017-08-15 14:45 mkv Note Added: 0069394
2017-12-05 17:00 msv Target Version 7.3.0 => 7.4.0
2019-08-12 16:43 msv Target Version 7.4.0 => 7.5.0
2020-09-14 22:56 msv Target Version 7.5.0 => 7.6.0
2021-08-29 18:51 msv Target Version 7.6.0 => 7.7.0
2022-10-24 10:42 szy Target Version 7.7.0 => 7.8.0
2023-08-01 15:08 dpasukhi Target Version 7.8.0 => Unscheduled