0029712: Extrema algorithm raises exception
[occt.git] / tests / lowalgos / extcc / bug29712_11
1 puts "========"
2 puts "OCC29712"
3 puts "========"
4 puts ""
5 #################################################
6 # Extrema algorithm raises exception
7 #################################################
8
9 # Curves c1 and c2 lie on parallel lines.
10 # However, they are bounded (trimmed) curves
11 # and are shifted relatively to each other. So,
12 # there exists single perpendicular only. 
13
14 line c1 1 0 0 0 0 1 
15 line c2 5 0 0 0 0 -1
16 trim c1 c1 0 3
17 trim c2 c2 -9.9e-8 1.0e100 
18
19 foreach a [ directory ext_* ] { unset $a }
20 extrema c1 c2
21 if { [llength [ directory ext_* ] ] != 1 } {
22   puts "Error: Wrong number of solutions (c1 c2)"
23 }
24
25 checklength ext_1 -l 4.0 -eps 2.0e-8
26
27 foreach a [ directory ext_* ] { unset $a }
28 extrema c2 c1
29 if { [llength [ directory ext_* ] ] != 1 } {
30   puts "Error: Wrong number of solutions (c1 c2)"
31 }
32
33 checklength ext_1 -l 4.0 -eps 2.0e-8