puts "=========="
puts "0031136: BinXCAF persistence loses normals from triangulation-only Faces"
puts "=========="
puts ""

pload OCAF XDE

StoreTriangulation 1 -normals
set res [StoreTriangulation -getnormals]
if { $res != 1 } {
   puts "Error : normals not on"
}
StoreTriangulation 1 -normals 0
set res [StoreTriangulation -getnormals]
if { $res != 0 } {
   puts "Error : normals not off"
}
StoreTriangulation 1 -normals 1
set res [StoreTriangulation -getnormals]
if { $res != 1 } {
   puts "Error : normals not on"
}
StoreTriangulation 1 -nonormals
set res [StoreTriangulation -getnormals]
if { $res != 0 } {
   puts "Error : normals not off"
}
StoreTriangulation 1 -nonormals 0
set res [StoreTriangulation -getnormals]
if { $res != 1 } {
   puts "Error : normals not on"
}
StoreTriangulation 1 -nonormals 1
set res [StoreTriangulation -getnormals]
if { $res != 0 } {
   puts "Error : normals not off"
}
StoreTriangulation -normals
set res [StoreTriangulation -getnormals]
if { $res != 1 } {
   puts "Error : normals not on"
}
StoreTriangulation -normals 0
set res [StoreTriangulation -getnormals]
if { $res != 0 } {
   puts "Error : normals not off"
}
StoreTriangulation -normals 1
set res [StoreTriangulation -getnormals]
if { $res != 1 } {
   puts "Error : normals not on"
}
StoreTriangulation -nonormals
set res [StoreTriangulation -getnormals]
if { $res != 0 } {
   puts "Error : normals not off"
}
StoreTriangulation -nonormals 0
set res [StoreTriangulation -getnormals]
if { $res != 1 } {
   puts "Error : normals not on"
}
StoreTriangulation -nonormals 1
set res [StoreTriangulation -getnormals]
if { $res != 0 } {
   puts "Error : normals not off"
}

puts "OK"