2 puts "OCC29972: Intersection curve has a weird gap in the middle of it"
8 foreach a [directory res*] {unset $a}
10 restore [locate_data_file bug29972_s3.draw] s1
11 plane s2 41.3489013503538 536.047793220744 -145.944893918698 0.999990480720734 0 0.00436330928474653 0.00436330928474653 0 -0.999990480720734
13 intersect res s1 s2 1.0e-4
15 if { [info exists res] } {
16 #Only variable "res" exists
25 while { $AllowRepeat != 0 } {
26 if { ![info exists res_$ic] } {
31 if {[dval U2-U1] < 1.0e-9} {
32 puts "Error: Wrong curve's range!"
35 xdistcs res_$ic s1 U1 U2 100 0.01
36 xdistcs res_$ic s2 U1 U2 100 0.01
38 #check whether the curve has a loop
39 set delta [dval (U2-U1)/1000.0]
40 cvalue res_$ic [dval U1] xp yp zp dx1 dy1 dz1
41 for {set p [dval U1]} {$p <= [dval U2]} {set p [expr $p + $delta]} {
42 cvalue res_$ic $p xp yp zp dx2 dy2 dz2
44 #Check if the angle between the vectors {dx1 dy1 dz1} and {dx2 dy2 dz2} is less than 75deg.
45 set nv1 [ dval dx1*dx1+dy1*dy1+dz1*dz1 ]
46 set nv2 [ dval dx2*dx2+dy2*dy2+dz2*dz2 ]
48 set nv1 [ expr sqrt($nv1) ]
49 set nv2 [ expr sqrt($nv2) ]
51 set dp [ dval dx1*dx2+dy2*dy2+dz1*dz2 ]
53 if {$dp < [ expr 0.25881904510252076234889883762405 * $nv1 * $nv2 ] } {
54 puts "Error: The curve res_$ic is possible to have a bend at parameter $p. Please check carefully"
68 if { $ic != $GoodNbCurves } {
69 puts "Error: $GoodNbCurves are expected but $ic ones are found"
80 checkview -screenshot -2d -path ${imagedir}/${test_image}.png