0029807: [Regression to 7.0.0] Impossible to cut cone from prism
[occt.git] / tests / bugs / modalg_6 / bug27269
CommitLineData
b55bd023 1puts "============"
2puts "OCC27269"
3puts "============"
4puts ""
5###############################
6## Intersection algorithm produces null-length curve
7###############################
8
9
10restore [locate_data_file bug27267_cmpd.brep] a
11explode a f
12
3306fdd9 13smallview
14don a_7; fit
15disp a_1
16
b55bd023 17#############################
18set log [bopcurves a_1 a_7 -2d]
19#############################
20
21regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
22
23for {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
3306fdd9 40checkview -screenshot -2d -path ${imagedir}/${test_image}.png