0029183: Result of general fuse of shell and edge produces a shape with too large...
authorifv <ifv@opencascade.com>
Fri, 6 Oct 2017 11:52:20 +0000 (14:52 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 19 Oct 2017 09:26:52 +0000 (12:26 +0300)
Adjusting parameters on approximation (boundary condition) for case when projected curve is far from surface
Test case is created

src/BOPTools/BOPTools_AlgoTools2D.cxx
tests/bugs/modalg_7/bug29183 [new file with mode: 0644]

index 20efb35..25e1a90 100644 (file)
@@ -655,7 +655,7 @@ void BOPTools_AlgoTools2D::MakePCurveOnFace
       aTR = Min(aMaxTol, 0.1*TolReached2d);
       aMaxSegments = 100;
       aMaxDist = 1.e3*TolReached2d;
-      if(!isAnaSurf)
+      if(!isAnaSurf || TolReached2d > 1.)
       {
         aBndPnt = AppParCurves_PassPoint;
       }
diff --git a/tests/bugs/modalg_7/bug29183 b/tests/bugs/modalg_7/bug29183
new file mode 100644 (file)
index 0000000..4ce4f32
--- /dev/null
@@ -0,0 +1,30 @@
+puts "========"
+puts "OCC29183"
+puts "========"
+puts ""
+#################################################
+# Result of general fuse of shell and edge 
+# produces a shape with too large tolerance
+#################################################
+
+set MaxTol 30
+
+restore [locate_data_file bug29183_shapes.brep] ss
+bclearobjects
+bcleartools
+baddcompound ss
+bfillds
+bbuild r
+
+regexp {Tolerance MAX=([-0-9.+eE]+)} [tolerance r] full toler
+
+if {$toler > $MaxTol} {
+  puts "Error: Tolerance after fusing is too large"
+}
+
+checknbshapes r -m "Fusing result" -edge 18 -face 7
+
+smallview 
+don r
+fit
+checkview -screenshot -2d -path ${imagedir}/${test_image}_1.png