]> OCCT Git - occt-copy.git/commitdiff
0027126: Create command checktrinfo to verify meshes
authorski <ski@opencascade.com>
Tue, 2 Feb 2016 14:14:15 +0000 (17:14 +0300)
committerabv <abv@opencascade.com>
Fri, 5 Feb 2016 08:14:44 +0000 (11:14 +0300)
Command checktrinfo was created.
Test cases were updated to use command checktrinfo.

108 files changed:
dox/dev_guides/tests/tests.md
src/DrawResources/CheckCommands.tcl
tests/bugs/demo/bug25445
tests/bugs/fclasses/bug26922
tests/bugs/heal/bug26244
tests/bugs/iges/buc60820_1
tests/bugs/iges/buc60820_2
tests/bugs/iges/buc60823
tests/bugs/iges/bug22888
tests/bugs/iges/bug306
tests/bugs/mesh/bug21593
tests/bugs/mesh/bug22778
tests/bugs/mesh/bug23105
tests/bugs/mesh/bug23106
tests/bugs/mesh/bug23614_1
tests/bugs/mesh/bug23614_2
tests/bugs/mesh/bug23614_3
tests/bugs/mesh/bug23614_4
tests/bugs/mesh/bug23631
tests/bugs/mesh/bug24127
tests/bugs/mesh/bug24775
tests/bugs/mesh/bug24938
tests/bugs/mesh/bug25157
tests/bugs/mesh/bug25281
tests/bugs/mesh/bug25519
tests/bugs/modalg_1/bug109
tests/bugs/modalg_1/bug179
tests/bugs/modalg_2/bug263
tests/bugs/modalg_2/bug264_0
tests/bugs/modalg_2/bug264_1
tests/bugs/modalg_2/bug264_10
tests/bugs/modalg_2/bug264_11
tests/bugs/modalg_2/bug264_12
tests/bugs/modalg_2/bug264_2
tests/bugs/modalg_2/bug264_3
tests/bugs/modalg_2/bug264_4
tests/bugs/modalg_2/bug264_5
tests/bugs/modalg_2/bug264_6
tests/bugs/modalg_2/bug264_7
tests/bugs/modalg_2/bug264_8
tests/bugs/modalg_2/bug264_9
tests/bugs/modalg_2/bug269_1
tests/bugs/modalg_2/bug269_2
tests/bugs/modalg_2/bug269_3
tests/bugs/modalg_2/bug269_4
tests/bugs/modalg_2/bug287
tests/bugs/modalg_2/bug291
tests/bugs/modalg_2/bug292
tests/bugs/modalg_2/bug347_1
tests/bugs/modalg_2/bug347_2
tests/bugs/modalg_2/bug358
tests/bugs/modalg_2/bug400
tests/bugs/modalg_2/bug481
tests/bugs/modalg_6/bug26897
tests/bugs/moddata_1/buc60707
tests/bugs/moddata_1/bug1416
tests/bugs/moddata_1/bug15
tests/bugs/moddata_1/bug15519
tests/bugs/moddata_1/bug16
tests/bugs/moddata_1/bug17
tests/bugs/moddata_1/bug20
tests/bugs/moddata_1/bug21121
tests/bugs/moddata_1/bug21122
tests/bugs/moddata_1/bug22759
tests/bugs/moddata_2/bug256
tests/bugs/moddata_2/bug258_1
tests/bugs/moddata_2/bug258_2
tests/bugs/moddata_2/bug428
tests/bugs/moddata_2/bug613_1
tests/bugs/moddata_2/bug613_2
tests/bugs/moddata_2/bug6412
tests/bugs/moddata_2/fra62476_1
tests/bugs/moddata_2/fra62476_2
tests/bugs/moddata_2/pro20333
tests/bugs/moddata_3/bug24959_1
tests/bugs/moddata_3/bug24959_2
tests/bugs/moddata_3/bug25179
tests/bugs/moddata_3/bug26359
tests/bugs/step/bug348_1
tests/bugs/step/bug348_2
tests/bugs/step/bug348_3
tests/bugs/step/bug348_4
tests/bugs/stlvrml/bug25050
tests/bugs/stlvrml/bug25279
tests/bugs/vis/buc60661
tests/bugs/vis/buc60858
tests/bugs/vis/bug19_1
tests/bugs/vis/bug19_2
tests/bugs/vis/bug20373
tests/bugs/vis/bug21578
tests/bugs/vis/bug22188
tests/bugs/vis/bug22304
tests/bugs/vis/bug22502
tests/bugs/vis/bug22652
tests/bugs/vis/bug22735
tests/bugs/vis/bug23200
tests/bugs/vis/bug288_1
tests/bugs/vis/bug288_2
tests/bugs/vis/bug288_3
tests/bugs/vis/bug288_4
tests/bugs/vis/bug288_5
tests/bugs/vis/bug316
tests/bugs/vis/bug319
tests/bugs/vis/bug331
tests/bugs/vis/bug344
tests/bugs/vis/bug364
tests/bugs/vis/bug4894
tests/bugs/xde/bug25357

index 3426c8ab78db2b3f2378bcc435fdcfaaac445fb2..476a233360844e748bdac6fe1ad46717bfced488 100644 (file)
@@ -1331,3 +1331,62 @@ Allowed options are:
 checklength cp1 -l 7.278
 checklength res -l -equal ext_1
 ~~~~~
+@subsubsection testmanual_5_3_13 Check maximum deflection, number of triangles and nodes in mesh
+
+To check maximum deflection, number of nodes and triangles in mesh command *checktrinfo* can be used.
+
+Use: checktrinfo shapename [options...]
+
+Allowed options are:
+ * -tri [N]:  compare current number of triangles in "shapename" mesh with given reference data.
+      If reference value N is not given and current number of triangles is equal to 0
+      procedure checktrinfo will print an error.
+ * -nod [N]:  compare current number of nodes in "shapename" mesh with given reference data.
+      If reference value N is not givenand current number of nodes is equal to 0
+      procedure checktrinfo will print an error.
+ * -defl [N]: compare current value of maximum deflection in "shapename" mesh with given reference data
+      If reference value N is not given and current maximum deflection is equal to 0
+      procedure checktrinfo will print an error.
+ * -max_defl N:     compare current value of maximum deflection in "shapename" mesh with max possible value
+ * -tol_abs_tri N:  absolute tolerance for comparison of number of triangles (default value 0)
+ * -tol_rel_tri N:  relative tolerance for comparison of number of triangles (default value 0)
+ * -tol_abs_nod N:  absolute tolerance for comparison of number of nodes (default value 0)
+ * -tol_rel_nod N:  relative tolerance for comparison of number of nodes (default value 0)
+ * -tol_abs_defl N: absolute tolerance for deflection comparison (default value 0)
+ * -tol_rel_defl N: relative tolerance for deflection comparison (default value 0)
+ * -ref [trinfo a]: compare deflection, number of triangles and nodes in "shapename" and in "a"
+
+Note that options -tri, -nod, -defl do not work together with option -ref.
+
+Examples:
+
+comparison with some reference values
+~~~~~
+checktrinfo result -tri 129 -nod 131 -defl 0.01
+~~~~~
+
+comparison with another mesh
+~~~~~
+checktrinfo result -ref [tringo a]
+~~~~~
+
+comparison of deflection with max possible value
+~~~~~
+checktrinfo result -max_defl 1
+~~~~~
+
+to make sure that current values are not equal to zero
+~~~~~
+checktrinfo result -tri -nod -defl
+~~~~~
+
+to make sure that number of triangles and number of nodes are not equal to some specific values
+~~~~~
+checktrinfo result -tri !10 -nod !8
+~~~~~
+
+it is possible to compare current values with reference values with some tolerances.
+Use options -tol_\* for that.
+~~~~~
+checktrinfo result -defl 1 -tol_abs_defl 0.001
+~~~~~
index c08e88b3005888223abfc23b05d884a7212f1a1a..430ff143d01c0b6c8f56e3b6ce9b30a71b020257 100644 (file)
@@ -895,4 +895,121 @@ proc checkview {args} {
     }
     xwd ${PathToSave}
   }
-}
\ No newline at end of file
+
+}
+
+help checktrinfo {
+  Compare maximum deflection, number of nodes and triangles in "shape" mesh with given reference data
+
+  Use: checktrinfo shapename [options...]
+  Allowed options are:
+    -tri [N]:  compare current number of triangles in "shapename" mesh with given reference data.
+               If reference value N is not given and current number of triangles is equal to 0
+               procedure checktrinfo will print an error.
+    -nod [N]:  compare current number of nodes in "shapename" mesh with given reference data.
+               If reference value N is not givenand current number of nodes is equal to 0
+               procedure checktrinfo will print an error.
+    -defl [N]: compare current value of maximum deflection in "shapename" mesh with given reference data
+               If reference value N is not given and current maximum deflection is equal to 0
+               procedure checktrinfo will print an error.
+    -max_defl N:     compare current value of maximum deflection in "shapename" mesh with max possible value
+    -tol_abs_tri N:  absolute tolerance for comparison of number of triangles (default value 0)
+    -tol_rel_tri N:  relative tolerance for comparison of number of triangles (default value 0)
+    -tol_abs_nod N:  absolute tolerance for comparison of number of nodes (default value 0)
+    -tol_rel_nod N:  relative tolerance for comparison of number of nodes (default value 0)
+    -tol_abs_defl N: absolute tolerance for deflection comparison (default value 0)
+    -tol_rel_defl N: relative tolerance for deflection comparison (default value 0)
+    -ref [trinfo a]: compare deflection, number of triangles and nodes in "shapename" and in "a"
+}
+proc checktrinfo {shape args} {
+    puts "checktrinfo ${shape} ${args}"
+    upvar ${shape} ${shape}
+
+    if {![isdraw ${shape}] || [regexp "${shape} is a \n" [whatis ${shape}]]} {
+        puts "Error: The command cannot be built"
+        return
+    }
+
+    set ref_nb_triangles false
+    set ref_nb_nodes false
+    set ref_deflection false
+    set tol_abs_defl 0
+    set tol_rel_defl 0
+    set tol_abs_tri 0
+    set tol_rel_tri 0
+    set tol_abs_nod 0
+    set tol_rel_nod 0
+    set max_defl -1
+    set ref_info ""
+
+    set options {{"-tri" ref_nb_triangles ?}
+                 {"-nod" ref_nb_nodes ?}
+                 {"-defl" ref_deflection ?}
+                 {"-tol_abs_defl" tol_abs_defl 1}
+                 {"-tol_rel_defl" tol_rel_defl 1}
+                 {"-tol_abs_tri" tol_abs_tri 1}
+                 {"-tol_rel_tri" tol_rel_tri 1}
+                 {"-tol_abs_nod" tol_abs_nod 1}
+                 {"-tol_rel_nod" tol_rel_nod 1}
+                 {"-max_defl" max_defl 1}
+                 {"-ref" ref_info 1}}
+
+    _check_args ${args} ${options} "checktrinfo"
+
+    # get current number of triangles and nodes, value of max deflection
+    set tri_info [trinfo ${shape}]
+    set triinfo_pattern "(\[0-9\]+) +triangles.*\[^0-9]\(\[0-9\]+) +nodes.*deflection +(\[-0-9.+eE\]+)"
+    if {![regexp "${triinfo_pattern}" ${tri_info} dump cur_nb_triangles cur_nb_nodes cur_deflection]} {
+        puts "Error: command trinfo prints empty info"
+    }
+
+    # get reference values from -ref option
+    if { "${ref_info}" != ""} {
+        if {![regexp "${triinfo_pattern}" ${ref_info} dump ref_nb_triangles ref_nb_nodes ref_deflection]} {
+            puts "Error: reference information gived by -ref option is wrong"
+        }
+    }
+
+    # check number of triangles
+    if { [string is boolean ${ref_nb_triangles}] } {
+        if { ${cur_nb_triangles} <= 0 && ${ref_nb_triangles} } {
+            puts "Error: Number of triangles is equal to 0"
+        }
+    } else {
+        if {[regexp {!([-0-9.+eE]+)} $ref_nb_triangles full ref_nb_triangles_value]} {
+            if  {${ref_nb_triangles_value} == ${cur_nb_triangles} } {
+                puts "Error: Number of triangles is equal to ${ref_nb_triangles_value} but it should not"
+            }
+        } else {
+            checkreal "Number of triangles" ${cur_nb_triangles} ${ref_nb_triangles} ${tol_abs_tri} ${tol_rel_tri}
+        }
+    }
+
+    # check number of nodes
+    if { [string is boolean ${ref_nb_nodes}] } {
+        if { ${cur_nb_nodes} <= 0 && ${ref_nb_nodes} } {
+            puts "Error: Number of nodes is equal to 0"
+        }
+    } else {
+        if {[regexp {!([-0-9.+eE]+)} $ref_nb_nodes full ref_nb_nodes_value]} {
+            if  {${ref_nb_nodes_value} == ${cur_nb_nodes} } {
+                puts "Error: Number of nodes is equal to ${ref_nb_nodes_value} but it should not"
+            }
+        } else {
+            checkreal "Number of nodes" ${cur_nb_nodes} ${ref_nb_nodes} ${tol_abs_nod} ${tol_rel_nod}
+        }
+    }
+
+    # check deflection
+    if { [string is boolean ${ref_deflection}] } {
+        if { ${cur_deflection} <= 0 && ${ref_deflection} } {
+            puts "Error: Maximal deflection is equal to 0"
+        }
+    } else {
+        checkreal "Maximal deflection" ${cur_deflection} ${ref_deflection} ${tol_abs_defl} ${tol_rel_defl}
+    }
+
+    if { ${max_defl} != -1 && ${cur_deflection} > ${max_defl} } {
+        puts "Error: Maximal deflection is too big"
+    }
+}
index 36e80fa1707f403b9c8674b35e2d27ef869d1aa0..a94072ef963e47fc10bf573465544f70c3ec8ece 100644 (file)
@@ -10,19 +10,9 @@ pcone aCone 100 10 100
 
 tclean aCone
 incmesh aCone 0.01 -a 10.
