1 puts "================"
3 puts "================"
6 # Note: Numerical control of setting transparency
18 SetShape D ${aLabel1} aBox1
20 box aBox2 50 50 0 100 200 300
22 SetShape D ${aLabel2} aBox2
24 # Initialize 3D viewer
27 # Add AISPresentation attribute with parameter NS
28 AISSet D ${aLabel1} NS
29 AISSet D ${aLabel2} NS
34 # Set a color of the second shape
35 AISColor D ${aLabel2} GREEN
37 # Display presentation of NamedShape in the viewer
38 AISDisplay D ${aLabel1}
39 AISDisplay D ${aLabel2}
41 # Close/Open transaction
44 # Set a transparency of the second shape
45 set SetTransparency 0.9
46 OCC1029_AISTransparency D ${aLabel2} ${SetTransparency}
48 set list [OCC1029_AISTransparency D ${aLabel2}]
49 set Transparency1 [lindex ${list} [expr [llength ${list}] - 1] ]
51 # Close/Open transaction
60 set list [OCC1029_AISTransparency D ${aLabel2}]
61 set Transparency2 [lindex ${list} [expr [llength ${list}] - 1] ]
69 set list [OCC1029_AISTransparency D ${aLabel2}]
70 set Transparency3 [lindex ${list} [expr [llength ${list}] - 1] ]
72 # Check the transparency
73 puts "Transparency1 = ${Transparency1}"
74 puts "Transparency2 = ${Transparency2}"
75 puts "Transparency3 = ${Transparency3}"
78 if { ${Transparency1} != ${SetTransparency} } {
79 puts "OCC1029_Transparency command: Error (case 1)"
83 if { ${Transparency2} != 0. } {
84 puts "OCC1029_Transparency command: Error (case 2)"
88 if { ${Transparency3} != ${SetTransparency} } {
89 puts "OCC1029_Transparency command: Error (case 3)"
93 if { ${status} == 0} {
94 puts "OCC1029_Transparency command: OK"