puts "========"
puts "0031148: Offset adjacent co-planar faces with different offset values"
puts "========"
puts ""

pload MODELING

# unset draw variables for all offset values
foreach val {0 1} {
  foreach x [directory r${val}*_unif] {
    unset $x
  }
}

restore [locate_data_file bug31148_box_top_split3.brep] s

perform_offset_multi_with_ref r0_01 s 0 {6 7 8 9 10 11 12 13 14} {1 1 1 1 1 1 1 1 1} {440 600 6 6} 1
perform_offset_multi_with_ref r0_02 s 0 {7 8 11 12} {1 1 1 1} {448 532 26 26} 1
perform_offset_multi_with_ref r0_03 s 0 {6 9 10 13 14} {1 1 1 1 1} {472 568 26 26} 1
perform_offset_multi_with_ref r0_04 s 0 {14} {1} {408 504 12 11} 1
perform_offset_multi_with_ref r0_05 s 0 {6 7 8 9 10 11 12 13} {1 1 1 1 1 1 1 1} {448 596 12 11} 1

perform_offset_multi_with_ref r1_01 s 1 {6 7 8 9 10 11 12 13 14} {2 2 2 2 2 2 2 2 2} {672 1152 6 6} 1
perform_offset_multi_with_ref r1_02 s 1 {7 8 11 12} {2 2 2 2} {680 1048 26 26} 1
perform_offset_multi_with_ref r1_03 s 1 {6 9 10 13 14} {2 2 2 2 2} {712 1112 26 26} 1
perform_offset_multi_with_ref r1_04 s 1 {14} {2} {632 1012 12 11} 1
perform_offset_multi_with_ref r1_05 s 1 {14} {0} {632 1004 12 11} 1


# display all created shapes
foreach val {0 1} {
  foreach x [directory r${val}*_unif] {
    if {[isdraw $x]} {
      checkview -display $x -2d -path ${imagedir}/${test_image}_$x.png
    }
  }
}

copy r0_02 result
copy r0_02_unif result_unif