-set bug_info [trinfo aCone]
-set NbTrian_1 [lindex $bug_info 3]
-set NbNodes_1 [lindex $bug_info 5]
+regexp {([0-9]+) +triangles.*[^0-9]([0-9]+) +nodes} [trinfo aCone] full NbTrian_1 NbNodes_1
 
 tclean aCone
 incmesh aCone 0.01 -a 1.
-set bug_info [trinfo aCone]
-set NbTrian_2 [lindex $bug_info 3]
-set NbNodes_2 [lindex $bug_info 5]
 
-if {$NbTrian_1 == $NbTrian_2} {
-  puts "ERROR: OCC25445 is not fixed. Number of triangles are equal for both meshes."
-}
-if {$NbNodes_1 == $NbNodes_2} {
-  puts "ERROR: OCC25445 is not fixed. Number of nodes are equal for both meshes."
-}
+checktrinfo aCone -tri !${NbTrian_1} -nod !${NbNodes_1}
index bd432cebdf92ca9836cde231c1bcf550d877dc44..362712f3da9f7b9cdba7f2984da25f1b268c979d 100755 (executable)
@@ -24,9 +24,7 @@ if { [regexp {Debug mode} [dversion]] } {
 
 psphere result 50.
 incmesh result 0.01
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full numTriangles
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full numNodes
+trinfo result
 
 set time_info [time {writevrml result ${imagedir}/bug26922.wrl 2 2}]
 regexp {([-0-9.+eE]+)} ${time_info} full time_performance
index 6a4e139fedacfd411c30d4c08545b02dd60a8f60..e2bef961bcaa1ad861924c3b16b2575e73a5bc9b 100644 (file)
@@ -268,16 +268,7 @@ unifysamedom r res
 incmesh r 0.1
 trinfo r
 
-set info [trinfo r]
-regexp { +([-0-9.+eE]+) +triangles} $info full tr
-regexp { +([-0-9.+eE]+) +nodes} $info full nd
-regexp { +([-0-9.+eE]+) +nodes} $info full nd
-regexp {Maximal deflection +([-0-9.+eE]+)} $info full defl
-
-set expected_defl 0.04
-set tol_abs_defl 0.01
-set tol_rel_defl 0.01
-checkreal "Maximal deflection" ${defl} ${expected_defl} ${tol_abs_defl} ${tol_rel_defl}
+checktrinfo r -defl 0.04 -tol_abs_defl 0.01 -tol_rel_defl 0.01
 
 vinit
 vsetdispmode 1
index 92b5d955bc03f6b5abebfffcfea04aef7b397413..d71a4cd70dc2cdf543e07bce7cf5cc4c2dabe576 100755 (executable)
@@ -11,12 +11,6 @@ checkshape result r
 tclean result
 incmesh result 0.1
 triangles result
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri <= 0 || $nod <= 0 } {
-    puts "Error : Problems with shading"
-}
 
+checktrinfo result -tri -nod
 checkview -display result -2d -path ${imagedir}/${test_image}.png
index 2d7cfa830f74a58075e43fd9f6ca87d72eadc00e..0ba462ae954c5cb160b062cae12a57cf2725001e 100755 (executable)
@@ -13,14 +13,6 @@ vdisplay result
 vsetdispmode result 1
 vfit
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nod} $info full nod
-
-
-if { $tri != 1655 || $nod != 1143 } {
-    puts "Shading problem may be, nb tri & nod were changed"
-}
+checktrinfo result -tri 578 -nod 502
 
 checkview -display result -2d -path ${imagedir}/${test_image}.png
-
index dd85bbcc7b3f2441c6a60bf728a339bb136f4808..1b4856da105d78b3351a7943d9c6ab67d4b30a43 100755 (executable)
@@ -14,13 +14,6 @@ vdisplay result
 vsetdispmode result 1
 vfit
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri != 17618 || $nod != 11153 } {
-    puts "Shading problem may be, nb tri & nod are changed"
-}
+checktrinfo result -tri 15571 -nod 9024
 
 checkview -display result -2d -path ${imagedir}/${test_image}.png
-
index ee15fa9bada02663b115a9fde445679c71f173c2..391d2020839bc179fbe7856ec59f6e3c8ca42a0f 100755 (executable)
@@ -22,12 +22,11 @@ vdisplay a_1
 vfit
 vzfit
 tclean a_1
-set inf_before [trinfo a_1]
+trinfo a_1
 
 vsetdispmode a_1 1
-set inf_after [trinfo a_1]
-regexp { +([-0-9.+eE]+) +triangles} $inf_after full tri_after
-regexp { +([-0-9.+eE]+) +nodes} $inf_after full nod_after
+
+checktrinfo a_1 -tri -nod
 
 set color [vreadpixel ${x1} ${y1} rgb]
 set rd [lindex $color 0]
@@ -38,21 +37,4 @@ if { $rd == 0 || $gr == 0 || $bl == 0 } {
     puts "Error : Face is not shaded (colors are not equal)"
 }
 
-if { $tri_after <= 0 || $nod_after <= 0 } {
-    puts "Error : Face is not shaded (number of nodes or triangles is wrong)"
-}
-
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
-
-
-
-
-
-
-
-
-
-
-
-
index f0469168503550c61e85b7e4ba5818e00f0ced42..c7988d6cf5b399176d45dd9d409f1885405039c3 100755 (executable)
@@ -20,13 +20,7 @@ vsetdispmode result 1
 vdisplay result
 vfit
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { ($tri != 6409 || $nod != 6195) } {
-    puts "Shading problem may be, nb tri & nod"
-} 
+checktrinfo result -tri 19206 -nod 12547
 
 checkmaxtol result -ref 0.92213088179312575
 checknbshapes result -shell 1
index 5387bdff82543b407722cf8cfba57cd0b196f0bd..f1c814941fa5fb7ec84d8973cb921e67ac46b0a1 100644 (file)
@@ -7,35 +7,11 @@ restore [locate_data_file bug21593_internal_vertices.brep] a
 # enable internal vertices mode
 tclean a
 incmesh a 0.1
-set trinfo_a [trinfo a]
-regexp {([0-9]+) triangles} $trinfo_a str nbtriangles_a
-regexp {([0-9]+) nodes} $trinfo_a str nbnodes_a
-
-# check triangles
-if { $nbtriangles_a != 10 } {
-    puts "Error: incorrect number of triangles in case of internal vertices mode is ON ($nbtriangles_a)"
-}
-
-# check nodes
-if { $nbnodes_a != 8 } {
-    puts "Error: incorrect number of nodes in case of internal vertices mode is ON ($nbnodes_a)"
-}
 
+checktrinfo a -tri 10 -nod 8
 
 # disable internal vertices mode
 tclean a
 incmesh a 0.1 -int_vert_off
-set trinfo_a [trinfo a]
-regexp {([0-9]+) triangles} $trinfo_a str nbtriangles_a
-regexp {([0-9]+) nodes} $trinfo_a str nbnodes_a
-
-# check triangles
-if { $nbtriangles_a != 2 } {
-    puts "Error: incorrect number of triangles in case of internal vertices mode is OFF ($nbtriangles_a)"
-}
-
-# check nodes
-if { $nbnodes_a != 4 } {
-    puts "Error: incorrect number of nodes in case of internal vertices mode is OFF ($nbnodes_a)"
-}
 
