puts "============================================================================================="
puts "0032307: Modeling Algorithms - Empty result of offset operation in mode \"Complete\" Joint type \"Intersection\""
puts "============================================================================================="
puts ""

restore [locate_data_file bug32307.brep] s

offsetparameter 1e-7 c i r
offsetload s 0
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($z) > 1.e-7 || (abs($y) < 1.e-7 && abs($x) > 1.e-7)} {
    offsetonface $f 20
  }
}
offsetperform result

checkprops result -s 1.20298e+07 -v 7.1394e+08

# number of shapes should not change
checknbshapes result -ref [nbshapes s]

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