1puts "========" 2puts "OCC28394" 3puts "========" 4puts "" 5############################################## 6# Not precise extrema solution of line and circle lying in the same plane 7############################################## 8 9set GoodNbExtremas 4 10 11circle c1 5 5 10 0 1 1 20 12mkedge e1 c1 13tmirror e1 e1 5 5 10 1 0 0 14mkcurve c1 e1 15 16cvalue c1 0.63 x1 y1 z1 17cvalue c1 5.47 x2 y2 z2 18 19dset dlx x2-x1 20dset dly y2-y1 21dset dlz z2-z1 22line l1 x1 y1+5 z1+5 dlx dly dlz 23 24set extrema_length [ llength [ extrema c1 l1 1 ] ] 25 26# Amount check 27if {${extrema_length} != [ expr 5*${GoodNbExtremas}] } { 28 puts "Error: Number of extremas computed is wrong" 29} 30 31for {set i 1} {${i} <= 4} {incr i} { 32 regexp {Axis :([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} [dump ext_${i}] full dx dy dz 33 34 cvalue c1 prm_1_${i} x y z dcx dcy dcz 35 36 set DPL [ dval ${dx}*dlx+${dy}*dly+${dz}*dlz ] 37 set DPC [ dval ${dx}*dcx+${dy}*dcy+${dz}*dcz ] 38 39 if { (abs(${DPL}) > 1.0e-12) || (abs(${DPC}) > 1.0e-12) } { 40 puts "Error: extrema ext_${i} was computed wrong (is not the normal to the curves)" 41 } 42}