0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / tests / caf / basic / B3
1 #INTERFACE CAF
2 # Basic attributes
3 #
4 # Testing attribute: TDataStd_Real
5 #
6 # Testing command:   SetReal
7 # Testing command:   GetReal
8 #
9
10 puts "caf001-B3"
11
12 # Add an attribute to a data framework
13 set aSetAttr1 100.0
14 set aLabel 0:2
15 SetReal D ${aLabel} ${aSetAttr1}
16
17 # Close/Open the transaction
18 NewCommand D
19
20 # Save the document
21 set aFile ${imagedir}/caf001-B3.cbf
22 file delete ${aFile}
23 SaveAs D ${aFile}
24 if { ![file exists ${aFile}] } {
25         puts "There is not ${aFile} file; SaveAs command: Error"
26         return
27 }
28 #catch {exec chmod 777 ${aFile}}
29
30 # Restore the document
31 Close D
32 Open ${aFile} DD
33
34 # Get a value of the attribute
35 set IsDone [catch {set aGetAttr3 [GetReal DD ${aLabel}]} aResult]
36 if { ${IsDone} != 0 ||
37         ${aSetAttr1}!=${aGetAttr3} } {
38         puts ${aResult}
39         puts "aSetAttr1=${aSetAttr1} aGetAttr3=${aGetAttr3}"
40         puts "Get a value of TDataStd_Real attribute from restoring document: Error"
41         return
42 }
43 puts "Get a value of TDataStd_Real attribute from restoring document: OK"