0023550: Variable imagedir is not defined in interactive run of tests
[occt.git] / tests / bugs / xde / bug23193
CommitLineData
9ced84ff 1puts "============"
2puts "OCC23193"
3puts "============"
4puts ""
5###########################################################################
6# Some triangles are inverted when writing an STL file
7###########################################################################
8pload QAcommands
9
10if {[array get env os_type] != ""} {
11 set os $env(os_type)
12}
13
60874ff8 14set aFile $imagedir/bug23193_sample.stl
9ced84ff 15
16vinit
17stepread [locate_data_file bug23193_sample.stp] a *
18writestl a_1 ${aFile} 0
9ced84ff 19
20meshfromstl m1 ${aFile}
21meshcolors m1 elem2 1
22QARotateV3dView 4 0 0 1
23vfit
24
25set color [QAGetPixelColor 189 236]
26regexp {RED +: +([-0-9.+eE]+)} $color full rd
27regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
28regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
29
30set a [expr $bl*10]
31set bl_1 [expr round($a)]
32
33if { $rd != 0 || $gr != 0 || $bl_1 != 7 } {
34 puts "Error : Color are not equal. There is missing triangle"
35}
36
82cbc512 37set only_screen 1
9ced84ff 38
39
40
41