File: bug22982

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 (88 lines) | stat: -rw-r--r-- 2,220 bytes parent folder | download | duplicates (3)
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
puts "TODO OCC22982 ALL: Error on Record"
# errors appear during reading source step file
pload QAcommands

puts "============"
puts "OCC22982"
puts "============"
puts ""
##################################################################
# Generic color is overriden in STEPCAFControl_Writer::WriteColors
##################################################################

set BugNumber OCC22982
pload DCAF

NewDocument D11 MDTV-XCAF
UndoLimit D11 100

# Open a transaction
NewCommand D11

ReadStep D11 [locate_data_file OCC22982-Air.step]

XUnsetColor D11 0:1:1:1 s
XUnsetColor D11 0:1:1:1:1 s
XUnsetColor D11 0:1:1:1:2 s
XUnsetColor D11 0:1:1:1:3 s
XUnsetColor D11 0:1:1:1:4 s
XUnsetColor D11 0:1:1:1:5 s
XUnsetColor D11 0:1:1:1:6 s
XSetColor D11 0:1:1:1 0 0 1
XSetColor D11 0:1:1:1:1 1 0 0

set XRedCoords {2 160 186 204}
set XRedCoords [split $XRedCoords " "]
set YRedCoords {177 48 162 78}
set YRedCoords [split $YRedCoords " "]

set XBlueCoords {238 315 406 348 370 204 171 62}
set XBlueCoords [split $XBlueCoords " "]
set YBlueCoords {172 87 188 175 290 271 238 303}
set YBlueCoords [split $YBlueCoords " "]

XShow D11
vfit

# Check colors of document with source shape
for {set i 0} {$i < [llength $XRedCoords]} {incr i} {
    set XCoord [lindex $XRedCoords $i]
    set YCoord [lindex $YRedCoords $i]
    checkcolor $XCoord $YCoord 1 0 0
}
for {set i 0} {$i < [llength $XBlueCoords]} {incr i} {
    set XCoord [lindex $XBlueCoords $i]
    set YCoord [lindex $YBlueCoords $i]
    checkcolor $XCoord $YCoord 0 0 1
}

# Close/Open a transaction
NewCommand D11

file delete -force ${imagedir}/${test_image}.step
WriteStep D11 ${imagedir}/${test_image}.step

NewDocument D2 MDTV-XCAF
UndoLimit D2 100

# Close/Open a transaction
NewCommand D2

ReadStep D2 ${imagedir}/${test_image}.step

XShow D2
vfit 

# Check colors of document with resulting shape
for {set i 0} {$i < [llength $XRedCoords]} {incr i} {
    set XCoord [lindex $XRedCoords $i]
    set YCoord [lindex $YRedCoords $i]
    checkcolor $XCoord $YCoord 1 0 0
}
for {set i 0} {$i < [llength $XBlueCoords]} {incr i} {
    set XCoord [lindex $XBlueCoords $i]
    set YCoord [lindex $YBlueCoords $i]
    checkcolor $XCoord $YCoord 0 0 1
}

set only_screen 1