mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-08-10 00:02:41 +08:00
8ce97bc90b
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
|