+checktrinfo a -tri 2 -nod 4
index c247e253cb5bdd9d1888f5ba8ed59e7a8d61d080..e85c70f954f9f580e6203f66aa78b6d680f1502d 100644 (file)
@@ -36,8 +36,4 @@ if { $nbtri_r > [expr 2. * $nbtri_s] } {
 # extra check: deflection on rough mesh on NURBS
 tclean r
 incmesh r 0.1
-set trinfo_r_01 [trinfo r]
-regexp {deflection ([0-9.+e-]+)} $trinfo_r_01 str defl_r_01
-if { $defl_r_01 > 0.1 } {
-    puts "Error: too big deflection on NURBS face ($defl_r > 0.1)"
-}
+checktrinfo r -max_defl 0.1
index f93ece93037fb3fda6593131bc7080b2558011a2..685540511b24b1d40e6ead5e0a835adf7f4d4a05 100755 (executable)
@@ -10,16 +10,4 @@ restore [locate_data_file bug23105_f372.brep] result
 checkshape result
 
 incmesh result 0.1
-set trinfo_s [trinfo result]
-regexp {([0-9]+) triangles} $trinfo_s str nbtri_s
-regexp {deflection ([0-9.+e-]+)} $trinfo_s str defl_s
-
-# check deflections
-if { $defl_s > 0.1 } {
-    puts "Error: too big deflection ($defl_s > 0.1)"
-}
-
-# compare number of triangles
-if { $nbtri_s == 0 } {
-    puts "Error: shape contains 0 triangles"
-}
+checktrinfo result -tri -max_defl 0.1
index 58a0843d9a76cab2110466b8ccda51d3e5c73d5f..8ec2f86814b8358eff7c95c04040177d70f441a5 100755 (executable)
@@ -13,17 +13,5 @@ restore [locate_data_file bug23106_face_0triangles.brep] result
 incmesh result 0.01
 triangles result 
 
-set tri 0
-set nod 0
-
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { ${tri} > 0 && ${nod} > 0 } {
-    puts "${BugNumber} shading: OK"
-} else {
-    puts "${BugNumber} shading: Faulty"
-}
-
+checktrinfo result -tri -nod
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index b99fead274eecb611c8853823ec5f3968e1ef226..6c1cf19e0cc51d351e432fb6db2d1e1600d29a11 100644 (file)
@@ -9,27 +9,10 @@ puts ""
 restore [locate_data_file bug23614_face1.brep] f1
 tclean f1
 incmesh f1 0.01
-set info [trinfo f1]
-regexp {([0-9]+) triangles} $info full tri
-regexp {([0-9]+) nodes} $info full nod
 
-# compare number of triangles
-if { $tri == 0 } {
-    puts "Error: face contains $tri triangles"
-} else {
-    puts "OK: face contains $tri triangles"
-}
-
-# compare number of nodes
-if { $nod == 0 } {
-    puts "Error : face contains $nod nodes"
-} else {
-    puts "OK: face contains $nod nodes"
-}
+checktrinfo f1 -tri -nod
 
 top
 fit
 triangles f1
 checkview -screenshot -2d -path ${imagedir}/${test_image}.png
-
-
index 3005ce64727968ea94d9d83b05b62f300f09a0bd..7b9f010c3ac25d8036256d516da0ac721ee910f9 100644 (file)
@@ -9,27 +9,10 @@ puts ""
 restore [locate_data_file bug23614_face2.brep] f2
 tclean f2
 incmesh f2 0.01
-set info [trinfo f2]
-regexp {([0-9]+) triangles} $info full tri
-regexp {([0-9]+) nodes} $info full nod
 
-# compare number of triangles
-if { $tri == 0 } {
-    puts "Error: face contains $tri triangles"
-} else {
-    puts "OK: face contains $tri triangles"
-}
-
-# compare number of nodes
-if { $nod == 0 } {
-    puts "Error : face contains $nod nodes"
-} else {
-    puts "OK: face contains $nod nodes"
-}
+checktrinfo f2 -tri -nod
 
 top
 fit
 triangles f2
 checkview -screenshot -2d -path ${imagedir}/${test_image}.png
-
-
index 516ddf204d84c726e422137a624db64fd4cc0ef1..879ccae184db17f2186af7f7e77366cf2c824346 100644 (file)
@@ -9,27 +9,10 @@ puts ""
 restore [locate_data_file bug23614_face3.brep] f3
 tclean f3
 incmesh f3 0.01
-set info [trinfo f3]
-regexp {([0-9]+) triangles} $info full tri
-regexp {([0-9]+) nodes} $info full nod
 
-# compare number of triangles
-if { $tri == 0 } {
-    puts "Error: face contains $tri triangles"
-} else {
-    puts "OK: face contains $tri triangles"
-}
-
-# compare number of nodes
-if { $nod == 0 } {
-    puts "Error : face contains $nod nodes"
-} else {
-    puts "OK: face contains $nod nodes"
-}
+checktrinfo f3 -tri -nod
 
 top
 fit
 triangles f3
 checkview -screenshot -2d -path ${imagedir}/${test_image}.png
-
-
index b15aa59346fbc09b81110b49a68790b3daa78bc0..97b152b3edc3774e5bcfa79faa4f51702ee2cd79 100644 (file)
@@ -9,27 +9,10 @@ puts ""
 restore [locate_data_file bug23614_face4.brep] f4
 tclean f4
 incmesh f4 0.01
-set info [trinfo f4]
-regexp {([0-9]+) triangles} $info full tri
-regexp {([0-9]+) nodes} $info full nod
 
-# compare number of triangles
-if { $tri == 0 } {
-    puts "Error: face contains $tri triangles"
-} else {
-    puts "OK: face contains $tri triangles"
-}
-
-# compare number of nodes
-if { $nod == 0 } {
-    puts "Error : face contains $nod nodes"
-} else {
-    puts "OK: face contains $nod nodes"
-}
+checktrinfo f4 -tri -nod
 
 top
 fit
 triangles f4
 checkview -screenshot -2d -path ${imagedir}/${test_image}.png
-
-
index d30e52e93866553e0783f5dc10b0508271634bcc..3ab080de4261ed06c115a86863c0e3339f2f4e0d 100644 (file)
@@ -13,25 +13,10 @@ restore [locate_data_file OCC396_f2903.brep] result
 incmesh result 0.01
 triangles result 
 
-set tri 0
-set nod 0
-
-set good_tri 38
-set good_nod 40
-
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { ${tri} == ${good_tri} && ${nod} == ${good_nod} } {
-    puts "Bug ${BugNumber} shading: OK"
-} else {
-    puts "Bug ${BugNumber} shading: Faulty"
-}
+checktrinfo result -tri 38 -nod 40
 
 vinit
 vdisplay result
 vfit
 vsetdispmode 1
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
index 5308559b1daaf706741a2ac98adce9a15626daf3..0a8ef0e835041064fe704d8722fcb9190c357beb 100755 (executable)
@@ -14,23 +14,7 @@ incmesh f 1
 
 trinfo f
 
-set trinfo_s [trinfo f]
-regexp {([0-9]+) triangles} ${trinfo_s} str nbtri_s
-regexp {([0-9]+) nodes} ${trinfo_s} str nbnod_s
-regexp {deflection ([0-9.+e-]+)} ${trinfo_s} str defl_s
-
-if { ${nbtri_s} != 99 } {
-   puts "Error: triangle number is bad"
-}
-
-if { ${nbnod_s} != 59 } {
-   puts "Error: node number is bad"
-}
-
-set expected_defl_s 0.59663444648536146
-set tol_abs_defl_s 1.e-3
-set tol_rel_defl_s 0.01
-checkreal "Deflection" ${defl_s} ${expected_defl_s} ${tol_abs_defl_s} ${tol_rel_defl_s}
+checktrinfo f -tri 99 -nod 59 -defl 0.59663444648536146 -tol_abs_defl 1.e-3 -tol_rel_defl 0.01
 
 vinit
 vdisplay f
index d6f888d399715c3c277d076d3f4d01dd37f3d485..69c35715167bea5565f0b549a06a31f33082dcdf 100755 (executable)
@@ -11,25 +11,5 @@ vinit
 vdisplay face
 vfit
 
-set trinfo_s [trinfo face]
-regexp {([0-9]+) triangles} ${trinfo_s} str nbtri_s
-regexp {([0-9]+) nodes} ${trinfo_s} str nbnod_s
-regexp {deflection ([0-9.+e-]+)} ${trinfo_s} str defl_s
-
-if { ${nbtri_s} == 0 } {
-   puts "Error: shape contains 0 triangles"
-} else {
-   puts "OK: shape contains triangles"
-}
-
-if { ${nbnod_s} == 0 } {
-   puts "Error: shape contains 0 nodes"
-} else {
-   puts "OK: shape contains nodes"
-}
-
-if { ${defl_s} == 0 } {
-   puts "Error: deflection is 0"
-} else {
-   puts "OK: deflection is good"
-}
+checktrinfo face -tri -nod -defl
+checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index e5d07e51e2dd457653df5035f9c3f4fa59434835..c1fb88eb25e67bf7b3f8cf9f76eaf70d51528866 100644 (file)
@@ -1,5 +1,5 @@
-puts "TODO OCC24938 ALL: Error: shape contains 0 triangles"
-puts "TODO OCC24938 ALL: Error: shape contains 0 nodes"
+puts "TODO OCC24938 ALL: Error: Number of triangles is equal to 0"
+puts "TODO OCC24938 ALL: Error: Number of nodes is equal to 0"
 
 puts "=========="
 puts "OCC24938"
@@ -16,21 +16,8 @@ restore [locate_data_file bug24938_27773.brep] result
 
 tclean result
 incmesh result 1.5 -relative
-set trinfo_s [trinfo result]
-regexp {([0-9]+) triangles} ${trinfo_s} str nbtri_s
-regexp {([0-9]+) nodes} ${trinfo_s} str nbnod_s
 
-if { ${nbtri_s} == 0 } {
-  puts "Error: shape contains 0 triangles"
-} else {
-  puts "OK: shape contains ${nbtri_s} triangles"
-}
-
-if { ${nbnod_s} == 0 } {
-  puts "Error: shape contains 0 nodes"
-} else {
-  puts "OK: shape contains ${nbnod_s} nodes"
-}
+checktrinfo result -tri -nod
 
 vinit
 vsetdispmode 1
index c47379ab78ced4ee907d29bb9299f7d2604461e7..0d3d691cc7a084aee7a9190d538dc9797d130a9d 100644 (file)
@@ -15,21 +15,8 @@ bcut Cut Cone Cylinder
 explode Cut F
 tclean Cut_1
 incmesh Cut_1 0.1
-set trinfo_s [trinfo Cut_1]
-regexp {([0-9]+) triangles} ${trinfo_s} str nbtri_s
-regexp {([0-9]+) nodes} ${trinfo_s} str nbnod_s
 
-if { ${nbtri_s} == 0 } {
-   puts "Error: shape contains 0 triangles"
-} else {
-   puts "OK: shape contains ${nbtri_s} triangles"
-}
-
-if { ${nbnod_s} == 0 } {
-   puts "Error: shape contains 0 nodes"
-} else {
-   puts "OK: shape contains ${nbnod_s} nodes"
-}
+checktrinfo Cut_1 -tri -nod
 
 vinit
 vdisplay Cut_1
index 791b46283fe0beccc5b03655c98221865b1c282c..6a02314ed3e35f5783fe1f6c17621a0fb53bf3e4 100644 (file)
@@ -11,21 +11,8 @@ pload XDE
 param xstep.cascade.unit M
 stepread [locate_data_file bug25281_tess_infloop_extract.step] a *
 incmesh a_1 0.0002 1
-set trinfo_s [trinfo a_1]
-regexp {([0-9]+) triangles} ${trinfo_s} str nbtri_s
-regexp {([0-9]+) nodes} ${trinfo_s} str nbnod_s
 
-if { ${nbtri_s} == 0 } {
-   puts "Error: shape contains 0 triangles"
-} else {
-   puts "OK: shape contains ${nbtri_s} triangles"
-}
-
-if { ${nbnod_s} == 0 } {
-   puts "Error: shape contains 0 nodes"
-} else {
-   puts "OK: shape contains ${nbnod_s} nodes"
-}
+checktrinfo a_1 -tri -nod
 
 vinit
 vdisplay a_1
index 04517cf536128101a093346cf6727543e58f7b35..05f5b146ef68209d645ead5ba4234aa387a28093 100755 (executable)
@@ -15,31 +15,5 @@ fit
 isos a 0
 triangles a
 
-set trinfo_s [trinfo a]
-regexp {([0-9]+) triangles} ${trinfo_s} str nbtri_s
-regexp {([0-9]+) nodes} ${trinfo_s} str nbnod_s
-regexp {deflection ([0-9.+e-]+)} ${trinfo_s} str defl_s
-
-set good_nbtri 2721
-set good_nbnod 1405
-set good_defl 0.044436924588798624
-
-set good_percent 5
-
-set nbtri_percent [expr abs (${good_nbtri} - ${nbtri_s}) / double (${nbtri_s}) * 100 ]
-set nbnod_percent [expr abs (${good_nbnod} - ${nbnod_s}) / double (${nbnod_s}) * 100 ]
-set defl_percent  [expr abs (${good_defl} - ${defl_s}) / ${defl_s} * 100 ]
-
-if { ${nbtri_percent} > ${good_percent} } {
-  puts "Error: triangle number is bad, it has changed to ${nbtri_percent} %"
-}
-
-if { ${nbnod_percent} > ${good_percent} } {
-  puts "Error: node number is bad, it has changed to ${nbnod_percent} %"
-}
-
-if { ${defl_percent} > ${good_percent} } {
-  puts "Error: deflection is bad, it has changed to ${defl_percent} %"
-}
-
+checktrinfo a -tri 2721 -nod 1405 -defl 0.044436924588798624 -tol_rel_defl 0.05 -tol_rel_tri 0.05 -tol_rel_nod 0.05
 checkview -screenshot -2d -path ${imagedir}/${test_image}.png
index 2c7570165d1abb825970eff5fd83d7c2f9fe8cb3..38f83e73e623f4929e5834dff91c744e4eb89d0e 100755 (executable)
@@ -1,4 +1,5 @@
-puts "TODO OCC12345 ALL: Faulty BUC61057: here can be shading problem"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
+puts "TODO OCC12345 ALL: Error: Number of nodes"
 
 puts "================"
 puts "BUC61057"
@@ -19,16 +20,6 @@ vdisplay result
 vsetdispmode result 1
 vfit
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri != 294 && $nod != 300 }  {
-    puts "Faulty BUC61057: here can be shading problem"
-} else {
-    puts "Shading of BUC61057 is OK"
-}
-
+checktrinfo result -tri 294 -nod 300
 checkprops result -s 33.8757 
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
index a70436ba51eb0b70af0ccc653ec4915bb0a498a2..4e9d33c4ea5bd79640245dad38ded7f3264634f3 100755 (executable)
@@ -17,16 +17,7 @@ triangles result
 set tri 0
 set nod 0
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri == 1874 || $nod == 1861} {
-    puts " OCC179  shading: OK"
-} else {
-    puts " OCC179  shading: Faulty"
-}
-
+checktrinfo result -tri 1874 -nod 1861
 checkprops result -s 12229.8 
 checkshape result
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index cea2cdfec6fdffe9a94805d26f52039f99627b40..729b1d9989ed5644733dd06896da7fb5d7645651 100755 (executable)
@@ -1,5 +1,6 @@
-puts "TODO OCC11111 ALL: Faulty OCC263: here is shading problem"
 puts "TODO OCC11111 ALL: Error : The area of result shape is"
+puts "TODO OCC11111 ALL: Error: Number of triangles"
+puts "TODO OCC11111 ALL: Error: Number of nodes"
 
 puts "========"
 puts "OCC263"
@@ -16,16 +17,7 @@ incmesh result 0.01
 #View the result of mesh
 triangles result
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri != 989 && $nod != 535 }  {
-    puts "Faulty OCC263: here is shading problem"
-} else {
-    puts "Shading of OCC263  is OK"
-}
-
+checktrinfo result -tri 989 -nod 535
 checkprops result -s 0 
 checkshape result
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index 1e587a75500892af3691fe53e2e12b814d665e04..f150faaeb9f14ce124e9ca82a0fcdb75208d7a43 100755 (executable)
@@ -15,15 +15,6 @@ vclear
 isos result 0
 triangles result
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri != 6 && $nod != 8 }  {
-    puts "Faulty OCC264_0: here is shading problem"
-} else {
-    puts "Shading of OCC264_0 is OK"
-}
-
+checktrinfo result -tri 6 -nod 8
 checkprops result -s 1.3135 
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index b0a1a2d15db2ef02e62d1adec22d6ab9bc469ae6..dcc42d2068893d8110b0f5c336a53ee4ebdf4199 100755 (executable)
@@ -1,5 +1,6 @@
-puts "TODO OCC12345 ALL: Faulty OCC264_1: here is shading problem"
 puts "TODO OCC12345 ALL: Error : The area of result shape is"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
+puts "TODO OCC12345 ALL: Error: Number of nodes"
 
 puts "========"
 puts "OCC264"
@@ -17,15 +18,6 @@ vclear
 isos result 0
 triangles result
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri != 26 && $nod != 28 }  {
-    puts "Faulty OCC264_1: here is shading problem"
-} else {
-    puts "Shading of OCC264_1 is OK"
-}
-
+checktrinfo result -tri 26 -nod 28
 checkprops result -s 0 
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index 60e4f39fd16652d124745fe95c0d8f5b5781fdb0..e53621897e3b57e43240ddd7acaa27db2448450c 100755 (executable)
@@ -1,4 +1,5 @@
-puts "TODO OCC12345 ALL: Faulty OCC264_10: here is shading problem"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
+puts "TODO OCC12345 ALL: Error: Number of nodes"
 puts "TODO OCC12345 ALL: Error : The area of result shape is"
 
 puts "========"
@@ -17,15 +18,6 @@ vclear
 isos result 0
 triangles result
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri != 8 && $nod != 10 }  {
-    puts "Faulty OCC264_10: here is shading problem"
-} else {
-    puts "Shading of OCC264_10 is OK"
-}
-
+checktrinfo result -tri 8 -nod 10
 checkprops result -s 0 
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index 31feee32d136f697c912e82b59e1d3168d1b9c17..a2319112c9c1c833ec72b7c5ab45efa4ef53d7f6 100755 (executable)
@@ -1,4 +1,5 @@
-puts "TODO OCC12345 ALL: Faulty OCC264_11: here is shading problem"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
+puts "TODO OCC12345 ALL: Error: Number of nodes"
 puts "TODO OCC12345 ALL: Error : The area of result shape is"
 
 puts "========"
