File: bug567

package info (click to toggle)
oce 0.17.2-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 297,992 kB
  • ctags: 203,291
  • sloc: cpp: 1,176,369; ansic: 67,206; sh: 11,647; tcl: 6,890; cs: 5,221; python: 2,867; java: 1,522; makefile: 338; xml: 292; perl: 37
file content (62 lines) | stat: -rw-r--r-- 1,851 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
puts "TODO OCC12345 ALL: Faulty OCC565: function intersection works wrongly with trimmed Surfaces"
puts "TODO ?OCC12345 ALL: Faulty OCC565: function intersection works wrongly with infinite Surfaces"
puts "TODO ?OCC12345 MacOS: Faulty OCC565: function intersection works wrongly with infinite Surfaces"

puts "========"
puts "OCC567"
puts "========"
puts ""
#######################################
## Can not intersect two Rectangular Trimmed Surfaces . 
#######################################

restore [locate_data_file OCC567a.draw] s1 
restore [locate_data_file OCC567b.draw] s2 

if { [string compare $tcl_platform(platform) "windows"] == 0 }  {
   puts "OS = Windows NT"
   set N_repeat 10
} else {
   puts "OS = Linux"
   set N_repeat 11
}

if { [catch {intersect i s1 s2 } catch_result] } {
    puts "Faulty OCC565: function intersection works wrongly with infinite Surfaces"
} else {
   set j 1
   repeat ${N_repeat} {
   set err [lindex [whatis i_$j] 5]
     if { $err != "curve"} {
       puts " Faulty OCC565: function intersection works wrongly with infinite Surfaces"
       break
      } else {
       puts [format "%s ) OCC565 OK: function intersection works with infinite Surfaces" $j]
              }
    incr j}
}

trim s1x s1 0 2*pi 0 2*pi/13
trim s2x s2 0 2*pi 0 2*pi/13

if { [catch {intersect result s1x s2x } catch_result] } {
    puts "Faulty OCC565 exception: function intersection works wrongly with trimmed Surfaces"
} else {
    set nom 0
    set j 1
    repeat 11 {
	set err [lindex [whatis result_$j] 5]
        if { $err != "curve"} {
    	    break
        } else {
    	    set nom [expr $nom + 1]
        }
	incr j
    }
    if { $nom == 0} {
	puts "Faulty OCC565: function intersection works wrongly with trimmed Surfaces"
    } else {
	puts " OCC565 OK: function intersection works with trimmed Surfaces"
    }
}