0030315: Data Exchange - Crash reading views during STEP import.
[occt.git] / tests / bugs / modalg_6 / bug27269
1 puts "============"
2 puts "OCC27269"
3 puts "============"
4 puts ""
5 ###############################
6 ## Intersection algorithm produces null-length curve
7 ###############################
8
9
10 restore [locate_data_file bug27267_cmpd.brep] a
11 explode a f
12
13 smallview
14 don a_7; fit
15 disp a_1
16
17 #############################
18 set log [bopcurves a_1 a_7 -2d]
19 #############################
20
21 regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
22
23 for {set i 1} {$i <= ${NbCurv}} {incr i} {
24   bounds c_$i U1 U2
25   
26   dump U1 U2
27   
28   if {[dval U2-U1] < 1.0e-20} {
29     puts "Error: Wrong curve's range!"
30   }
31   
32   set le [length c_$i]
33   regexp "The length c_$i is +(\[-0-9.+eE\]+)" ${le} full ll
34   
35   if { $ll < 1.0e-7 } {
36     puts "Error: Curve c_$i is too small!"
37   }
38 }
39
40 checkview -screenshot -2d -path ${imagedir}/${test_image}.png