diff --git a/src/IntTools/IntTools_FClass2d.cxx b/src/IntTools/IntTools_FClass2d.cxx index fbeff09ded..aa3cfd002d 100644 --- a/src/IntTools/IntTools_FClass2d.cxx +++ b/src/IntTools/IntTools_FClass2d.cxx @@ -634,8 +634,12 @@ TopAbs_State IntTools_FClass2d::Perform bUIn = (u >= Umin) && (u <= Umax); bVIn = (v >= Vmin) && (v <= Vmax); // - aFCTol = (bUIn==bVIn) ? Max(aURes, aVRes) : - (!bUIn ? aURes : aVRes); + if (bUIn==bVIn) { + aFCTol = Min(aURes, aVRes); + } + else { + aFCTol = (!bUIn) ? aURes : aVRes; + } // BRepClass_FaceClassifier aClassifier; aClassifier.Perform(Face,Puv,aFCTol); diff --git a/tests/boolean/bfuse_complex/F5 b/tests/boolean/bfuse_complex/F5 index c075d2b074..ab90b6fb15 100644 --- a/tests/boolean/bfuse_complex/F5 +++ b/tests/boolean/bfuse_complex/F5 @@ -1,5 +1,6 @@ # Original bug : pro10658 # Date : 24mar98 +puts "TODO #26080 ALL: Faulty shapes in variables faulty_1" puts "TODO ALL Error : The area of the resulting shape is" restore [locate_data_file CTO900_pro10658a.rle] a restore [locate_data_file pro10658b.rle] b diff --git a/tests/boolean/bfuse_complex/Q2 b/tests/boolean/bfuse_complex/Q2 index 45a88e0f0d..1343c8a154 100644 --- a/tests/boolean/bfuse_complex/Q2 +++ b/tests/boolean/bfuse_complex/Q2 @@ -1,4 +1,5 @@ # pro10658 +puts "TODO #26080 ALL: Faulty shapes in variables faulty_1" puts "TODO ALL Error : The area of the resulting shape is" restore [locate_data_file CTO900_pro10658a.rle] a restore [locate_data_file pro10658b.rle] b diff --git a/tests/bugs/modalg_6/bug26080 b/tests/bugs/modalg_6/bug26080 new file mode 100755 index 0000000000..54ed1293d9 --- /dev/null +++ b/tests/bugs/modalg_6/bug26080 @@ -0,0 +1,38 @@ +puts "============" +puts "OCC26080" +puts "============" +puts "" +############################### +## Wrong result obtained by General Fuse operator. +############################### + +restore [locate_data_file bug26080_qef001.brep] q + +explode q +copy q_1 b1 +copy q_2 b2 + +bclearobjects +bcleartools +baddobjects b1 b2 + +bfillds +bbuild result + +set square 1.36058e+06 + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 7 + EDGE : 6 + WIRE : 1 + FACE : 1 + SHELL : 0 + SOLID : 0 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 16 +" +checknbshapes result ${nbshapes_expected} 1 "Result obtained by General Fuse operator" + +set 3dviewer 1