@@ -17,15 +18,6 @@ vclear
 isos result 0
 triangles result
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri != 32 && $nod != 28 }  {
-    puts "Faulty OCC264_11: here is shading problem"
-} else {
-    puts "Shading of OCC264_11 is OK"
-}
-
+checktrinfo result -tri 32 -nod 28
 checkprops result -s 0 
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index 73158711d9d9639e32112ca2dd218696e033dbdf..dc2e857760077d9129b63527abbc1e4af24f3a60 100755 (executable)
@@ -1,4 +1,5 @@
-puts "TODO OCC11111 ALL: Faulty OCC264_12: here is shading problem"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
+puts "TODO OCC12345 ALL: Error: Number of nodes"
 puts "TODO OCC11111 ALL: Error : The area of result shape is"
 
 puts "========"
@@ -16,19 +17,7 @@ vclear
 isos res 0
 triangles result
 
-#smallview
-#fit
-
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri != 19 && $nod != 21 }  {
-    puts "Faulty OCC264_12: here is shading problem"
-} else {
-    puts "Shading of OCC264_12 is OK"
-}
-
+checktrinfo result -tri 19 -nod 21
 checkprops result -s 0 
 checkshape result
 checkview -display result -2d -path ${imagedir}/${test_image}.png
index 4f7559275b2466f16ec6f5ecd3bee0aa637a88ae..e26f08b9230bfd11a92899a00e2b86ec8f7afb82 100755 (executable)
@@ -1,4 +1,5 @@
-puts "TODO OCC12345 ALL: Faulty OCC264_2: here is shading problem"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
+puts "TODO OCC12345 ALL: Error: Number of nodes"
 puts "TODO OCC12345 ALL: Error : The area of result shape is"
 
 puts "========"
@@ -17,18 +18,6 @@ vclear
 isos result 0
 triangles result
 
-smallview
-fit
-
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri != 10 && $nod != 12 }  {
-    puts "Faulty OCC264_2: here is shading problem"
-} else {
-    puts "Shading of OCC264_2 is OK"
-}
-
+checktrinfo result -tri 10 -nod 12
 checkprops result -s 0 
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index 7408eb3e90cd5a05f6a9ca4097dcd23bfdfcc8e8..1d11b575986fe302dad73b1762e78a0d7ba73dd2 100755 (executable)
@@ -1,4 +1,5 @@
-puts "TODO OCC12345 ALL: Faulty OCC264_3: here is shading problem"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
+puts "TODO OCC12345 ALL: Error: Number of nodes"
 puts "TODO OCC12345 ALL: Error : The area of result shape is"
 
 puts "========"
@@ -17,18 +18,6 @@ vclear
 isos result 0
 triangles result
 
-#smallview
-#fit
-
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri != 13 && $nod != 15 }  {
-    puts "Faulty OCC264_3: here is shading problem"
-} else {
-    puts "Shading of OCC264_3 is OK"
-}
-
+checktrinfo result -tri 13 -nod 15
 checkprops result -s 0 
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index fccca89c26b6f7ca2046f3930d7c2fd252cbbd16..bf66b2a9e1ea00efd1062a02502fe138b7a76849 100755 (executable)
@@ -1,4 +1,5 @@
-puts "TODO OCC12345 ALL: Faulty OCC264_4: here is shading problem"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
+puts "TODO OCC12345 ALL: Error: Number of nodes"
 puts "TODO OCC12345 ALL: Error : The area of result shape is"
 
 puts "========"
@@ -17,18 +18,6 @@ vclear
 isos result 0
 triangles result
 
-#smallview
-#fit
-
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri != 13 && $nod != 15 }  {
-    puts "Faulty OCC264_4: here is shading problem"
-} else {
-    puts "Shading of OCC264_4 is OK"
-}
-
+checktrinfo result -tri 13 -nod 15
 checkprops result -s 0 
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index 093e4547e679efa02487c8a1fba3db7095b22174..ac6afab2cf35b38d5db4ab411ff39ae66ba176c8 100755 (executable)
@@ -1,4 +1,5 @@
-puts "TODO OCC12345 ALL: Faulty OCC264_5: here is shading problem"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
+puts "TODO OCC12345 ALL: Error: Number of nodes"
 puts "TODO OCC12345 ALL: Error : The area of result shape is"
 
 puts "========"
@@ -17,18 +18,6 @@ vclear
 isos result 0
 triangles result
 
-#smallview
-#fit
-
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri != 85 && $nod != 87 }  {
-    puts "Faulty OCC264_5: here is shading problem"
-} else {
-    puts "Shading of OCC264_5 is OK"
-}
-
+checktrinfo result -tri 85 -nod 87
 checkprops result -s 0 
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index ca9cad6983a0b2c11de9a37873067e1d7a9934db..5285e22da3d42c56ee3eab8c424065786e9413db 100755 (executable)
@@ -15,18 +15,6 @@ vclear
 isos result 0
 triangles result
 
-#smallview
-#fit
-
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri != 18 && $nod != 20 }  {
-    puts "Faulty OCC264_6: here is shading problem"
-} else {
-    puts "Shading of OCC264_6 is OK"
-}
-
+checktrinfo result -tri 18 -nod 20
 checkprops result -s 19.2399 
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index e0211e1d7a7b03627b0ece7a360ef3948db8e540..8cb01cd32e8d26115961ce4d194f9e40397d7bae 100755 (executable)
@@ -15,18 +15,6 @@ vclear
 isos result 0
 triangles result
 
-#smallview
-#fit
-
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { ($tri != 114 && $nod != 116) && ($tri != 116 && $nod != 118) }  {
-    puts "Shady OCC264_7: here may be shading problem"
-} else {
-    puts "Shading of OCC264_7 is OK"
-}
-
+checktrinfo result -tri 98 -nod 100
 checkprops result -s 150.283 
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index 3810099210efa5e54e855b9a1bf6a4936421ec1f..c67744f79b267d5f95a45bcb48140f8f4baaf7ad 100755 (executable)
@@ -1,4 +1,5 @@
-puts "TODO OCC12345 ALL: Faulty OCC264_8: here is shading problem"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
+puts "TODO OCC12345 ALL: Error: Number of nodes"
 puts "TODO OCC12345 ALL: Error : The area of result shape is"
 
 puts "========"
@@ -17,18 +18,6 @@ vclear
 isos result 0
 triangles result
 
-#smallview
-#fit
-
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri != 19 && $nod != 21 }  {
-    puts "Faulty OCC264_8: here is shading problem"
-} else {
-    puts "Shading of OCC264_8 is OK"
-}
-
+checktrinfo result -tri 19 -nod 21
 checkprops result -s 0 
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index 8e6cba100a518c97e4ed1c5d486fe06889e8edc5..714af63eb76e94fd79cae14557e1e8e82db57733 100755 (executable)
@@ -1,4 +1,5 @@
-puts "TODO OCC12345 ALL: Faulty OCC264_9: here is shading problem"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
+puts "TODO OCC12345 ALL: Error: Number of nodes"
 puts "TODO OCC12345 ALL: Error : The area of result shape is"
 
 puts "========"
@@ -17,18 +18,6 @@ vclear
 isos result 0
 triangles result
 
-#smallview
-#fit
-
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri != 19 && $nod != 21 }  {
-    puts "Faulty OCC264_9: here is shading problem"
-} else {
-    puts "Shading of OCC264_9 is OK"
-}
-
+checktrinfo result -tri 19 -nod 21
 checkprops result -s 0 
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index c0249717a304abddbf93f3a91db42d772a4d4be3..8b0ebed16487b5dbfc6d3d25fca9d45014f792f5 100755 (executable)
@@ -12,16 +12,7 @@ incmesh result 0.01
 #View the result of mesh
 triangles result
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-#$tri != 8091 && $nod != 4121,aki251103
-if { $tri != 5853 && $nod !=  2999 }  {
-  puts "Shady OCC269: shading problem may be, nb tri & nod changed"
-} else {
-  puts "Shading of OCC269 is OK"
-}
+checktrinfo result -tri 3657 -nod 1908
 checkprops result -s 32.9479 
 checkshape result
 checkview -display result -2d -path ${imagedir}/${test_image}.png
index 9e9dda11a6452ecb30a5c01f0f7255e2a20b5623..e63cb190f00258ef61a444fa86c8876de0ca7948 100755 (executable)
@@ -12,16 +12,7 @@ incmesh result 0.01
 #View the result of mesh
 triangles result
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-# $tri != 7627 && $nod != 3888,aki251103
-if { $tri != 6849 && $nod !=  3498 }  {
-  puts "Shady OCC269: shading problem may be"
-} else {
-  puts "Shading of OCC269 is OK"
-}
+checktrinfo result -tri 3991 -nod 2076
 checkprops result -s 32.9479 
 checkshape result
 checkview -display result -2d -path ${imagedir}/${test_image}.png
index 6e8fe3134960473fd8d85f674b0049cbae5a38e9..05272046d50590089142dbdbf27ed7ab8cc819e2 100755 (executable)
@@ -12,16 +12,7 @@ incmesh result 0.01
 #View the result of mesh
 triangles result
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-# $tri != 7524 && $nod != 3840,aki251103
-if { $tri != 6302 && $nod !=   3226 }  {
-  puts "Shady OCC269: shading problem may be, nb tri & nod changed"
-} else {
-  puts "Shading of OCC269 is OK"
-}
+checktrinfo result -tri 3737 -nod 1952
 checkprops result -s 36.4284 
 checkshape result
 checkview -display result -2d -path ${imagedir}/${test_image}.png
index 919b892f9d5d7125b0c22679646286a9c16a749a..003b7b2887aedad21a54c026a5fed5e21b1d2957 100755 (executable)
@@ -12,16 +12,7 @@ incmesh result 0.01
 #View the result of mesh
 triangles result
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-# $tri != 8362 && $nod != 4257
-if { $tri != 7218 && $nod !=  3685 }  {
-  puts "Shady OCC269: shading problem may be, nb tri & nod changed"
-} else {
-  puts "Shading of OCC269 is OK"
-}
+checktrinfo result -tri 4039 -nod 2104
 checkprops result -s 36.4284 
 checkshape result
 checkview -display result -2d -path ${imagedir}/${test_image}.png
index d13d80b47c1860081b6431dba1eb848573e0b006..a78f4f090aca30e4fd26c4f206ee15dc94f685ea 100755 (executable)
@@ -1,5 +1,6 @@
 puts "TODO OCC12345 ALL: Error : The area of result shape is"
-puts "TODO OCC12345 ALL: OCC287 : Faulty"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
+puts "TODO OCC12345 ALL: Error: Number of nodes"
 
 puts "========================"
 puts " OCC287 "
@@ -13,26 +14,7 @@ isos result 0
 incmesh result .1
 triangles result
 
-set tri 0
-set nod 0
-
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri != 604 && $nod != 363} {
-    puts " Warning:  OCC287  looks like OK, but visual checking is required !!!!"
-} else {
-    puts "OCC287 : Faulty"
-}
-
-puts ""
-puts "Besides, it is impossible to load this shape in 3D Viewer"
-vinit
-vdisplay result
-vfit
-vsetdispmode result 1
-
+checktrinfo result -tri !604 -nod !363
 checkprops result -s 0 
 checkshape result
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index d9ed03d895ab1ec917088398a80b2bf181ef3dbf..f8e32507a4edc2a71971fda8d4d9a28b84f89222 100755 (executable)
@@ -17,19 +17,6 @@ vfit
 isos result 0
 triangles result
 
-      set tri 0
-      set nod 0
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-#$tri == 395 && $nod == 350,aki251103.
-if { $tri == 382 && $nod == 343 } {
-       puts " Warning:  OCC291  looks like OK, but visual checking is required !"
-} else {
-       puts " Shady OCC291 : nb tri & nod changed"
-}
-
+checktrinfo result -tri 1135 -nod 823
 checkprops result -s 376.873 
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
index af727fa3e65afe3a2b6bf55fa6de0fae6c5694b4..0a0b88b92f9771a46d7b9db36b83059a6d1ce978 100755 (executable)
@@ -19,16 +19,6 @@ vsetdispmode result 1
 isos result 0
 triangles result
 
-      set tri 0
-      set nod 0
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-if { $tri ==6 && $nod == 8} {
-    puts " Warning:  OCC292  looks like OK, but visual checking is required !!!!"
-} else {
-    puts " OCC292 : Faulty"
-}
-
+checktrinfo result -tri 6 -nod 8
 checkprops result -s 1.3135 
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index bad56fe561049e14cffb6ebfdad8208ffc37e1b4..33d7eac0038dae12edf779dc777f97b140d6e5dd 100755 (executable)
@@ -14,17 +14,6 @@ vdisplay result
 vfit
 vsetdispmode result 1
 
-set tri 0
-set nod 0
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri == 72 && $nod == 74} {
-    puts " OCC347  case 1: OK"
-} else {
-    puts " OCC347  case 1: Faulty"
-}
-
+checktrinfo result -tri 72 -nod 74
 checkprops result -s 314.159 
 checkview -display result -2d -path ${imagedir}/${test_image}.png
index 83de5bb44f5cd5b807eb5e92b7fdf9c268cb482b..d21fc5bced0fc9902ec3108f78dc5d4a9a019aec 100755 (executable)
@@ -14,18 +14,7 @@ vdisplay result
 vfit
 vsetdispmode result 1
 
