a87752f3 |
1 | puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_" |
2 | puts "========" |
3 | puts "OCC173" |
4 | puts "(case 1)" |
5 | puts "========" |
6 | puts "" |
7 | ########################################################### |
8 | ## Impossible to change the material or the transparency of the attached BREP shape. |
9 | ########################################################### |
10 | |
11 | restore [locate_data_file OCC173.brep] result |
12 | puts [checkshape result] |
13 | |
14 | vinit result |
15 | tclean |
16 | vdisplay result |
17 | vfit |
18 | vsetdispmode result 1 |
19 | |
d27ea0ef |
20 | if { [array get env os_type] != "" } { |
21 | set os $env(os_type) |
22 | } |
23 | if { [string compare $os "windows"] == 0 } { |
24 | set rd_ch 100000 |
25 | set gr_ch 75294 |
26 | set bl_ch 15294 |
27 | } else { |
28 | set rd_ch 100000 |
29 | set gr_ch 75686 |
30 | set bl_ch 15294 |
31 | } |
a87752f3 |
32 | QAUpdateLights |
33 | set color1 [QAGetPixelColor 175 195] |
34 | regexp {RED +: +([-0-9.+eE]+)} $color1 full rd1 |
35 | regexp {GREEN +: +([-0-9.+eE]+)} $color1 full gr1 |
36 | regexp {BLUE +: +([-0-9.+eE]+)} $color1 full bl1 |
37 | |
38 | set rd_int [expr int($rd1 * 1.e+05)] |
39 | set gr_int [expr int($gr1 * 1.e+05)] |
40 | set bl_int [expr int($bl1 * 1.e+05)] |
41 | |
42 | if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } { |
43 | puts "Error : colors are not equal" |
44 | puts "Error : Shading is missing in 3D Viewer" |
45 | } |
46 | |
47 | ######################################################## |
48 | vsetmaterial result COPPER |
49 | |
50 | QAUpdateLights |
51 | set color2 [QAGetPixelColor 175 195] |
52 | regexp {RED +: +([-0-9.+eE]+)} $color2 full rd2 |
53 | regexp {GREEN +: +([-0-9.+eE]+)} $color2 full gr2 |
54 | regexp {BLUE +: +([-0-9.+eE]+)} $color2 full bl2 |
55 | |
56 | if { ${rd2} == ${rd1} || ${gr2} == ${gr1} || ${bl2} == ${bl1} } { |
57 | puts "Error : material of shape was NOT changed" |
58 | } |
59 | |
60 | set only_screen 1 |