2 # Presentation attributes
4 # Testing attribute: TPrsStd_AISPresentation
6 # Testing command: AISDefaultMaterial
7 # Testing command: AISHasOwnMaterial
8 # Note: After call of AISDefaultMaterial-command : AISHasOwnMaterial = false ( int 0 )
13 # Set NamedShape attribute
16 SetShape D ${aLabel} aBox1
18 # Initialize 3D viewer
21 # Add AISPresentation attribute with parameter NS
27 # Display presentation of NamedShape in the viewer
28 AISDisplay D ${aLabel}
30 # Close/Open transaction
33 # Set a material of the shape as NOM_JADE
35 AISMaterial D ${aLabel} ${JadeMaterial}
37 # Close/Open transaction
40 # Check own material of the shape
41 set HasOwnMaterial1 [AISHasOwnMaterial D ${aLabel}]
43 # Get current material of the shape
44 set aMaterial [lindex [AISMaterial D ${aLabel}] 0]
46 # Set default material of the shape
47 AISDefaultMaterial D ${aLabel}
49 # Close/Open transaction
64 # Check own material of the shape
65 set HasOwnMaterial2 [AISHasOwnMaterial D ${aLabel}]
67 puts "It is not necessary to have the photo for this case."
69 if { ${HasOwnMaterial1} == 0 ||
70 ${HasOwnMaterial2} > 0 } {
71 puts "HasOwnMaterial1=${HasOwnMaterial1} HasOwnMaterial2=${HasOwnMaterial2}"
72 puts "AISDefaultMaterial command: Error"
75 puts "AISDefaultMaterial command: OK"