-set tri 0
-set nod 0
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri == 71 && $nod == 73} {
-       puts " OCC347  case 2: OK"
-} else {
-       puts " OCC347  case 2: Faulty"
-}
-
+checktrinfo result -tri 71 -nod 73
 checkprops result -s 100.531 
 checkview -display result -2d -path ${imagedir}/${test_image}.png
 
index 667796a1a250636af911eefde04054d89e2454d7..256f5617adbddaf0c6e8f8f184029605400761d4 100755 (executable)
@@ -18,24 +18,8 @@ vinit
 vdisplay result
 vfit
 vsetdispmode result 1
-# checkshape res
-# maxtolerance res
-
-set tri 0
-set nod 0
-
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri == 12966 && $nod == 6896} {
-    puts " OCC358  looks like OK"
-} else {
-    puts [format " tri= %s  nod= %s " $tri $nod]
-    puts " OCC358  : Shady (bad shading)"
-}
 
+checktrinfo result -tri 34146 -nod 17507
 checkprops result -s 24861.2 
 checkshape result
 checkview -display result -2d -path ${imagedir}/${test_image}.png
-
index ded7e068fa9ca372f469ffdf7e03e1019789faad..15fc063e8772c33e2e2efa061c5350f16896ff5f 100755 (executable)
@@ -1,4 +1,5 @@
-puts "TODO OCC11111 ALL: OCC358 : Faulty"
+puts "TODO OCC11111 ALL: Error: Number of triangles"
+puts "TODO OCC11111 ALL: Error: Number of nodes"
 puts "TODO OCC11111 ALL: Error : The area of result shape is"
 
 puts "========================"
@@ -15,16 +16,7 @@ vdisplay result
 vfit
 vsetdispmode result 1
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri == 66 && $nod ==70} {
-    puts " Warning:  OCC358  looks like OK, but visual checking is required !!!!"
-} else {
-    puts "OCC358 : Faulty , but visual checking is required !!!!"
-}
-
+checktrinfo result -tri 66 -nod 70
 checkprops result -s 0 
 checkshape result
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 6dc0c338374eedbafd0388c35a342c83a16df2f7..c598c82813bff02339b35a9bc96a913f43567e35 100755 (executable)
@@ -16,18 +16,6 @@ vdisplay result
 vfit
 vsetdispmode result 1
 
-set tri 0
-set nod 0
-
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri == 72 && $nod == 74 } {
-    puts " OCC481 : OK"
-} else {
-    puts " OCC481 : Faulty"
-}
-
+checktrinfo result -tri 72 -nod 74
 checkprops result -s 314.159 
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index e3483a1af8fa6bfaf9d3faa66f52dab7da17495d..ba17735836f19cf6e0435f238acfce7dc2114caa 100644 (file)
@@ -6,30 +6,6 @@ puts ""
 ## The mesh should not rebuild on copied shape
 ###############################
 
-proc CHECKMESH {data nb_tria nb_nodes defl tol} {
-    regexp {This shape contains ([0-9]+) triangles.\s* ([0-9]+) nodes.} $data dummy cur_nb_tria cur_nb_nodes
-    regexp {Maximal deflection ([-0-9.+eE]+)} $data dummy cur_defl
-
-    if {$nb_tria == $cur_nb_tria && $nb_nodes == $cur_nb_nodes && abs($defl - $cur_defl) <= $tol} {
-      puts "OK: Triangulation is not changed"
-    } else {
-      if {$nb_tria != $cur_nb_tria} {
-        puts "Error: Wrong number of triangles, $cur_nb_tria instead of $nb_tria"
-      }
-      if {$nb_nodes != $cur_nb_nodes} {
-        puts "Error: Wrong number of nodes, $cur_nb_nodes instead of $nb_nodes"
-      }
-      set diff [expr {abs($defl - $cur_defl)}]
-      if {$diff > $tol} {
-        puts "Error: Wrong deflection, $cur_defl instead of $defl (difference is $diff)"
-      }
-    }
-    puts ""
-}
-
-###############################
-
-
 pload MODELING
 set tol 1.0e-7
 
@@ -47,17 +23,14 @@ tcopy -m f fc
 
 # Remesh initial face and check it is not changed
 incmesh f 1.0
-set data [trinfo f]
-CHECKMESH $data $base_tria $base_nodes $base_defl $tol
+checktrinfo f -tri ${base_tria} -nod ${base_nodes} -defl ${base_defl} -tol_abs_defl ${tol}
 
 # Compare mesh info from copied shape
-set data [trinfo fc]
-CHECKMESH $data $base_tria $base_nodes $base_defl $tol
+checktrinfo fc -tri ${base_tria} -nod ${base_nodes} -defl ${base_defl} -tol_abs_defl ${tol}
 
 # Remesh copied shape and compare mesh once again
 incmesh fc 1.0
-set data [trinfo fc]
-CHECKMESH $data $base_tria $base_nodes $base_defl $tol
+checktrinfo fc -tri ${base_tria} -nod ${base_nodes} -defl ${base_defl} -tol_abs_defl ${tol}
 
 copy fc result
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index 7ff41a41ab14629c81b83c365b61a20eaa5ad89d..022e4fdec9a464b43aad952223010b049937dec4 100755 (executable)
@@ -12,11 +12,6 @@ checkshape result
 tclean result
 incmesh result .1
 triangles result
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full Maxtriangl
-
-if { $Maxtriangl < 1 } {
-   puts "Error : inside mesh for shading wasn't build"
-}
 
+checktrinfo result -tri
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index 6d758d4527593c959250e2cbf2d548ec24e49619..7d9814ef040dad96a32948bfecae2f3b553ca756 100755 (executable)
@@ -18,24 +18,6 @@ incmesh result 0.01
 #View the result of mesh
 triangles result
 
-##############################################
-if { [catch { set tri_info [trinfo result] } catch_result] } {
-##############################################
-    puts "Faulty OCC1416"
-} else {
-    set ll [ llength ${tri_info} ]
-    if {${ll} < 6} {
-        puts "Faulty OCC1416"
-    } else {
-       regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-       regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-        if { $tri == 0 || $nod == 0 }  {
-            puts "Faulty OCC1416"
-        } else {
-            puts "Warning: OCC1416 looks like OK, but visual checking is required !!!!"
-        }
-    }
-}
-
+checktrinfo result -tri -nod
 checkprops result -s 863.938
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index d3cafc237521e0e3688fae341b18ad368eaeaa0a..d00dc608b4ff998d7b5804d273f3132ddc04a8e3 100755 (executable)
@@ -14,14 +14,5 @@ vdisplay result
 vsetdispmode result 1
 vfit
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-#($tri != 5370,$nod != 2783)($tri != 5356,$nod != 2774)($tri != 5354,$nod != 2773),aki251103
-if { ($tri != 5643 || $nod != 2915) }  {
-   puts "Shady OCC15 : shading problem may be, nb tri & nod were changed"
-}
-
+checktrinfo result -tri 1009 -nod 593
 checkview -display result -2d -path ${imagedir}/${test_image}.png
-
index 8b68df79167d78d49b38f4ae5df6ee32791046f2..a542c69b423a8edcaeaeb53c1cb4e98644eb80f7 100755 (executable)
@@ -1,7 +1,7 @@
-puts "TODO OCC12345 ALL: triangle: Faulty OCC15519"
-puts "TODO OCC12345 ALL: node: Faulty OCC15519"
-puts "TODO OCC12345 ALL: deflection: Faulty OCC15519"
-puts "TODO OCC12345 ALL: Faulty OCC15519"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
+puts "TODO OCC12345 ALL: Error: Number of nodes"
+puts "TODO OCC12345 ALL: Error: Maximal deflection"
+
 puts "============"
 puts "OCC15519"
 puts "============"
@@ -12,29 +12,12 @@ puts ""
 
 set BugNumber OCC15519
 
-proc GetPercent {Value GoodValue} {
-   set Percent 0.
-   if {${GoodValue} != 0.} {
-      set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
-   } elseif {${Value} != 0.} {
-      set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
-   } else {
-      set Percent 0.
-   }
-   return ${Percent}
-}
-
 restore [locate_data_file OCC15519.brep] result
 tclean result
 
 set Deflection 1.
 catch {incmesh result ${Deflection} }
 
-set InfoList [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $InfoList full tri
-regexp { +([-0-9.+eE]+) +nodes} $InfoList full nod
-regexp {Maximal deflection +([-0-9.+eE]+)} $InfoList full defl
-
 if { [string compare $tcl_platform(platform) "windows"] == 0 }  {
    set good_tri  96265
    set good_nod  71339
@@ -45,42 +28,5 @@ if { [string compare $tcl_platform(platform) "windows"] == 0 }  {
    set good_defl 0.99827404224216676
 }
 
-set percent_max 0.1
-set status 0
-
-set triangle_percent [GetPercent ${tri} ${good_tri}]
-puts "triangle_percent = ${triangle_percent}"
-if { ${triangle_percent} > ${percent_max} } {
-   puts "triangle: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "triangle: OK ${BugNumber}"
-}
-
-set node_percent [GetPercent ${nod} ${good_nod}]
-puts "node_percent = ${node_percent}"
-if { ${node_percent} > ${percent_max} } {
-   puts "node: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "node: OK ${BugNumber}"
-}
-
-set deflection_percent [GetPercent ${defl} ${good_defl}]
-puts "deflection_percent = ${deflection_percent}"
-if { ${deflection_percent} > ${percent_max} } {
-   puts "deflection: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "deflection: OK ${BugNumber}"
-}
-
-# Resume
-puts ""
-if { ${status} != 0 } {
-   puts "Faulty ${BugNumber}"
-} else {
-   puts "OK ${BugNumber}"
-}
-
+checktrinfo result -tri ${good_tri} -nod ${good_nod} -defl ${good_defl} -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001
 checkview -display result -2d -path ${imagedir}/${test_image}.png
index 7343b0716098a29c586cb3c2e104c570804de723..ddd91f023380bf37239fb6c1d85c7fff0d837521 100755 (executable)
@@ -10,15 +10,7 @@ vinit
 vdisplay result
 vsetdispmode result 1
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri != 2592 || $nod != 1369 }  {
-   puts "Faulty OCC16: here can be shading problem"
-}
-
 puts "If here is bug - face is displaied in wireframe mode"
 
+checktrinfo result -tri 2592 -nod 1369
 checkview -display result -2d -path ${imagedir}/${test_image}.png
-
index 620208cb4a4de9415e15a8da26bf429cd3471753..2ae73486be9a88e272554b6dbb8df8aa5a95faa4 100755 (executable)
@@ -1,4 +1,5 @@
-puts "TODO OCC12345 ALL: Faulty OCC17: here can be shading problem"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
+puts "TODO OCC12345 ALL: Error: Number of nodes"
 
 puts "================"
 puts "OCC17"
@@ -21,14 +22,5 @@ vdisplay result
 vsetdispmode result 1
 vfit
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri != 100 && $nod != 94 }  {
-  puts "Faulty OCC17: here can be shading problem"
-}
-
+checktrinfo result -tri 100 -nod 94
 checkview -display result -2d -path ${imagedir}/${test_image}.png
-
-
index 41658b8fe01841be7241ee89faecf145e8f44cdc..c8b9c4a5d41b1bf89b3f9fbb49047de8049a20a7 100755 (executable)
@@ -1,4 +1,4 @@
-puts "TODO OCC12345 ALL: Faulty OCC20: here is shading problem"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
 
 puts "================"
 puts "OCC20"
@@ -23,13 +23,5 @@ vviewparams -scale 5.1346924 -proj 0.23495967 -0.302 0.923899 -up -0.7304302 0.5
 isos result 0
 triangles result
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri != 416 || $nod != 367 }  {
-   puts "Faulty OCC20: here is shading problem"
-}
-
+checktrinfo result -tri 416 -nod 367
 checkview -display result -2d -path ${imagedir}/${test_image}.png
-
index c23d37040d9fbf0f74459beed7d429c265cc4dda..1745390a5411f4bb5e7c88a3fce9e1b446906014 100755 (executable)
@@ -1,4 +1,6 @@
-puts "TODO OCC11111 ALL: Faulty OCC21121"
+puts "TODO OCC11111 ALL: Error: Number of triangles"
+puts "TODO OCC11111 ALL: Error: Number of nodes"
+puts "TODO OCC11111 ALL: Error: Maximal deflection"
 puts "TODO OCC11111 ALL: Error : The area of result shape is"
 
 puts "============"
@@ -18,72 +20,6 @@ tclean result
 set Deflection 0.1
 catch {incmesh result ${Deflection} }
 
