File: bug106

package info (click to toggle)
oce 0.15-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 302,472 kB
  • ctags: 210,903
  • sloc: cpp: 1,165,052; ansic: 75,256; sh: 11,901; tcl: 4,488; python: 2,867; makefile: 337; perl: 37; csh: 12
file content (78 lines) | stat: -rwxr-xr-x 1,814 bytes parent folder | download | duplicates (11)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

puts "================"
puts "BUC61032"
puts "OCC106"
puts "================"
puts ""

restore [locate_data_file OCC106-1.draw] sh1 
####          checkshape sh1 # - not a topological shape
restore [locate_data_file OCC106-2.draw] sh2
####          checkshape sh2 # - not a topological shape

trimv s1 sh1 -1000 1000
trimv s2 sh2 -1000 1000

if [catch {intersect res s1 s2} result] {
set mistake 1
} else {
set  mistake 0
}

if { $mistake == 0 } {
 puts ""
 set nom 0
   set j 1
   repeat 10 {
     set che [whatis res_$j]
      set che1 [whatis res_$j]
       set err [lindex $che [expr [llength $che] - 1]]
        set err1 [lindex $che1 [expr [llength $che1] - 2]]

          if { $err != "curve" && $err1 != "3d"} {
          	break
              } else {
              set nom [expr $nom + 1]
              }
    incr j}
 if { $nom == 0} {
    puts "1) Faulty OCC106: Intersection was made WRONGLY"
} else {
  puts [format "1) OCC106 OK : Intersection command works properly: %s curves" $nom]
  puts ""
} 
} else {
    puts "1) Faulty OCC106: Intersection was made WRONGLY"
}

if [catch {intersect rrs sh1 sh2} result] {
set mistake 1
} else {
set  mistake 0
}

if { $mistake == 0 } {
 puts ""
 set nom 0
   set j 1
   repeat 10 {
     set che [whatis rrs_$j]
      set che1 [whatis rrs_$j]
       set err [lindex $che [expr [llength $che] - 1]]
        set err1 [lindex $che1 [expr [llength $che1] - 2]]

          if { $err != "curve" && $err1 != "3d"} {
          	break
              } else {
              set nom [expr $nom + 1]
              }
    incr j}
 if { $nom == 0} {
    puts "2) Faulty OCC106: Intersection was made WRONGLY"
} else {
  puts [format "2) OCC106 OK : Intersection command works properly: %s curves" $nom]
}
} else {
    puts "2) Faulty OCC106: Intersection was made WRONGLY"
}