puts "========"
puts "0031734: Modeling Algorithms - Incorrect result of offset operation in mode 'Complete' join type 'Intersection'"
puts "========"
puts ""

restore [locate_data_file bug31734_input.brep] s
offsetparameter 1e-7 c i r
offsetload s 37.97685142672564
# nullify top faces
foreach f [explode s f] {
  mksurface surf $f
  regexp {Axis   :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z
  if {abs(abs($z) - 1) < 1.e-7} {
    offsetonface $f 0
  }
}
offsetperform result

checkprops result -s 1.0898e+07 -v  8.65375e+08

unifysamedom result_unif result
checknbshapes result_unif -wire 80 -face 80 -shell 1 -solid 1

checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