-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 defl
-
-if { [string compare $tcl_platform(platform) "windows"] == 0 }  {
-   puts "OS = Windows NT"
-   set good_tri  1555
-   set good_nod  1475
-   set good_defl 3.5015692105840144e-06
-} else {
-   puts "OS = Linux"
-   set good_tri  1555
-   set good_nod  1475
-   set good_defl 3.5015692105840144e-06
-}
-
-proc GetPercent {Value GoodValue} {
-    set Percent 0.
-    if {${GoodValue} != 0.} {
-       set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
-    } elseif {${Value} != 0.} {
-       set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
-    } else {
-       set Percent 0.
-    }
-    return ${Percent}
-}
-
-set percent_max 0.1
-set status 0
-
-set triangle_percent [GetPercent ${tri} ${good_tri}]
-puts "triangle_percent = ${triangle_percent}"
-if { ${triangle_percent} > ${percent_max} } {
-   puts "triangle: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "triangle: OK ${BugNumber}"
-}
-
-set node_percent [GetPercent ${nod} ${good_nod}]
-puts "node_percent = ${node_percent}"
-if { ${node_percent} > ${percent_max} } {
-   puts "node: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "node: OK ${BugNumber}"
-}
-
-set deflection_percent [GetPercent ${defl} ${good_defl}]
-puts "deflection_percent = ${deflection_percent}"
-if { ${deflection_percent} > ${percent_max} } {
-   puts "deflection: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "deflection: OK ${BugNumber}"
-}
-
-# Resume
-puts ""
-if { ${status} != 0 } {
-   puts "Faulty ${BugNumber}"
-} else {
-   puts "OK ${BugNumber}"
-}
-
+checktrinfo result -tri 1555 -nod 1475 -defl 3.5015692105840144e-06 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001
 checkprops result -s 0
 checkview -display result -2d -path ${imagedir}/${test_image}.png
index 8b87e09e502c1f6ff8d5fff62e35b927c3cbd827..0a9e8a362eee00ff16a8e8cca53ed4f580deeef7 100755 (executable)
@@ -1,4 +1,4 @@
-puts "TODO OCC11111 ALL: Faulty OCC21122"
+puts "TODO OCC11111 ALL: Error: Maximal deflection"
 
 puts "============"
 puts "OCC21122"
@@ -17,74 +17,9 @@ tclean result
 set Deflection 0.1
 catch {incmesh result ${Deflection} }
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-regexp {Maximal deflection +([-0-9.+eE]+)} $tri_info full defl
-
-
-if { [string compare $tcl_platform(platform) "windows"] == 0 }  {
-   set good_tri  4322
-   set good_nod  4324
-   set good_defl 8.8817872205847652e-16
-   puts "OS = Windows NT"
-} else {
-   puts "OS = Linux"
-   set good_tri  4322
-   set good_nod  4324
-   set good_defl 8.8817872205847652e-16
-}
-
-proc GetPercent {Value GoodValue} {
-    set Percent 0.
-    if {${GoodValue} != 0.} {
-        set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
-    } elseif {${Value} != 0.} {
-       set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
-    } else {
-       set Percent 0.
-    }
-    return ${Percent}
-}
-
-set percent_max 0.1
-set status 0
-
-set triangle_percent [GetPercent ${tri} ${good_tri}]
-puts "triangle_percent = ${triangle_percent}"
-if { ${triangle_percent} > ${percent_max} } {
-   puts "triangle: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "triangle: OK ${BugNumber}"
-}
-
-set node_percent [GetPercent ${nod} ${good_nod}]
-puts "node_percent = ${node_percent}"
-if { ${node_percent} > ${percent_max} } {
-   puts "node: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "node: OK ${BugNumber}"
-}
-
-set deflection_percent [GetPercent ${defl} ${good_defl}]
-puts "deflection_percent = ${deflection_percent}"
-if { ${deflection_percent} > ${percent_max} } {
-   puts "deflection: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "deflection: OK ${BugNumber}"
-}
-
+checktrinfo result -tri 4322 -nod 4324 -defl 8.8817872205847652e-16 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001
 checkprops result -s 275.426
-
 checknbshapes result -vertex 964 -edge 964 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 1931
-if { ${status} != 0 } {
-   puts "Faulty ${BugNumber}"
-} else {
-   puts "OK ${BugNumber}"
-}
 
 vinit
 vdisplay result
@@ -92,4 +27,3 @@ vsetdispmode 1
 vfit
 
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
index 33f33334958ecb8518fb80c946bc43c2c7d9d9da..5b9b2293b81a40f51cf0f16f64b99aadf67f99c5 100755 (executable)
@@ -21,74 +21,7 @@ tclean result
 set Deflection 0.001
 incmesh result ${Deflection}
 
-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 defl
-
-set env(os_type) $tcl_platform(platform)
-if { [string compare $env(os_type) "windows"] != 0 } {
-   puts "OS = Linux"
-   set good_tri  615414
-   set good_nod  311438
-   set good_defl 0.0032657364637550075
-} else {
-   puts "OS = Windows NT"
-   set good_tri  615414
-   set good_nod  311438
-   set good_defl 0.0032657364637550075
-}
-
-proc GetPercent {Value GoodValue} {
-    set Percent 0.
-    if {${GoodValue} != 0.} {
-        set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
-    } elseif {${Value} != 0.} {
-       set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
-    } else {
-       set Percent 0.
-    }
-    return ${Percent}
-}
-
-set percent_max 0.1
-set status 0
-
-set triangle_percent [GetPercent ${tri} ${good_tri}]
-puts "triangle_percent = ${triangle_percent}"
-if { ${triangle_percent} > ${percent_max} } {
-   puts "triangle: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "triangle: OK ${BugNumber}"
-}
-
-set node_percent [GetPercent ${nod} ${good_nod}]
-puts "node_percent = ${node_percent}"
-if { ${node_percent} > ${percent_max} } {
-   puts "node: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "node: OK ${BugNumber}"
-}
-
-set deflection_percent [GetPercent ${defl} ${good_defl}]
-puts "deflection_percent = ${deflection_percent}"
-if { ${deflection_percent} > ${percent_max} } {
-   puts "deflection: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "deflection: OK ${BugNumber}"
-}
-
-# Resume
-puts ""
-if { ${status} != 0 } {
-   puts "Faulty ${BugNumber}"
-} else {
-   puts "OK ${BugNumber}"
-}
+checktrinfo result -tri 615414 -nod 311438 -defl 0.0032657364637550075 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001
 
 vinit
 vdisplay result
index 8e4bca0651feb528043370a16a228a457f55794e..52b4ba932c70a2964c4cfd8236130a98925b5731 100755 (executable)
@@ -12,12 +12,5 @@ vdisplay result
 vsetdispmode result 1
 vfit
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri != 66 && $nod != 66 }  {
-  puts "Error : here is shading problem"
-}
-
+checktrinfo result -tri 66 -nod 66
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index 9c83340861cf478f8379fced7e1f46bfcc0bb374..9a6fee3ba55b55c0ec2fad4ac50bf69ab3b6471e 100755 (executable)
@@ -15,12 +15,5 @@ vsetdispmode result 1
 vfit
 triangles result
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri < 71 || $nod < 73 }  {
-  puts "Error (case 1) : here is shading problem"
-}
-
+checktrinfo result -tri 100 -nod 102
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 9a2b9a37075409e95fe03135c4957b984c0749f1..957d4c114e368f200827a3768f94e82e0671ff3e 100755 (executable)
@@ -15,12 +15,5 @@ vsetdispmode result 1
 vfit
 triangles result
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri < 70 || $nod < 72 }  {
-  puts "Error (case 2) : here is shading problem"
-}
-
+checktrinfo result -tri 70 -nod 72
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 48561615ab0401463ac67ab6fa432a640653de5d..b3c77b8c595658bc1389f4e2fa255f50d8036257 100755 (executable)
@@ -20,14 +20,5 @@ isos result 0
 triangles result
 vfit
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri == 5496 && $nod == 5406 }  {
-    puts "Warning OCC428: here is shading problem, but source shape is invalid"
-} else {
-     puts "Warning OCC428: Shading of OCC428 was made, source shape is invalid"
-}
-
+checktrinfo result -tri !5496 -nod !5406
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 9d7f8b2b3321dbe08d26e98bdb6805032735b866..e9d13e962ea853f8db14aeb87f6fed5e8a4cfc88 100755 (executable)
@@ -14,12 +14,5 @@ isos result 0
 incmesh result .1
 triangles result
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri == 0 || $nod == 0 } {
-    puts "Error : Meshing algo cannot create mesh for faces with internal edges "
-}
-
+checktrinfo result -tri -nod
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index 3897d2dd3d60d236468d22512781774a7815ea55..c56e446c418f01a9178abeec06bc3d4427c69339 100755 (executable)
@@ -14,12 +14,5 @@ isos result 0
 incmesh result .1
 triangles result
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-if { $tri == 0 || $nod == 0 } {
-    puts "Error : Meshing algo cannot create mesh for faces with internal edges "
-}
-
+checktrinfo result -tri -nod
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index be9f6a8d6c447e630b1a50b4c75df634c50a4d99..5ff80e69d50372dd7f965b2f8ca43b7e4cc35243 100755 (executable)
@@ -14,19 +14,10 @@ tclean result
 vinit
 vdisplay result
 vsetdispmode result 1
+vfit
 
 isos result 0
 triangles result
 
-set tri 0
-set nod 0
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-if { ${tri} == 0 && ${nod} == 0 } {
-    puts "Faulty ${BugNumber}"
-} else {
-    puts "OK ${BugNumber}"
-}
-
+checktrinfo result -tri -nod
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 521cf9f097fbfd111a02b5334e09ad2deece7411..92646513abcbead75e53fd3e2d733b020c2bb37f 100755 (executable)
@@ -1,4 +1,5 @@
-puts "TODO OCC12345 ALL: Error : here is shading problem"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
+puts "TODO OCC12345 ALL: Error: Number of nodes"
 
 puts "============"
 puts "FRA62476"
@@ -15,12 +16,5 @@ tclean result
 incmesh result .1
 triangles result
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri != 93 && $nod != 56 } {
-   puts "Error : here is shading problem"
-}
-
+checktrinfo result -tri 93 -nod 56
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index b3e4128dcf1af84fb3c46118fa3520c06ddeaa55..96502d6820ab209fef4e685c3ed625accb2f0470 100755 (executable)
@@ -1,4 +1,3 @@
-
 puts "=========="
 puts "FRA62476"
 puts ""                                                                                  
@@ -14,13 +13,5 @@ tclean result
 incmesh result .1
 triangles result
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri !=239 && $nod != 145 } {
-   puts "Shady FRA62476: here may be shading problem, number tri & nod
-   are changed"
-}
-
+checktrinfo result -tri 1919 -nod 1008
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index a3a561dc4e1af29a17285eec0ecc5b8bd06165c7..6be7871d92a9b3621017361059ded06a15ad038f 100755 (executable)
@@ -1,4 +1,5 @@
-puts "TODO OCC12345 ALL: Faulty PRO20333: here is shading problem"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
+puts "TODO OCC12345 ALL: Error: Number of nodes"
 
 puts "============"
 puts "PRO20333"
@@ -15,12 +16,5 @@ isos result 0
 incmesh result .1
 triangles result
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri != 107 || $nod != 109 } {  
-   puts "Faulty PRO20333: here is shading problem"
-}
-
+checktrinfo result -tri 107 -nod 109
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index 990a9dd6d0ce1768bbc8721bd3796358e69ceeec..14fddf00daf9f813ce91bdb0819f5d71fcc0ea13 100644 (file)
@@ -9,15 +9,8 @@ puts ""
 bsplinesurf s 2 4 0.0 3 0.34 1 0.67 1 1.0 3 1 2 0.0 2 1.0 2 10 0 0 1 6 0 0 1 4 0 0 1 2 0 0 1 0 0 0 1 10 5 0 1 6 5 0 1 4 5 0 1 1.5 9 0 1 0 5 0 1
 mkface result s
 incmesh result 1
-set tri_info [trinfo result]
-regexp {deflection ([0-9.+e-]+)} $tri_info full defl
 
-# check deflections
-if { $defl > 1 } {
-  puts "Error: too big deflection on original face (${defl} > 1)"
-} else {
-  puts "Deflection is OK (${defl})"
-}
+checktrinfo result -max_defl 1
 
 vdisplay result
 vsetdispmode 1
index a9b6e968cd9c19ef22519035b12d12af8dfa461f..374c582a90789524fb2fbb56a81a5ac509f07e81 100644 (file)
@@ -9,15 +9,8 @@ puts ""
 bsplinesurf s 2 12 0.0 3 0.1 1 0.2 1 0.3 1 0.4 1 0.5 1 0.525 1 0.55 1 0.575 1 0.8 1 0.9 1 1.0 3 1 2 0.0 2 1.0 2 16 0 0 1 14 0 0 1 12 0 0 1 10 0 0 1 8 0 0 1 6 0 0 1 4 0 0 1 2 0 0 1 0 0 0 1 -2 0 0 1 -4 0 0 1 -6 0 0 1 -8 0 0 1 16 5 0 1 14 5 0 1 12 5 0 1 10 5 0 1 8 5 0 1 6 5 0 1 4 5 0 1 1.5 9 0 1 0 5 0 1 -2 5 0 1 -4 5 0 1 -6 5 0 1 -8 5 0 1
 mkface result s
 incmesh result 1
-set tri_info [trinfo result]
-regexp {deflection ([0-9.+e-]+)} $tri_info full defl
 
-# check deflections
-if { $defl > 1 } {
-  puts "Error: too big deflection on original face (${defl} > 1)"
-} else {
-  puts "Deflection is OK (${defl})"
-}
+checktrinfo result -max_defl 1
 
 vdisplay result
 vsetdispmode 1
index 7ca2f92386c5520bdecb6b6ba1615a8feeeb0914..b8aff0be968aa75cc51e7d53364c44ea778fc0d0 100755 (executable)
@@ -13,22 +13,7 @@ restore [locate_data_file bug25179_nurbs-with-partial-seam.brep] result
 tclean result
 incmesh result 0.1
 
