File: bug1669

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 (107 lines) | stat: -rw-r--r-- 2,306 bytes parent folder | download | duplicates (10)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
puts "================"
puts "OCC1669"
puts "================"
puts ""
#################################################################
# Wrong name mapping of the instances of assembly into STEP file.
#################################################################

set BugNumber OCC1669

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

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

puts "Info: Now compare two documents SA and D"
#DFBrowse SA
#DFBrowse D

set NamesList1 {Wall Block-Array Block Half-Brick Brick}
set NamesList2 {base-array next-array top-array}
set NamesList3 {left-block right-block}
set NamesList4 {half-brick brick}

set status 0

for {set i 1} {$i <= 5} {incr i} {
    set name [ GetName D 0:1:1:$i ]
    set ref_name [lindex $NamesList1 $i-1]
    if { $name != $ref_name } {
       set status 1
       break
    }
}

if { $status != 1 } {
   for {set i 1} {$i <= 3} {incr i} {
        set name [ GetName D 0:1:1:1:$i ]
	set ref_name [lindex $NamesList2 $i-1]
    	if { $name != $ref_name } {
       	   set status 1
       	   break
    	}
   }
}

if { $status != 1 } {
   for {set i 1} {$i <= 2} {incr i} {
        set name [ GetName D 0:1:1:2:$i ]
	set ref_name [lindex $NamesList3 $i-1]
    	if { $name != $ref_name } {
       	   set status 1
       	   break
    	}
   }
}

if { $status != 1 } {
   for {set i 1} {$i <= 2} {incr i} {
        set name [ GetName D 0:1:1:3:$i ]
	set ref_name [lindex $NamesList4 $i-1]
    	if { $name != $ref_name } {
       	   set status 1
       	   break
    	}
   }
}

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