2 # Presentation attributes
4 # Testing attribute: TPrsStd_AISPresentation
6 # Testing command: AISDefaultTransparency
7 # Testing command: AISHasOwnTransparency
8 # Note: After call of AISDefaultTransparency-command : AISHasOwnTransparency = false ( int 0 )
16 SetShape D ${aLabel1} aBox1
18 box aBox2 50 50 0 100 200 300
20 SetShape D ${aLabel2} aBox2
22 # Initialize 3D viewer
25 # Add AISPresentation attribute with parameter NS
26 AISSet D ${aLabel1} NS
27 AISSet D ${aLabel2} NS
32 # Set a color of the second shape as NOC_GREEN
33 AISColor D ${aLabel2} 229
35 # Display presentation of NamedShape in the viewer
36 AISDisplay D ${aLabel1}
37 AISDisplay D ${aLabel2}
39 # Close/Open transaction
42 # Set a transparency of the second shape
43 set SetTransparency 0.9
44 AISTransparency D ${aLabel2} ${SetTransparency}
46 # Close/Open transaction
49 # Check own transparency of the shape
50 set HasOwnTransparency1 [AISHasOwnTransparency D ${aLabel2}]
52 # Get current transparency of the shape
53 ###set aTransparency [lindex [AISTransparency D ${aLabel2}] 0]
54 set list [AISTransparency D ${aLabel2}]
55 set aTransparency [lindex ${list} [expr [llength ${list}] - 1] ]
57 # Set default transparency of the shape
58 AISDefaultTransparency D ${aLabel2}
60 # Close/Open transaction
75 # Check own transparency of the shape
76 set HasOwnTransparency2 [AISHasOwnTransparency D ${aLabel2}]
78 puts "It is not necessary to have the photo for this case."
80 if { ${HasOwnTransparency1} == 0 ||
81 ${HasOwnTransparency2} > 0 } {
82 puts "HasOwnTransparency1=${HasOwnTransparency1} HasOwnTransparency2=${HasOwnTransparency2}"
83 puts "AISDefaultTransparency command: Error"
86 puts "AISDefaultTransparency command: OK"