-set trinfo_s [trinfo result]
-regexp {([0-9]+) triangles} ${trinfo_s} str nbtri_s
-regexp {([0-9]+) nodes} ${trinfo_s} str nbnod_s
-regexp {deflection ([0-9.+e-]+)} ${trinfo_s} str defl_s
-
-if { ${nbtri_s} == 0 } {
-   puts "Error: shape contains 0 triangles"
-}
-
-if { ${nbnod_s} == 0 } {
-   puts "Error: shape contains 0 nodes"
-}
-
-if { ${defl_s} == 0 } {
-   puts "Error: deflection is 0"
-}
+checktrinfo result -tri -nod -defl
 
 if [catch { tricheck result } ] {
   puts "Error : Problem of build a mesh on specific geometry"
index a0f471f470afb24caf64e1f1f00efb2571355fb0..8d8fd6c09d5b0cc51d04d12cd250f8e2270c030b 100755 (executable)
@@ -16,21 +16,6 @@ restore [locate_data_file bug26359_parabola.brep] p
 vdisplay p
 vfit
 
-set trinfo_s [trinfo p]
-regexp {([0-9]+) triangles} ${trinfo_s} str nbtri_s
-regexp {([0-9]+) nodes} ${trinfo_s} str nbnod_s
-regexp {deflection ([0-9.+e-]+)} ${trinfo_s} str defl_s
-
-if { ${nbtri_s} == 0 } {
-   puts "Error: shape contains 0 triangles"
-}
-
-if { ${nbnod_s} == 0 } {
-   puts "Error: shape contains 0 nodes"
-}
-
-if { ${defl_s} == 0 } {
-   puts "Error: deflection is 0"
-}
+checktrinfo p -tri -nod -defl
 
 vdump ${imagedir}/${casename}.png
index 84468bdee73e9eb4863be3b3568340517c384342..4e39634c709c9d3ae49b161d6f2f3fe0bdade1e7 100755 (executable)
@@ -20,13 +20,5 @@ vdisplay result
 vsetdispmode 1
 vfit
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri == 0 || $nod == 0 } {
-   puts "Error : here is shading problem"
-}
-
+checktrinfo result -tri -nod
 checkview -display result -2d -path ${imagedir}/${test_image}.png
-
index 33b0d21aed81fa489d079818ee5143ce66478f25..48fcceafc800c01ce1b04b0c0d47cc1b69f8a5c2 100755 (executable)
@@ -20,12 +20,5 @@ vdisplay result
 vsetdispmode 1
 vfit
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri == 0 || $nod == 0 } {
-   puts "Error : here is shading problem"
-}
-
+checktrinfo result -tri -nod
 checkview -display result -2d -path ${imagedir}/${test_image}.png
index c16a088fb081a6be6ef109d2283146d9c637687d..b6afc894ee4d40224669d88fefc03fb5b0aa64bb 100755 (executable)
@@ -22,13 +22,5 @@ vdisplay result
 vsetdispmode 1
 vfit
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri == 0 || $nod == 0 } {
-   puts "Error : here is shading problem"
-}
-
+checktrinfo result -tri -nod
 checkview -display result -2d -path ${imagedir}/${test_image}.png
-
index ef929d518e66a3151e56a64e3ff29a1f70e37f19..23c7cc6c5e893480a970b92ff8b08cdf15d098a7 100755 (executable)
@@ -21,13 +21,5 @@ vdisplay result
 vsetdispmode 1
 vfit
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri == 0 || $nod == 0 } {
-   puts "Error : here is shading problem"
-}
-
+checktrinfo result -tri -nod
 checkview -display result -2d -path ${imagedir}/${test_image}.png
-
index 5bbe00d0296ce02edf52adbd8db9a2316d9f0862..7fb62ea52c81e3b7c83abb89291bc066547b07f4 100755 (executable)
@@ -26,16 +26,7 @@ Number of shapes in shape
 "
 
 checknbshapes b -ref ${nbshapes_expected_b} -t -m "Box"
-
-set tri_info_b [trinfo b]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info_b full tri_b
-regexp { +([-0-9.+eE]+) +nodes} $tri_info_b full nod_b
-if { $tri_b != 12} {
-  puts "Error: bad triangle numbers in box"
-}
-if { $nod_b != 24} {
-  puts "Error: bad node numbers in box"
-}
+checktrinfo b -tri 12 -nod 24
 
 vinit
 vsetdispmode 1
@@ -51,15 +42,7 @@ writevrml b ${aFile} 2 2
 
 loadvrml res ${aFile}
 
-set tri_info [trinfo res]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-if { $tri != 12} {
-  puts "Error: bad triangle numbers in box from VRML file"
-}
-if { $nod != 24} {
-  puts "Error: bad node numbers in box from VRML file"
-}
+checktrinfo res -tri 12 -nod 24
 
 set nbshapes_expected "
 Number of shapes in shape
index 02cf7ca40f076b431ecbdc8d07cc6f6037f31e3c..0edcd42d5a1e8c99b1b25d96407d01c7946134d6 100755 (executable)
@@ -21,21 +21,12 @@ set mode 2
 
 writevrml res ${aFile} ${version} ${mode}
 
-set TrinfoAfter [trinfo res]
-set Log [loadvrml test ${aFile}]
-
-set status 1
+checktrinfo res -ref "${TrinfoBefore}"
 
-if { $TrinfoBefore != $TrinfoAfter } {
-  set status 0 
-}
+set Log [loadvrml test ${aFile}]
 
 if { [string length $Log] != 0 } {
-  set status 0 
-}
-
-if {$status == 1} {
-  puts "OK ${BugNumber}"
-} else {
   puts "Faulty ${BugNumber}"
+} else {
+  puts "OK ${BugNumber}"
 }
index ee58d0428dff781f2913f3deeb1cfa8944dbbd35..264e5077b201dc4b6e046cdd552da6f806990cfe 100755 (executable)
@@ -36,12 +36,5 @@ tclean result
 vdisplay result
 vsetdispmode result 1
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri == 0 || $nod ==0 }  {
-  puts "Error : here is shading problem"
-}
-
+checktrinfo result -tri -nod
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 39cf8243b29ac2c289940a21c8f21787630e1986..326a92670973c9c7373bef3a7c2984e815ff679e 100755 (executable)
@@ -23,12 +23,5 @@ vsetdispmode result 1
 isos result 0
 triangles result
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tr
-regexp { +([-0-9.+eE]+) +nodes} $info full nd
-
-if { $tr == 0 || $nd == 0 }  {
-   puts "Error : here is shading problem"
-}
-
+checktrinfo result -tri -nod
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 629f84a5fc7c0cab40fbbba1d39bec125af101af..c7206286f1a6238eb353362d14be6b91126513fd 100755 (executable)
@@ -10,12 +10,5 @@ tclean result
 incmesh result .9
 triangles result
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri != 88 && $nod != 90 }  {
-  puts "Faulty OCC19: here is shading problem"
-}
-
+checktrinfo result -tri 88 -nod 90
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index db477de727b5bcacb5cef6becf6789d2223604ae..063d0e99a70a5b5dfdb93f4e032c3fa3a431595b 100755 (executable)
@@ -13,14 +13,5 @@ vsetdispmode result 1
 isos result 0
 triangles result
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-#$tri/$nod:122/124aki251103
-
-if { $tri != 83 && $nod !=  85 }  {
-  puts "Shady OCC19: shading problem may be, nb tri & nod were changed"
-}
-
+checktrinfo result -tri 129 -nod 131
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 7613484ae4a7a6e5f3bfa0d46dc5855eece10bc8..58b11908f16ba6b24c0b381bde745666f0e4eff8 100755 (executable)
@@ -15,20 +15,7 @@ vdisplay result
 vsetdispmode 1
 vfit
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-puts [format " tri= %s  noe= %s " $tri $nod]
-
-# Resume
-puts ""
-if { ${tri} == 0 } {
-   puts "Faulty ${BugNumber}"
-} else {
-   puts "OK ${BugNumber}"
-}
-
+checktrinfo result -tri
 checkprops result -s 9.92128e+06 
 checkshape result
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 7eb55538dd452d042083e55d7161024233c36aa0..efeaa7fceda5d7fa613564f0aa9127f50a7439fe 100755 (executable)
@@ -1,4 +1,5 @@
-puts "TODO OCC11111 ALL: OCC21578: Faulty"
+puts "TODO OCC11111 ALL: Error: Number of triangles"
+puts "TODO OCC11111 ALL: Error: Number of nodes"
 puts "TODO OCC11111 ALL: Error : The area of result shape is"
 
 puts "============"
@@ -19,35 +20,7 @@ vsetdispmode 1
 vdisplay result
 vfit
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-regexp {Maximal deflection +([-0-9.+eE]+)} $tri_info full defl
-
-set good_tri 231
-set good_nod 236
-set good_defl 0.004029564463949387
-
-puts [format " Triangles= %s  Nodes= %s Deflection= %s " $tri $nod $defl]
-
-set status 0
-if {${tri} != ${good_tri}} {
-  set status 1
-}
-if {${nod} != ${good_nod}} {
-  set status 1
-}
-#if {${defl} != ${good_defl}} {
-#  set status 1
-#}
-
-if { ${status} != 0 } {
-  puts "${BugNumber}: Faulty"
-} else {
-  puts "${BugNumber}: OK"
-}
-
+checktrinfo result -tri 231 -nod 236
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
 checkprops result -s 0 
 checkshape result
-
index 55e1aa31896d96b4a2385c6342d20e88ce638172..3fded74fdc33048994703f09594002ac03fd417d 100755 (executable)
@@ -1,4 +1,6 @@
-puts "TODO OCC11111 ALL: Faulty OCC22188"
+puts "TODO OCC11111 ALL: Error: Number of triangles"
+puts "TODO OCC11111 ALL: Error: Number of nodes"
+puts "TODO OCC11111 ALL: Error: Maximal deflection"
 
 puts "============"
 puts "OCC22188"
