0025138: SIGSEGV when sweeping along helix
[occt.git] / tests / bugs / modalg_5 / bug25708
1 puts "========"
2 puts "OCC25708"
3 puts "========"
4 puts ""
5 ###########################################################
6 # GeomAPI_ExtremaCurveCurve does not return all intersection points in 6.8.0
7 ###########################################################
8
9 set BugNumber OCC25708
10
11 restore [locate_data_file bug25708_interror.brep] b
12
13 explode b e
14
15 mkcurve c1 b_1
16 mkcurve c2 b_2
17
18 set extrema_res [extrema c1 c2]
19 set extrema_length [llength ${extrema_res} ]
20
21 if {${extrema_length} != 2 } {
22    puts "Error: GeomAPI_ExtremaCurveCurve does not return all intersection points"
23 } else {
24    puts "OK: GeomAPI_ExtremaCurveCurve return all intersection points"
25
26 # Distance check
27
28    set info [dump ext_1]
29    regexp "Parameters : 0 +(\[-0-9*\.+eE\]+)" $info full extLength1
30    if {${extLength1} > 1e-14 } {
31      puts "1. Error: bad distance points obtained"
32    } else {
33      puts "1. OK: good distance between obtained points "
34    }
35
36    set info [dump ext_2]
37    regexp "Parameters : 0 +(\[-0-9*\.+eE\]+)" $info full extLength2
38    if {${extLength2} > 1e-14 } {
39      puts "2. Error: bad distance points obtained"
40    } else {
41      puts "2. OK: good distance between obtained points "
42    }
43
44 }