0025265: Perspective projection - selecting front point of two
[occt.git] / tests / caf / presentation / A4
1 #INTERFACE CAF
2 # Presentation attributes
3 #
4 # Testing attribute: TPrsStd_AISPresentation
5 #
6 # Testing command:   AISSet
7 #
8 #Sometimes this error is inside a log file, but it is outside in other case. The '?' character manage it.
9 puts "caf003-A4"
10
11 # Set NamedShape attribute
12 box aBox1 100 200 300
13 set aLabel 0:2
14 SetShape D ${aLabel} aBox1
15
16 # Initialize 3D viewer
17 AISInitViewer D
18
19 # Add AISPresentation attribute with parameter NS
20 AISSet D ${aLabel} NS
21
22 # Display presentation of NamedShape in the viewer
23 AISDisplay D ${aLabel}
24
25 # Save the document
26 set aFile ${imagedir}/caf003-A4.std
27 file delete ${aFile}
28 SaveAs D ${aFile}
29 if { ![file exists ${aFile}] } {
30         puts "There is not ${aFile} file; SaveAs command: Error"
31         return
32 }
33 #catch {exec chmod 777 ${aFile}}
34
35 # Restore the document
36 Close D
37
38 Open ${aFile} DD
39
40 # Initialize 3D viewer
41 AISInitViewer DD
42
43 ########## Add AISPresentation attribute with parameter NS
44 ##########AISSet DD ${aLabel} NS
45
46 # Display presentation of NamedShape in the viewer
47 set IsDone [catch {AISDisplay DD ${aLabel}} aResult]
48 if { ${IsDone} != 0 } {
49         puts ${aResult}
50         puts "Get a value of TPrsStd_AISPresentation attribute from restoring document: Error"
51         return
52 }
53
54 puts "There is the box in the viewer"