]> OCCT Git - occt-copy.git/commitdiff
0027595: Mesh - faces without triangulations due to gp_VectorWithNullMagnitude exception CR0_691_FixNR
authoroan <oan@opencascade.com>
Wed, 22 Jun 2016 15:20:15 +0000 (18:20 +0300)
committeroan <oan@opencascade.com>
Mon, 27 Jun 2016 10:53:00 +0000 (13:53 +0300)
Zero magnitude check has been added before gp::Vec::Angle() usage

Signed-off-by: oan <oan@opencascade.com>
src/BRepMesh/BRepMesh_FastDiscretFace.cxx
tests/bugs/moddata_1/bug22759
tests/mesh/data/standard/W7

index d5c9dc190b53a77d422444cdfe9fb132f3bc7d7f..feb622fc6038681bb37615a8fad5e1f7e6e7c3fd 100644 (file)
@@ -969,7 +969,9 @@ void BRepMesh_FastDiscretFace::insertInternalVerticesOther(
             if (aDist < aDefFace)
             {
               // Lets check parameters for angular deflection.
-              if (aPrevVec2.Angle (aTmpVec) < myAngle)
+              if (aPrevVec2.SquareMagnitude() < gp::Resolution() ||
+                  aTmpVec.SquareMagnitude()   < gp::Resolution() ||
+                  aPrevVec2.Angle (aTmpVec)   < myAngle)
               {
                 // For current Iso line we can remove this parameter.
                 aToRemove2.Add (aParam2);
index a8f153e5e5269d2c62df3200b723c1b653f87f74..3d4aeabd3a1e3677200e220d70ce5df145d7ad82 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  392920
-   set good_nod  200191
+   set good_tri  310982
+   set good_nod  159222
    set good_defl 0.0092442421472207319
 } else {
    puts "OS = Windows NT"
-   set good_tri  392920
-   set good_nod  200191
+   set good_tri  310982
+   set good_nod  159222
    set good_defl 0.0092442421472207319
 }
 
index bc5e498e50a9d961860f898670cd8869fa7bc6ea..e878561c21fea9bd3c80f49a675719e0aab9d86a 100755 (executable)
@@ -1,12 +1,12 @@
 set TheFileName shading_wrongshape_027.brep
 set bug_freenodes "OCC22687"
-#set nbfreenodes(All) 2
+set nbfreenodes(All) 3
 set max_rel_tol_diff 1
 if { [string compare $command "shading"] != 0 } {
   #set bug_area "OCC22687"
   set rel_tol 2.13
 } else {
-  set rel_tol 0.48
+  set rel_tol 0.4806230236905097
 }
 set nbcross(All) 2
 set bug_cross "OCC23184"