3bea4c16 |
1 | puts "TODO OCC11111 ALL: Faulty OCC1747" |
2 | |
3 | puts "================" |
4 | puts "OCC1747" |
5 | puts "================" |
6 | puts "" |
7 | ####################################################################################### |
8 | # Cannot get entity number for translated shape from STEP in XDE case |
9 | ###################################################################################### |
10 | |
11 | set BugNumber OCC1747 |
12 | |
13 | catch {pload DCAF} |
14 | |
15 | XNewDoc SA |
16 | |
17 | box b1 10 10 10 |
18 | box b2 20 10 10 |
19 | ttranslate b1 10 0 0 |
20 | ttranslate b2 20 0 0 |
21 | compound b1 b2 bl |
22 | copy bl nbl |
23 | ttranslate nbl 30 0 0 |
24 | compound bl nbl ryad |
25 | copy ryad hryad |
26 | ttranslate hryad -10 0 10 |
27 | copy ryad uryad |
28 | ttranslate uryad 0 0 20 |
29 | compound ryad hryad uryad stena |
30 | |
31 | XAddShape SA stena 1 |
32 | |
33 | SetName SA 0:1:1:1 Wall |
34 | SetName SA 0:1:1:2 Block-Array |
35 | SetName SA 0:1:1:3 Block |
36 | SetName SA 0:1:1:4 Half-Brick |
37 | SetName SA 0:1:1:5 Brick |
38 | |
39 | SetName SA 0:1:1:1:1 base-array |
40 | SetName SA 0:1:1:1:2 next-array |
41 | SetName SA 0:1:1:1:3 top-array |
42 | |
43 | SetName SA 0:1:1:2:1 left-block |
44 | SetName SA 0:1:1:2:2 right-block |
45 | |
46 | SetName SA 0:1:1:3:1 half-brick |
47 | SetName SA 0:1:1:3:2 brick |
48 | |
49 | WriteStep SA $imagedir/${test_image}.stp |
50 | dall |
51 | ReadStep D $imagedir/${test_image}.stp |
52 | |
53 | puts "INFO: get main shape from the XDE document D" |
54 | XGetShape a D 0:1:1:1 |
55 | puts "INFO: now try to get translation history for it" |
56 | set info1 [ fromshape a ] |
57 | set index1 [ lsearch $info1 unknown ] |
58 | explode a |
59 | puts "INFO: now try to get translation history for subshape a_1" |
60 | set info2 [ fromshape a_1 ] |
61 | set index2 [ lsearch $info2 unknown ] |
62 | puts "INFO: now try to get translation history for subshape a_2" |
63 | set info3 [fromshape a_2 ] |
64 | set index3 [ lsearch $info3 unknown ] |
65 | |
66 | set exception_status 0 |
67 | if {$index1 > -1 || $index2 > -1 || $index3 > -1} { |
68 | set exception_status 1 |
69 | } |
70 | |
71 | if { ${exception_status} == 0 } { |
72 | puts "OK ${BugNumber}" |
73 | } else { |
74 | puts "Faulty ${BugNumber}" |
75 | } |
76 | |
77 | set 3dviewer 0 |