0027126: Create command checktrinfo to verify meshes
[occt.git] / tests / bugs / stlvrml / bug25050
index 5bbe00d..7fb62ea 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