1puts "========"
2puts "OCC569"
3puts "========"
4puts ""
5##################################
6## Can not intersect trimmed plane and cone surfaces
7##################################
8
9set GoodNbCurv 1
10
11restore [locate_data_file OCC569a.draw] s1
12restore [locate_data_file OCC569b.draw] s2
13
14smallview
15don s1 s2
16fit
17
18if { [catch {intersect result s1 s2 } catch_result] } {
19  puts "Faulty OCC569 exception: function intersection works wrongly with trimmed plane and cone surfaces "
20} else {
21  checkview -screenshot -2d -path ${imagedir}/${test_image}.png
22
23  set che [whatis result]
24  set ind [string first "3d curve" $che]
25  if {${ind} >= 0} {
26    #Only variable "res" exists
27    copy result result_1
28  }
29
30  trim s1 s1
31  trim s2 s2
32
33  set ic 1
34  set AllowRepeate 1
35  while { $AllowRepeate != 0 } {
36    set che [whatis result_$ic]
37    set ind [string first "3d curve" $che]
38    if {${ind} < 0} {
39      set AllowRepeate 0
40      break
41    }
42
43    bounds result_$ic U1 U2
44    dump U1 U2
45
46    if {[dval U2-U1] < 1.0e-9} {
47      puts "Error: Wrong curve's range!"
48    }
49
50    xdistcs result_$ic s1 U1 U2 10 1e-7
51    xdistcs result_$ic s2 U1 U2 10 1e-7
52
53    incr ic
54  }
55}
56
57if {[expr {$ic - 1}] == $GoodNbCurv} {
58  puts "OCC569 OK: function intersection works with trimmed plane and cone surfaces"
59} else {
60  puts "Faulty OCC569: function intersection works wrongly with trimmed plane and cone surfaces"
61}
62
63