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