]> OCCT Git - occt-copy.git/commitdiff
0026080: Wrong result obtained by General Fuse operator.
authorpkv <pkv@opencascade.com>
Thu, 23 Apr 2015 15:01:16 +0000 (18:01 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 23 Apr 2015 15:22:59 +0000 (18:22 +0300)
Changes:
class IntTools_FClass2d
- method:
 TopAbs_State IntTools_FClass2d::Perform
 (const gp_Pnt2d& _Puv,
 const Standard_Boolean RecadreOnPeriodic) const
 has been changed.
 The value of tolerance
For the value of tolerance for classification,
the minimum (among UResolution, VResolution) value is used.

Test case for issue CR26080

src/IntTools/IntTools_FClass2d.cxx
tests/boolean/bfuse_complex/F5
tests/boolean/bfuse_complex/Q2
tests/bugs/modalg_6/bug26080 [new file with mode: 0755]

index fbeff09ded28f72be5b7aec6bcf14948376d0718..aa3cfd002d0f46a0a18139fed5836bd531b37701 100644 (file)
@@ -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);
index c075d2b0740b14924a54ce2f96420f36c7f807fb..ab90b6fb1576a82cfeb634af2e3feae65c01196c 100644 (file)
@@ -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
index 45a88e0f0d157ab2c20293ee0ccb2f652f2a7a54..1343c8a154e8a6a8c035f57c691732d4b2ab72fd 100644 (file)
@@ -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 (executable)
index 0000000..54ed129
--- /dev/null
@@ -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