1 puts "TODO OCC27116 ALL: Error: Summary length ="
2 puts "TODO OCC27116 ALL: Error: 1 intersection curve\\(s\\) expected but"
4 puts "================"
6 puts "================"
8 #######################################################################
9 # Bad Intersection curveobtained by Surface/Surface Intersection Algorithm.
10 #######################################################################
17 set GoodTol 3.6570868343352305e-005
20 restore [locate_data_file bug25193_s1t.draw] s1
21 restore [locate_data_file bug25193_s4t.draw] s4
23 #Ethalon of intersection curve
24 bounds s1 us1 us2 vs1 vs2
27 regexp {is ([-0-9.+eE]+)} [length cc 1.0e-4] full ExpLength
28 puts "Expected length = $ExpLength"
30 intersect res s1 s4 $GoodTol
32 set ind [string first "3d curve" $che]
38 #Only variable "res" exists
44 while { $AllowRepeate != 0 } {
45 set che [whatis res_$ic]
46 set ind [string first "3d curve" $che]
52 for {set jc 1} {$jc < $ic} {incr jc} {
55 set coe [checkoverlapedges e1 e2]
57 puts "res_$ic <-> res_$jc: $coe"
58 if { [regexp "Edges is not overlaped" $coe] != 1 } {
59 puts "Error: Overlapped intersection curves"
63 regexp {is ([-0-9.+eE]+)} [length res_$ic 1.0e-4] full ll
65 set SumLength [ expr $SumLength+$ll ]
69 set step [ dval (U2-U1)/$NbControlPts ]
71 if { $step < 1.0e-9*$NbControlPts } {
72 puts "Error: Wrong curve's range!"
76 for {set par [dval U1]} {$par <= [dval U2]} {set par [expr $par+$step]} {
77 cvalue res_$ic $par xx yy zz dx1 dy1 dz1
78 regexp " parameter 1 = +(\[-0-9*\.+eE\]+)" [proj cc xx yy zz] full cpar
79 cvalue cc $cpar xx yy zz dx2 dy2 dz2
81 set DP [dval dx1*dx2+dy1*dy2+dz1*dz2]
83 if {$DPPrev*$DP < 0.0} {
84 puts "Error: Curve res_$ic changes its direction"
93 if {[expr {$ic - 1}] == $GoodNbCurv} {
94 puts "OK: Good number of intersection curve(s) obtained by Surface/Surface Intersection Algorithm"
96 puts "Error: $GoodNbCurv intersection curve(s) expected but [expr {$ic - 1}] found"
99 checkreal "Summary length " ${SumLength} $ExpLength 0.0 1.0e-6
105 checkview -screenshot -2d -path ${imagedir}/${test_image}.png