Command checktrinfo was created.
Test cases were updated to use command checktrinfo.
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
+~~~~~
}
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"
+ }
+}
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}
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
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
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
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
-
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
-
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]
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
-
-
-
-
-
-
-
-
-
-
-
-
-
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
# 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
# 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
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
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
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
-
-
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
-
-
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
-
-
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
-
-
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
-
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
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
-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"
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
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
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
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
-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"
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
-
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
-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"
#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
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
-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"
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
-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 "========"
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
-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 "========"
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
-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 "========"
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
-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 "========"
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
-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 "========"
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
-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 "========"
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
-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 "========"
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
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
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
-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 "========"
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
-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 "========"
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
#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
#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
#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
#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
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 "
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
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
-
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
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
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
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
-
-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 "========================"
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
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
## 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
# 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
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
#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
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
-
-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 "============"
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
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
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
-
-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"
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
-
-
-puts "TODO OCC12345 ALL: Faulty OCC20: here is shading problem"
+puts "TODO OCC12345 ALL: Error: Number of triangles"
puts "================"
puts "OCC20"
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
-
-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 "============"
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
-puts "TODO OCC11111 ALL: Faulty OCC21122"
+puts "TODO OCC11111 ALL: Error: Maximal deflection"
puts "============"
puts "OCC21122"
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
vfit
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
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
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
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
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
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
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
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
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
-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"
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
-
puts "=========="
puts "FRA62476"
puts ""
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
-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"
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
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
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
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"
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
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
-
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
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
-
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
-
"
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
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
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}"
}
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
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
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
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
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
-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 "============"
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
-
-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"
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
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
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
-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"
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
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
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
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
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."
-}
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
-
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
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
-
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
-
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
-
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
-
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
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
-
-
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
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
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
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"
}