File: bug1747

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (77 lines) | stat: -rw-r--r-- 1,830 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
puts "TODO OCC11111 ALL: Faulty OCC1747"

puts "================"
puts "OCC1747"
puts "================"
puts ""
#######################################################################################
# Cannot get entity number for translated shape from STEP in XDE case
######################################################################################

set BugNumber OCC1747

catch {pload DCAF}

XNewDoc SA

box b1 10 10 10
box b2 20 10 10
ttranslate b1 10 0 0
ttranslate b2 20 0 0
compound b1 b2 bl
copy bl nbl
ttranslate nbl 30 0 0
compound bl nbl ryad
copy ryad hryad
ttranslate hryad -10 0 10
copy ryad uryad
ttranslate uryad 0 0 20
compound ryad hryad uryad stena

XAddShape SA stena 1

SetName SA 0:1:1:1 Wall
SetName SA 0:1:1:2 Block-Array
SetName SA 0:1:1:3 Block
SetName SA 0:1:1:4 Half-Brick
SetName SA 0:1:1:5 Brick

SetName SA 0:1:1:1:1 base-array
SetName SA 0:1:1:1:2 next-array
SetName SA 0:1:1:1:3 top-array

SetName SA 0:1:1:2:1 left-block
SetName SA 0:1:1:2:2 right-block

SetName SA 0:1:1:3:1 half-brick
SetName SA 0:1:1:3:2 brick

WriteStep SA $imagedir/${test_image}.stp
dall
ReadStep D $imagedir/${test_image}.stp

puts "INFO: get main shape from the XDE document D"
XGetShape a D 0:1:1:1
puts "INFO: now try to get translation history for it"
set info1 [ fromshape a ]
set index1 [ lsearch $info1 unknown ]
explode a
puts "INFO: now try to get translation history for subshape a_1"
set info2 [ fromshape a_1 ]
set index2 [ lsearch $info2 unknown ] 
puts "INFO: now try to get translation history for subshape a_2"
set info3 [fromshape a_2 ]
set index3 [ lsearch $info3 unknown ]

set exception_status 0
if {$index1 > -1 || $index2 > -1 || $index3 > -1} {
    set exception_status 1
}

if { ${exception_status} == 0 } {
   puts "OK ${BugNumber}"
} else {
   puts "Faulty ${BugNumber}"
}

set 3dviewer 0