0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / tests / xml / data / ocaf / A8
1 set aTestName "caf001-H3"
2 puts ${aTestName}
3
4 set aTokList { :,}
5
6 # Add an attribute to a data framework
7 set aSetX1 10
8 set aSetY1 20
9 set aSetZ1 30
10 set aSetDX1 100
11 set aSetDY1 200
12 set aSetDZ1 300
13 line aLine1 ${aSetX1} ${aSetY1} ${aSetZ1} ${aSetDX1} ${aSetDY1} ${aSetDZ1}
14
15 set aDumpLine1 [dump aLine1]
16
17 regexp {Origin[ \t]*:([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} ${aDumpLine1} full anOriginX_Line1 anOriginY_Line1 anOriginZ_Line1
18 regexp {Axis[ \t]*:([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} ${aDumpLine1} full anAxisDX_Line1 anAxisDY_Line1 anAxisDZ_Line1
19
20 set aLabel 0:2
21 SetAxis D ${aLabel} aLine1
22
23 # Close/Open the transaction
24 NewCommand D
25
26 # Save the document
27 set aFile $WorkDirectory/${aTestName}.${FileSuffix}
28
29 SaveToFile D $aFile
30
31 # Restore the document
32 Close D
33 Open ${aFile} DD
34
35 # Get a value of the attribute
36 set IsDone [catch {GetAxis DD ${aLabel} anAxis3} aResult]
37 if { ${IsDone} != 0 } {
38         puts "Error : Get a value of TDataStd_Axis attribute from restoring document"
39 } else {
40
41     set aDumpAxis3 [dump anAxis3]
42     regexp {Origin[ \t]*:([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} ${aDumpAxis3} full anOriginX_Line3 anOriginY_Line3 anOriginZ_Line3
43     regexp {Axis[ \t]*:([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} ${aDumpAxis3} full anAxisDX_Line3 anAxisDY_Line3 anAxisDZ_Line3
44
45     if { ${anOriginX_Line1} != ${anOriginX_Line3} || 
46      ${anOriginY_Line1} != ${anOriginY_Line3} || 
47      ${anOriginZ_Line1} != ${anOriginZ_Line3} || 
48      ${anAxisDX_Line1} != ${anAxisDX_Line3} || 
49      ${anAxisDY_Line1} != ${anAxisDY_Line3} || 
50      ${anAxisDZ_Line1} != ${anAxisDZ_Line3} } {
51         puts "Error : Get a value of TDataStd_Axis attribute from restoring document"
52     }
53 }