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