1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
puts "============"
puts "CR22888"
puts "============"
puts ""
#######################################################################
# Wrong shape result imported from IGES file
#######################################################################
pload QAcommands
set x1 166
set y1 225
igesread [locate_data_file CR22888-data.igs] a *
if { [regexp "This shape seems to be valid" [checkshape a]] != 1 } {
puts "Error : checkshape is faulty"
}
explode a f
vinit
vsetdispmode 0
vdisplay a_1
vfit
vzfit
tclean a_1
set inf_before [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
set color [vreadpixel ${x1} ${y1} rgb]
set rd [lindex $color 0]
set gr [lindex $color 1]
set bl [lindex $color 2]
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)"
}
set only_screen 1
|