1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00
occt/tests/bugs/step/bug30189_1
ika 87efa821fa 0030189: Data Exchange - Wrong export to STEP of located root.
Now roots-references in XCAF Document can be exported to STEP without losing structure of assembly/sharing/metadata of this root. New auxiliary root assembly with each root-reference is created to save all necessary data.
2018-10-04 17:57:13 +03:00

52 lines
1.2 KiB
Plaintext

########################################
# Wrong export to STEP of located root.
########################################
pload OCAF
XOpen [locate_data_file bug30189.xbf] D
WriteStep D $imagedir/${casename}.stp
ReadStep DD $imagedir/${casename}.stp
# Check location
XGetOneShape res DD
set props [lprops res]
if {[lindex $props 9] != "90"} {
puts "Error: wrong location on shape."
}
if {[lindex $props 12] != "75"} {
puts "Error: wrong location on shape."
}
if {[lindex $props 15] != "60"} {
puts "Error: wrong location on shape."
}
# Check structure
set top_level [XGetTopLevelShapes DD]
if {$top_level != "0:1:1:1 0:1:1:2 0:1:1:3 0:1:1:4 "} {
puts "Error: wrong structure of document."
}
set nb [XNbComponents DD 0:1:1:1]
if {$nb != "1"} {
puts "Error: wrong structure of document."
}
set nb [XNbComponents DD 0:1:1:2]
if {$nb != "3"} {
puts "Error: wrong structure of document."
}
# Check colors
set color [XGetShapeColor DD 0:1:1:3 surf]
if {$color != "RED"} {
puts "Error: wrong color."
}
set color [XGetShapeColor DD 0:1:1:4 surf]
if {$color != "DARKORANGE1"} {
puts "Error: wrong color."
}
Close D
Close DD
file delete $imagedir/${casename}.stp