a87752f3 |
1 | puts "===========" |
2 | puts "BUC60917" |
3 | puts "===========" |
4 | |
5 | pload QAcommands |
6 | |
e837410d |
7 | NewDocument D BinOcaf |
a87752f3 |
8 | UndoLimit D 100 |
9 | |
10 | box b 10 10 10 |
11 | SetShape D 0:1:1 b |
12 | |
13 | AISInitViewer D |
14 | |
15 | OpenCommand D |
16 | |
17 | AISSet D 0:1:1 NS |
18 | AISWidth D 0:1:1 1.0 |
19 | set W [AISWidth D 0:1:1] |
20 | if { ${W} != 1 } { |
21 | puts "Error : 1" |
22 | } else { |
23 | AISDisplay D 0:1:1 |
24 | vfit |
25 | CommitCommand D |
26 | |
27 | puts "Doing Undo... " |
28 | |
29 | Undo D |
30 | AISRepaint D |
31 | AISRepaint D |
32 | |
33 | puts "And now, look: Redo!" |
34 | |
35 | Redo D |
36 | AISRepaint D |
37 | |
38 | set W [AISWidth D 0:1:1] |
39 | if { ${W} != 1 } { |
40 | puts "Error : 2" |
41 | } |
42 | } |
43 | |
44 | set 3dviewer 2 |
45 | |
46 | |
47 | |
48 | |
49 | # This TCL script demonstrates bug in AIS/OCAF viewer |
50 | # |
51 | # It needs an additional DRAW command to be defined for |
52 | # setting Width parameter of TPrsStd_AISPresentation attribute. |
53 | # The code for this command (AISWidth) is provided separately. |
54 | # |
55 | # The problem is that when width is set to AISPresentation attribute |
56 | # and Undo/redo are made, this causes error 'width is 0' in the viewer. |
57 | # It seems that width is not kept during Undo/Redo operations. |
58 | |