Adding test cases for chl grid
[occt.git] / tests / bugs / moddata / bug565
CommitLineData
352ffd73 1puts "========| OCC565 |========"
2##################################
3## Can not intersect two trimmed conical surfaces
4##################################
5
6restore [locate_data_file OCC565a.draw] s1
7restore [locate_data_file OCC565b.draw] s2
8
9puts "Preliminary check: intersection work with infinite cones:"
10if { [catch {intersect inf s1 s2 } catch_result] } {
11 puts "Faulty OCC565: function intersection works wrongly with infinite cones"
12} else {
13 set j 1
14 set er [lindex [whatis inf] 5]
15 repeat 4 {
16 set err [lindex [whatis inf_$j] 5]
17 if { $err != "curve" && $er != "curve"} {
18 puts " Faulty OCC565: function intersection works wrongly with infinite cones"
19 break
20 } else {
21 puts [format "curve inf_%s : exist " $j]
22 }
23 incr j
24 }
25 puts "Function intersection works correctly with infinite cones. Then check OCC565:"
26}
27
28trim s1x s1 0 2*pi 0 2.8
29trim s2x s2 0 2*pi 0 2.8
30
31if { [catch {intersect result s1x s2x } catch_result] } {
32 puts "Faulty OCC565 exception: function intersection works wrongly with trimmed cones"
33} else {
34 set nom 0
35 set j 1
36 set er [lindex [whatis result] 5]
37 repeat 4 {
38 set err [lindex [whatis result_$j] 5]
39 if { $err != "curve" && $er != "curve"} {
40 break
41 } else {
42 set nom [expr $nom + 1]
43 }
44 incr j
45 }
46 if { $nom == 0} {
47 puts " Faulty OCC565: function intersection works wrongly with trimmed cones"
48 } else {
49 puts " OCC565 OK: function intersection works with trimmed cones"
50 }
51}
52
53