5 ###########################################################################
6 # Some triangles are inverted when writing an STL file
7 ###########################################################################
10 if {[array get env os_type] != ""} {
14 if { [string compare $os "windows"] == 0 } {
15 set aFile C:/temp/bug23193_sample.stl
17 set aFile /tmp/bug23193_sample.stl
21 if { [file exists ${aFile}] } {
22 puts "Error : There is old ${aFile} file"
26 stepread [locate_data_file bug23193_sample.stp] a *
27 writestl a_1 ${aFile} 0
28 catch {exec chmod 777 ${aFile}}
30 meshfromstl m1 ${aFile}
32 QARotateV3dView 4 0 0 1
35 set color [QAGetPixelColor 189 236]
36 regexp {RED +: +([-0-9.+eE]+)} $color full rd
37 regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
38 regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
41 set bl_1 [expr round($a)]
43 if { $rd != 0 || $gr != 0 || $bl_1 != 7 } {
44 puts "Error : Color are not equal. There is missing triangle"