mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +03:00
Changed order of shapes when reading from bin and xml document. Small correction of test case for issue CR28425
57 lines
1.2 KiB
Plaintext
57 lines
1.2 KiB
Plaintext
puts "==========="
|
|
puts "OCC28425"
|
|
puts "==========="
|
|
puts ""
|
|
############################################################
|
|
# Open/save NamedShape changes order of shapes
|
|
############################################################
|
|
|
|
pload QAcommands
|
|
|
|
vertex v 1 2 3
|
|
box b 10 20 30
|
|
|
|
# Test bin document
|
|
NewDocument D1 BinOcaf
|
|
BuildNamedShape D1 0:1 PRIMITIVE v b
|
|
GetNewShapes D1 0:1 s
|
|
set info [whatis s_1]
|
|
if { [regexp "SOLID" $info] != 1 } {
|
|
puts "Error: first shape should be solid"
|
|
} else {
|
|
puts "OK: order of shapes is correct"
|
|
}
|
|
SaveAs D1 test.cbf
|
|
Close D1
|
|
Open test.cbf D2
|
|
GetNewShapes D2 0:1 s
|
|
set info [whatis s_1]
|
|
if { [regexp "SOLID" $info] != 1 } {
|
|
puts "Error: first shape should be solid"
|
|
} else {
|
|
puts "OK: order of shapes is correct"
|
|
}
|
|
Close D2
|
|
|
|
# Test xml document
|
|
NewDocument D1 XmlOcaf
|
|
BuildNamedShape D1 0:1 PRIMITIVE v b
|
|
GetNewShapes D1 0:1 s
|
|
set info [whatis s_1]
|
|
if { [regexp "SOLID" $info] != 1 } {
|
|
puts "Error: first shape should be solid"
|
|
} else {
|
|
puts "OK: order of shapes is correct"
|
|
}
|
|
SaveAs D1 test.xml
|
|
Close D1
|
|
Open test.xml D2
|
|
GetNewShapes D2 0:1 s
|
|
set info [whatis s_1]
|
|
if { [regexp "SOLID" $info] != 1 } {
|
|
puts "Error: first shape should be solid"
|
|
} else {
|
|
puts "OK: order of shapes is correct"
|
|
}
|
|
Close D2
|