Adjusting testing cases for current state of OCCT
[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
14if { [string compare $os "windows"] == 0 } {
15 set aFile C:/temp/bug23193_sample.stl
16} else {
17 set aFile /tmp/bug23193_sample.stl
18}
19
bba05040 20file delete ${aFile}
9ced84ff 21if { [file exists ${aFile}] } {
22 puts "Error : There is old ${aFile} file"
23}
24
25vinit
26stepread [locate_data_file bug23193_sample.stp] a *
27writestl a_1 ${aFile} 0
28catch {exec chmod 777 ${aFile}}
29
30meshfromstl m1 ${aFile}
31meshcolors m1 elem2 1
32QARotateV3dView 4 0 0 1
33vfit
34
35set color [QAGetPixelColor 189 236]
36regexp {RED +: +([-0-9.+eE]+)} $color full rd
37regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
38regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
39
40set a [expr $bl*10]
41set bl_1 [expr round($a)]
42
43if { $rd != 0 || $gr != 0 || $bl_1 != 7 } {
44 puts "Error : Color are not equal. There is missing triangle"
45}
46
47set 3dviewer 2
48
49
50
51