0030969: Coding Rules - refactor Quantity_Color.cxx color table definition
[occt.git] / tests / tools / dfbrowser / A4
1 pload DCAF INSPECTOR TOPTEST
2
3 # Create the first document and set UndoLimit
4 NewDocument Doc1 BinOcaf
5 UndoLimit Doc1 100
6
7 # Add an attribute to a data framework
8 set aSetAttr1 100
9 set aLabel 0:2
10 SetInteger Doc1 ${aLabel} ${aSetAttr1}
11
12
13 # Create the second document
14 set test_name "OCC26961"
15 set test_int 123
16 set test_real 123.456e-7
17 set test_int_arr {10 20}
18 set test_real_arr {1.1 3.14 5.4e18}
19 set test_extstr_arr {"sample string 1" "string 2"}
20 set test_bool_arr {0 1}
21 set test_ref_arr {"0:1:2:3:2" "0:1:2:3:1"}
22 set test_byte_arr {15 25}
23 set test_map {1 5 2 10}
24 set test_map_sorted {1 2 5 10}
25 set test_named_ints {i1 1 i2 2}
26 set test_named_reals {r1 1.1 r2 2.2}
27 set test_named_strings {s1 string1 s2 string2 s3 string3_string_extended s4 string4_double_extended s5 string5}
28 set test_named_bytes {b1 65 b2 66}
29 set test_ref "0:1:1"
30 set test_guid "00000000-0000-0000-2222-000000000000"
31 set test_comment "Sample document containing various attributes"
32 set test_string "Sample string"
33 set test_expr "2*pi*r"
34 set test_var1 "0:1:2:3:2"
35 set test_var2 "0:1:2:3:1"
36 set test_point "111 222 333"
37 set test_axisPos "10 10 30"
38 set test_axisDir "11 22 33"
39 set test_plane "15 25 35"
40 set test_boxXYZ "10 20 30"
41 set test_boxDX 100
42 set test_boxDY 200
43 set test_boxDZ 300
44 set test_geom_t "cir"
45 set test_failure 1
46 set test_driver "G"
47 set test_driver_id "2a96b604-ec8b-11d0-bee7-080009dc3333"
48 set test_transp 0.5
49 set test_color AQUAMARINE4
50 set test_material 22
51 set test_positionX 100
52 set test_positionY 200
53 set test_positionZ 300
54
55 puts "Creating document"
56 NewDocument D BinOcaf
57
58 # Simple values
59 SetInteger     D 0:1:1 $test_int
60 SetReal        D 0:1:1 $test_real
61 SetName        D 0:1:1 $test_name
62 SetComment     D 0:1:1 $test_comment
63 SetAsciiString D 0:1:1 $test_string
64
65 # TagSource
66 SetTagger D 0:1:2
67   
68 # Reference
69 SetReference D 0:1:3 $test_ref
70   
71 # Directory
72 #NewDirectory D 0:1:2:1
73
74 # UAttribute
75 #SetUAttribute D 0:1:2:2 $test_guid
76
77 # Variable
78 SetVariable D $test_var2 0 mm
79 SetVariable D $test_var1 1 ""
80
81 # Relation
82 SetRelation D 0:1:2:3 "2*pi*r" $test_var1 $test_var2
83
84 # TreeNode
85 SetNode D 0:1:2:4
86
87 # Arrays
88 eval SetIntArray       D 0:1:1 1 1 2 $test_int_arr
89 eval SetRealArray      D 0:1:1 1 1 3 $test_real_arr
90 eval SetExtStringArray D 0:1:1 1 1 2 $test_extstr_arr
91 eval SetRefArray       D 0:1:1   1 2 $test_ref_arr
92 eval SetByteArray      D 0:1:1 1 1 2 $test_byte_arr
93
94 # Lists
95 eval SetIntegerList   D 0:1:1 $test_int_arr
96 eval SetRealList      D 0:1:1 $test_real_arr
97 eval SetExtStringList D 0:1:1 $test_extstr_arr
98 eval SetBooleanList   D 0:1:1 $test_bool_arr
99 eval SetReferenceList D 0:1:1 $test_ref_arr
100
101 # IntPackedMap
102 eval SetIntPackedMap  D 0:1:1 1 $test_map
103
104 # NamedData
105 eval SetNDataIntegers   D 0:1:4 2 $test_named_ints
106 eval SetNDataReals      D 0:1:4 2 $test_named_reals
107 eval SetNDataStrings    D 0:1:4 5 $test_named_strings
108 eval SetNDataBytes      D 0:1:4 2 $test_named_bytes
109 eval SetNDataIntArrays  D 0:1:4 ia 2 $test_int_arr
110 eval SetNDataRealArrays D 0:1:4 ra 3 $test_real_arr
111
112 # NamedShape  
113 eval box Box $test_boxXYZ $test_boxDX $test_boxDY $test_boxDZ
114 SetShape D 0:1:6 Box
115
116 # Point
117 eval point Point $test_point
118 SetPoint D 0:1:5:1 Point
119
120 # Axis
121 eval line Axis $test_axisPos $test_axisDir
122 SetAxis D 0:1:5:2 Axis
123
124 # Plane
125 eval plane Plane $test_plane
126 SetPlane D 0:1:5:3 Plane
127
128 # Geometry
129 SetGeometry D 0:1:6 $test_geom_t
130
131 # Constraint
132 SetConstraint D 0:1:1 equal 0:1:6
133
134 # PatternStd
135 SetPattern D 0:1:1 5 0:1:6
136
137 # Function
138 SetFunction D 0:1:1 $test_guid $test_failure
139
140 # AISPresentation
141 AISInitViewer D
142 AISSet          D 0:1:1 $test_driver
143 AISTransparency D 0:1:1 $test_transp
144 AISColor        D 0:1:1 $test_color
145 AISMaterial     D 0:1:1 $test_material
146
147 # Position
148 SetPosition D 0:1:1 $test_positionX $test_positionY $test_positionZ
149
150 tinspector -plugins dfbrowser