0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / tests / bugs / caf / bug1032
CommitLineData
352ffd73 1puts "================"
2puts "OCC1032"
3puts "================"
4puts ""
5#
6# Note: Numerical control of setting width
7#
8
9pload QAcommands
10
e837410d 11NewDocument D BinOcaf
352ffd73 12UndoLimit D 100
13NewCommand D
14
15# Set NamedShape attribute
16box aBox1 100 200 300
17set aLabel1 0:2
18SetShape D ${aLabel1} aBox1
19
20# Initialize 3D viewer
21AISInitViewer D
22
23# Add AISPresentation attribute with parameter NS
24AISSet D ${aLabel1} NS
25
26# Close/Open transaction
27NewCommand D
28
29set list [OCC1032_AISWidth D ${aLabel1}]
30set AISWidth1 [lindex ${list} [expr [llength ${list}] - 1] ]
31
32# Display presentation of NamedShape in the viewer
33AISDisplay D ${aLabel1}
34
35# Close/Open transaction
36NewCommand D
37
38# Set a width
39set SetWidth 4.5
40OCC1032_AISWidth D ${aLabel1} ${SetWidth}
41
42set list [OCC1032_AISWidth D ${aLabel1}]
43set AISWidth2 [lindex ${list} [expr [llength ${list}] - 1] ]
44
45# Close/Open transaction
46NewCommand D
47
48# Undo
49Undo D
50
51# Update the viewer
52AISRepaint D
53
54set list [OCC1032_AISWidth D ${aLabel1}]
55set AISWidth3 [lindex ${list} [expr [llength ${list}] - 1] ]
56
57# Redo
58Redo D
59
60# Update the viewer
61AISRepaint D
62
63set list [OCC1032_AISWidth D ${aLabel1}]
64set AISWidth4 [lindex ${list} [expr [llength ${list}] - 1] ]
65
66# Check the mode
67puts "AISWidth1 = ${AISWidth1}"
68puts "AISWidth2 = ${AISWidth2}"
69puts "AISWidth3 = ${AISWidth3}"
70puts "AISWidth4 = ${AISWidth4}"
71
72set DefaultAISWidth 0
73set status 0
74if { ${AISWidth1} != ${DefaultAISWidth} } {
75 puts "OCC1032_AISWidth command: Error (case 1)"
76 set status 1
77}
78if { ${AISWidth2} != ${SetWidth} } {
79 puts "OCC1032_AISWidth command: Error (case 2)"
80 set status 1
81}
82if { ${AISWidth3} != ${DefaultAISWidth} } {
83 puts "OCC1032_AISWidth command: Error (case 3)"
84 set status 1
85}
86if { ${AISWidth4} != ${SetWidth} } {
87 puts "OCC1032_AISWidth command: Error (case 4)"
88 set status 1
89}
90
91if { ${status} == 0} {
92 puts "OCC1032_AISWidth command: OK"
93}
94