]> OCCT Git - occt-copy.git/commitdiff
0027119: Regression: Draw command "incmesh" hangs on the attacheced face.
authoroan <oan@opencascade.com>
Fri, 5 Feb 2016 12:23:08 +0000 (15:23 +0300)
committeroan <oan@opencascade.com>
Fri, 5 Feb 2016 12:23:08 +0000 (15:23 +0300)
BRepMesh_CircleTool: extend radius of circle by quite small value in order to classify points forming inscribed triangle as lying on it. Do not use PConfusion due to false positive result leading algorithm to hanging.

src/BRepMesh/BRepMesh_CircleTool.cxx
tests/bugs/mesh/bug27119 [new file with mode: 0644]
tests/bugs/moddata_1/bug22759
tests/mesh/data/standard/B3

index 56972162733ae57218c26a6836fe46cfbbb91c8a..1aead23481028495286c3859a03d2d53cdeab6aa 100644 (file)
@@ -152,7 +152,7 @@ Standard_Boolean BRepMesh_CircleTool::MakeCircle(const gp_XY&   thePoint1,
 
   theRadius = Sqrt(Max(Max((thePoint1 - aIntPnt).SquareModulus(), 
                            (thePoint2 - aIntPnt).SquareModulus()),
-                           (thePoint3 - aIntPnt).SquareModulus())) + aPrecision;
+                           (thePoint3 - aIntPnt).SquareModulus())) + 2 * RealEpsilon();
 
   return Standard_True;
 }
diff --git a/tests/bugs/mesh/bug27119 b/tests/bugs/mesh/bug27119
new file mode 100644 (file)
index 0000000..e36f79a
--- /dev/null
@@ -0,0 +1,44 @@
+puts "========"
+puts "OCC27119"
+puts "========"
+puts ""
+###########################################
+## Regression: Draw command "incmesh" hangs on the attacheced face.
+###########################################
+
+set BugNumber OCC27119
+
+restore [locate_data_file bug27119_GrossPlatePart3Step2TransformedFace.brep] result
+
+dchrono t reset
+dchrono t start
+incmesh result 1.e-6
+dchrono t stop
+set time [dchrono t show]
+regexp {CPU user time: ([0-9|.]+) seconds} $time full seconds
+
+set tri 0
+set nod 0
+set def 0
+
+set tri_info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
+regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
+regexp { deflection +([-0-9.+eE]+)} $tri_info full def
+
+set ref_tri 7855
+set ref_nod 7857
+set ref_def 9.3791641120333225e-013
+set tol_rel 0.01
+
+# Computes deviation of the value from specified one
+checkreal "Nb of triangles" $tri $ref_tri 0 $tol_rel
+checkreal "Nb of nodes" $nod $ref_nod 0 $tol_rel
+checkreal "Deflection" $def $ref_def 1.e-12 0
+
+set eps_time 3
+if { $seconds > $eps_time } {
+  puts "Error: Too slow ($seconds > $eps_time)"
+}
+
+set 3dviewer 1
index c7befea4f99ab077bbb97cb09679664d4ecb276e..53888e0ae64100e377d82a446e4e05bc6e65af37 100755 (executable)
@@ -30,13 +30,13 @@ regexp {deflection +([-0-9.+eE]+)} $tri_info full defl
 set env(os_type) $tcl_platform(platform)
 if { [string compare $env(os_type) "windows"] != 0 } {
    puts "OS = Linux"
-   set good_tri  520414
-   set good_nod  263938
+   set good_tri  521058
+   set good_nod  264260
    set good_defl 0.0026800432954056617
 } else {
    puts "OS = Windows NT"
-   set good_tri  520414
-   set good_nod  263938
+   set good_tri  521058
+   set good_nod  264260
    set good_defl 0.0026800432954056617
 }
 
index 3d5d29e413c0d85080bc00cc7c8e2fb637605662..d20ef3b0fac8a530f0ba5a03e82f4e27730a8875 100755 (executable)
@@ -1,10 +1,10 @@
 set TheFileName shading_012.brep
 ###set bug_withouttri "OCC22687"
 ###set nbwithouttri(All) 1
-#if { [string compare $command "shading"] == 0 } {
-#   set bug_freelinks "OCC23106"
-#   set nbfree(All) 4
-#} else {
-#   set bug_freelinks "OCC25378"
-#   set nbfree(All) 3
-#}
+if { [string compare $command "shading"] == 0 } {
+   set bug_freelinks "OCC23106"
+   set nbfree(All) 4
+} else {
+   set bug_freelinks "OCC25378"
+   set nbfree(All) 3
+}