puts "================"
puts "0026979: Modeling Algorithms - Parabola curve intersection with variety of surfaces produces incorrect results"
puts "================"
puts ""

set BugNumber OCC26979

parabola c -5.0 -1.0 0.25 0 0 1 0.25
trim c c 0 1000

beziersurf bz 3 3 -4 0 -1 -4 1 0 -4 0 1 -3 1 -1 -3 2 0 -3 1 1 -2 0 -1 -2 1 0 -2 0 1  
  
bsplinesurf bs \
1 5 0 1 1 1 2 1 3 1 4 1 \
1 5 0 1 1 1 2 1 3 1 4 1 \
-3 0.5 -1 1   -2 0.5 0 1   -3 0.5 1 1 \
-2 1.5 -1 1   -1 1.5 0 1   -2 1.5 1 1 \
-3 2.5 -1 1   -2 2.5 0 1   -3 2.5 1 1
  
torus tor 3 1
  
circle c1 0 0 0 4
trim c1 c1 -3.5 1
extsurf ext c1 0 0 1 

circle c2 0 0 0 0 -1 0 1 0 0 3
trim c2 c2 -pi/2 pi/2
revsurf rev c2 0 0 0 0 0 1 

# intersect all surfaces
set surfaces [list bz bs tor ext rev]
foreach s $surfaces {
  set num [llength [intersect result $c $s 1e-7]];
  if {$num == 0} {
    puts "Faulty ${BugNumber}: no intersection point is got"
  } else {
    puts "OK ${BugNumber}";
  }
}