@@ -18,11 +20,6 @@ vdisplay result
 vsetdispmode 1
 vfit
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-regexp {Maximal deflection +([-0-9.+eE]+)} $tri_info full defl
-
 if { [string compare $tcl_platform(platform) "windows"] == 0 }  {
    set good_tri  6114
    set good_nod  3080
@@ -33,56 +30,8 @@ if { [string compare $tcl_platform(platform) "windows"] == 0 }  {
     set good_defl 0.5153628044287929
 }
 
-proc GetPercent {Value GoodValue} {
-    set Percent 0.
-    if {${GoodValue} != 0.} {
-       set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
-    } elseif {${Value} != 0.} {
-       set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
-    } else {
-       set Percent 0.
-    }
-    return ${Percent}
-}
-
-set percent_max 0.1
-set status 0
-
-set triangle_percent [GetPercent ${tri} ${good_tri}]
-puts "triangle_percent = ${triangle_percent}"
-if { ${triangle_percent} > ${percent_max} } {
-   puts "triangle: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "triangle: OK ${BugNumber}"
-}
-
-set node_percent [GetPercent ${nod} ${good_nod}]
-puts "node_percent = ${node_percent}"
-if { ${node_percent} > ${percent_max} } {
-   puts "node: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "node: OK ${BugNumber}"
-}
-
-set deflection_percent [GetPercent ${defl} ${good_defl}]
-puts "deflection_percent = ${deflection_percent}"
-if { ${deflection_percent} > ${percent_max} } {
-   puts "deflection: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "deflection: OK ${BugNumber}"
-}
-
+checktrinfo result -tri ${good_tri} -nod ${good_nod} -defl ${good_defl} -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001
 checkprops result -s 32416.7
 checkshape result
-
 checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9
-if { ${status} != 0 } {
-   puts "Faulty ${BugNumber}"
-} else {
-   puts "OK ${BugNumber}"
-}
-
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 37d3e5cbf3cc1160ea0179d22131dbb2253bdd2c..53e2fcf5b665c802d285af2f89752f52f06f146d 100755 (executable)
@@ -17,32 +17,5 @@ vfit
 
 vsetdispmode 1
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-
-set status 0
-
-if { ${tri} > 0 } {
-   puts "triangles: OK ${BugNumber}"
-} else {
-   puts "triangles: Faulty ${BugNumber}"
-   set status 1
-}
-
-if { ${nod} > 0 } {
-   puts "nodes: OK ${BugNumber}"
-} else {
-   puts "nodes: Faulty ${BugNumber}"
-   set status 1
-}
-
-# Resume
-puts ""
-if { ${status} != 0 } {
-   puts "Faulty ${BugNumber}"
-} else {
-   puts "OK ${BugNumber}"
-}
-
+checktrinfo result -tri -nod
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 2b9e69bc8257c229bc420e23c3eb8040698a49ac..fe239d6f0f1dba9e435dbbb4455a27091947a256 100755 (executable)
@@ -1,4 +1,6 @@
-puts "TODO OCC11111 ALL: Faulty OCC22502"
+puts "TODO OCC11111 ALL: Error: Number of triangles"
+puts "TODO OCC11111 ALL: Error: Number of nodes"
+puts "TODO OCC11111 ALL: Error: Maximal deflection"
 
 puts "============"
 puts "OCC22502"
@@ -20,64 +22,7 @@ tclean result
 set Deflection 0.001
 incmesh result ${Deflection}
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-regexp {Maximal deflection +([-0-9.+eE]+)} $tri_info full defl
-
-set good_tri  170
-set good_nod  172
-set good_defl 0.00061201255663038154
-
-proc GetPercent {Value GoodValue} {
-    set Percent 0.
-    if {${GoodValue} != 0.} {
-       set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
-    } elseif {${Value} != 0.} {
-         set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
-    } else {
-       set Percent 0.
-    }
-    return ${Percent}
-}
-
-set percent_max 0.1
-set status 0
-
-set triangle_percent [GetPercent ${tri} ${good_tri}]
-puts "triangle_percent = ${triangle_percent}"
-if { ${triangle_percent} > ${percent_max} } {
-   puts "triangle: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "triangle: OK ${BugNumber}"
-}
-
-set node_percent [GetPercent ${nod} ${good_nod}]
-puts "node_percent = ${node_percent}"
-if { ${node_percent} > ${percent_max} } {
-   puts "node: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "node: OK ${BugNumber}"
-}
-
-set deflection_percent [GetPercent ${defl} ${good_defl}]
-puts "deflection_percent = ${deflection_percent}"
-if { ${deflection_percent} > ${percent_max} } {
-   puts "deflection: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "deflection: OK ${BugNumber}"
-}
-
-# Resume
-puts ""
-if { ${status} != 0 } {
-   puts "Faulty ${BugNumber}"
-} else {
-   puts "OK ${BugNumber}"
-}
+checktrinfo result -tri 170 -nod 172 -defl 0.00061201255663038154 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001
 
 vinit
 vdisplay result
index f4898f219870c5340915de828a5fd5d24368b329..3029d7480efaaa678133abb9e1d6fac1e68b5eae 100755 (executable)
@@ -17,33 +17,5 @@ vfit
 
 vsetdispmode 1
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-regexp {Maximal deflection +([-0-9.+eE]+)} $tri_info full defl
-
-set status 0
-
-if { ${tri} > 0 } {
-   puts "triangles: OK ${BugNumber}"
-} else {
-   puts "triangles: Faulty ${BugNumber}"
-   set status 1
-}
-
-if { ${nod} > 0 } {
-   puts "nodes: OK ${BugNumber}"
-} else {
-   puts "nodes: Faulty ${BugNumber}"
-   set status 1
-}
-
-# Resume
-puts ""
-if { ${status} != 0 } {
-   puts "Faulty ${BugNumber}"
-} else {
-   puts "OK ${BugNumber}"
-}
-
+checktrinfo result -tri -nod
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 75e1fd27de668a1bc7a4e3123e159d0e60829b52..fd35fd8a7092d17cec706b27d69bceddc2c8a63c 100755 (executable)
@@ -16,63 +16,7 @@ restore [locate_data_file OCC22735-march_cube.brep] result
 
 vdisplay result
 
-set tri_info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
-regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
-regexp {Maximal deflection +([-0-9.+eE]+)} $tri_info full defl
-
-set good_tri  48
-set good_nod  96
-set good_defl 0
-
-proc GetPercent {Value GoodValue} {
-    set Percent 0.
-    if {${GoodValue} != 0.} {
-       set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
-    } elseif {${Value} != 0.} {
-       set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
-    } else {
-       set Percent 0.
-    }
-    return ${Percent}
-}
-set percent_max 0.1
-set status 0
-
-set triangle_percent [GetPercent ${tri} ${good_tri}]
-puts "triangle_percent = ${triangle_percent}"
-if { ${triangle_percent} > ${percent_max} } {
-   puts "triangle: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "triangle: OK ${BugNumber}"
-}
-
-set node_percent [GetPercent ${nod} ${good_nod}]
-puts "node_percent = ${node_percent}"
-if { ${node_percent} > ${percent_max} } {
-   puts "node: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "node: OK ${BugNumber}"
-}
-
-set deflection_percent [GetPercent ${defl} ${good_defl}]
-puts "deflection_percent = ${deflection_percent}"
-if { ${deflection_percent} > ${percent_max} } {
-   puts "deflection: Faulty ${BugNumber}"
-   set status 1
-} else {
-   puts "deflection: OK ${BugNumber}"
-}
-
-# Resume
-puts ""
-if { ${status} != 0 } {
-   puts "Faulty ${BugNumber}"
-} else {
-   puts "OK ${BugNumber}"
-}
+checktrinfo result -tri 48 -nod 96 -defl 0 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001
 
 vfit
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index a1378a86c7f376e44dd07eeb4ced5c5bb1a9ac49..adaf1c3dc5f1b158f719c1cbcba8adad8c120f0d 100644 (file)
@@ -28,8 +28,9 @@ set tri_info [trinfo s]
 regexp { +([-0-9.+eE]+) +triangles} $tri_info full triIncmesh1
 
 vdisplay s
-set tri_info [trinfo s]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full triAutoTrShape
+
+checktrinfo s -tri !${triIncmesh1}
+
 vfit
 vdump $aShapeAutoTr
 
@@ -41,14 +42,8 @@ set tri_info [trinfo s]
 regexp { +([-0-9.+eE]+) +triangles} $tri_info full triIncmesh2
 
 vdisplay s
-set tri_info [trinfo s]
-regexp { +([-0-9.+eE]+) +triangles} $tri_info full triNotAutoTrShape
+
+checktrinfo s -tri ${triIncmesh2}
+
 vfit
 vdump $aShapeNotAutoTr
-
-if {${triIncmesh1} == ${triAutoTrShape}} {
-  puts "ERROR : Test failed. Incorrect triangulation in case of enabled auto triangulation feature."
-}
-if {${triIncmesh2} != ${triNotAutoTrShape}} {
-  puts "ERROR : Test failed. Incorrect triangulation in case of disabled auto triangulation feature."
-}
index 3b4153c8ae7ebd0d129bdd772e49f494072a9736..59ca1eaddec6f740ec1d385059f9095290ff0fb3 100755 (executable)
@@ -14,18 +14,5 @@ isos result 0
 triangles result
 vfit
 
-set tri 0
-set nod 0
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-puts [format " tri= %s  nod= %s " $tri $nod]
-
-if { $tri != 5148 && $nod != 3042} {
-   puts " Warning:  OCC288 (case 1)  looks like OK, but visual checking is required!!"
-} else {
-   puts " OCC288 (case 1) : Faulty"
-}
-
+checktrinfo result -tri !5148 -nod !3042
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
index 1efb94dfab016b91e8e4065f552d3d341153d734..7435a43023691699e1e39a6fd3d0756f56605bec 100755 (executable)
@@ -14,17 +14,5 @@ isos result 0
 triangles result
 vfit
 
-set tri 0
-set nod 0
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-puts [format " tri= %s  nod= %s " $tri $nod]
-
-if { $tri != 1170 && $nod != 647} {
-   puts " Warning:  OCC288 (case 2)  looks like OK, but visual checking is required !!!!"
-} else {
-   puts " OCC288 (case 2) : Faulty"
-}
-
+checktrinfo result -tri !1170 -nod !647
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 00aeb7521d451933a6c29acc5419e387d3388335..7592e93bd9f8bae768ebe3d75a047cd00c3f24b3 100755 (executable)
@@ -14,18 +14,5 @@ isos result 0
 triangles result
 vfit
 
-set tri 0
-set nod 0
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-puts [format " tri= %s  nod= %s " $tri $nod]
-
-if { $tri != 1832 && $nod != 1574} {
-   puts " Warning:  OCC288 (case 3)  looks like OK, but visual checking is required !!!!"
-} else {
-   puts " OCC288 (case 3) : Faulty"
-}
-
+checktrinfo result -tri !1832 -nod !1574
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
index 9d67af88dc5e717bec3a421839a40a4ee2569744..08f3e7a815e239be27ed152ddf61151b713888de 100755 (executable)
@@ -14,18 +14,5 @@ isos result 0
 triangles result
 vfit
 
-set tri 0
-set nod 0
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-puts [format " tri= %s  nod= %s " $tri $nod]
-
-if { $tri != 4176 && $nod != 2857} {
-   puts "Warning:  OCC288 (case 4)  looks like OK, but visual checking is required !!!!"
-} else {
-   puts " OCC288 (case 4) : Faulty"
-}
-
+checktrinfo result -tri !4176 -nod !2857
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
index 10b8f1095d18d756de4d0c6d77f5eb1e3bc496b4..612fd8401b5c195e5c88ba1daa14b4d2bb3090d2 100755 (executable)
@@ -13,20 +13,5 @@ isos result 0
 triangles result
 vfit
 
-set tri 0
-set nod 0
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-puts [format " tri= %s  nod= %s " $tri $nod]
-
-# ($tri == 7826 && $noe == 8246) || ($tri == 8218 && $noe == 8638),aki251103
-
-if { ($tri == 6268 && $noe == 6688) } {
-   puts "Shading of OCC288 (case 5)  looks like OK, but visual checking is required !"
-} else {
-   puts " Shady: Shading of OCC288 (case 5) may be bad, nb tri & nod changed"
-}
-
+checktrinfo result -tri 9448 -nod 9080
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
index 7d4efdff86b81484863774bf7456787e3ed29dc3..f2cc81f28b3c030129033b063296a5f34983ea4c 100755 (executable)
@@ -14,20 +14,6 @@ vdisplay result
 vsetdispmode result 1
 vfit
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri == 212909 && $nod == 158362 } {
-   puts "Warning OCC316: here is shading problem (some faces are lost)"
-} else {
-  if { $tri == 0 || $nod == 0 } {
-  puts " Warning  OCC316: here is shading problem (shading mesh is NOT created)"
-  isos result 0
-  } else {
-    puts "Warning: Shading of OCC316 looks OK, but visual checking is required"
-  }
-}
-
+checktrinfo result -tri !212909 -nod !158362
+checktrinfo result -tri -nod
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
index 691040582f6d1247f3a50ff0e0c5c84543a1fa6f..a0fb3915a2b642ca120fb1be22b737bef9abbb36 100755 (executable)
@@ -29,13 +29,6 @@ set at_Z     6.47028180612483
 
 vviewparams -scale ${scale} -proj ${proj_X} ${proj_Y} ${proj_Z} -up ${up_X} ${up_Y} ${up_Z} -at ${at_X} ${at_Y} ${at_Z}
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri == 0 || $nod == 0 }  {
-  puts "Faulty OCC319: here is shading problem"
-}
-
+checktrinfo result -tri -nod
 checkprops result -s 8623.6
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index b46ccb0453922127977fcf308432fd6c5dd520bf..8b4af3c34b44d071b595c681ff9428d986c92494 100755 (executable)
@@ -20,20 +20,5 @@ vfit
 vsetdispmode result 1
 vfit
 
-set tri 0
-set nod 0
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-puts [format " tri= %s  nod= %s " $tri $nod]
-
-if { $tri != 3808 && $nod != 2188} {
-   puts " OCC331: Looks like OK, but visual checking is required!!!"
-} else {
-   puts " OCC331: Faulty - Dark spot on a sphere after nurbsconvert"
-}
-
-
+checktrinfo result -tri !3808 -nod !2188
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
-
index 2c79cea42688a92ec8429b6d8fff5be432a8e760..8ce12988667e3e6296405925cd3360f05fbef257 100755 (executable)
@@ -20,14 +20,5 @@ vclear
 isos result 0
 triangles result
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri == 9 && $nod == 8 }  {
-   puts "Warning OCC344: here is shading problem"
-} else {
-   puts "Shading of OCC344 looks like OK, but visual checking is required"
-}
-
+checktrinfo result -tri !9 -nod !8
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 419e4a68055e3cd2701f6b70d368a8886a43c5c3..5f9207d20c44786bd2e64e99b801001824a49ea4 100755 (executable)
@@ -18,16 +18,7 @@ vsetdispmode result 1
 vfit
 triangles result
 
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tri
-regexp { +([-0-9.+eE]+) +nodes} $info full nod
-
-if { $tri != 92 || $nod != 92 }  {
-   puts "Faulty OCC364: here is shading problem"
-} else {
-   puts "Shading of  OCC364 is OK"
-}
-
+checktrinfo result -tri 92 -nod 92
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
 
 
index 9cdca639b760ab7a158d4b29e00e2bf683632b93..5fee8d6c8805a8ec12a146b6df4360fb319601b1 100755 (executable)
@@ -14,12 +14,6 @@ tclean result
 trinfo result
 vsetdispmode 1
 vfit
-set info [trinfo result]
-regexp { +([-0-9.+eE]+) +triangles} $info full tr
-regexp { +([-0-9.+eE]+) +nodes} $info full nd
-
-if { $tr <= 0 || $nd <= 0 } {
-    puts "Error : Problems with shading"
-}
 
+checktrinfo result -tri -nod
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index d1f457064314ff005232702cbc36220e4e6f7183..8f1348b5b6773f1c66cb7b35d153262d178f9d08 100644 (file)
@@ -19,25 +19,10 @@ set LogBefore [trinfo res]
 
 writestl res ${aFile} ${anASCIImode}
 
-set LogAfter [trinfo res]
+checktrinfo res -ref "${LogBefore}"
 
-set status 1
-if { ![file exists ${aFile}] } {
-  set status 0
-}
-
-# Check file size
-set filesize [ file size ${aFile} ]
-if { ${filesize} == 0 } {
-  set status 0
-}
-
-if { $LogBefore != $LogAfter } {
-  set status 0
-}
-
-if {$status == 1} {
-  puts "OK: STL writer check given shape"
-} else {
+if { ![file exists ${aFile}] || [ file size ${aFile} ] == 0 } {
   puts "Error: STL writer does not check given shape"
+} else {
+  puts "OK: STL writer check given shape"
 }