File: bug569

package info (click to toggle)
opencascade 7.9.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 301,924 kB
  • sloc: cpp: 1,523,264; tcl: 10,159; cs: 5,173; java: 1,554; sh: 1,342; ansic: 827; xml: 699; makefile: 30; javascript: 22
file content (62 lines) | stat: -rwxr-xr-x 1,412 bytes parent folder | download | duplicates (5)
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 "========"
puts "OCC569"
puts "========"
puts ""
##################################
## Can not intersect trimmed plane and cone surfaces 
##################################

set GoodNbCurv 1

restore [locate_data_file OCC569a.draw] s1 
restore [locate_data_file OCC569b.draw] s2 

smallview
don s1 s2
fit

if { [catch {intersect result s1 s2 } catch_result] } {
  puts "Faulty OCC569 exception: function intersection works wrongly with trimmed plane and cone surfaces "
} else {
  checkview -screenshot -2d -path ${imagedir}/${test_image}.png

  set che [whatis result]
  set ind [string first "3d curve" $che]
  if {${ind} >= 0} {
    #Only variable "res" exists
    copy result result_1
  }
  
  trim s1 s1
  trim s2 s2
  
  set ic 1
  set AllowRepeate 1
  while { $AllowRepeate != 0 } {
    set che [whatis result_$ic]
    set ind [string first "3d curve" $che]
    if {${ind} < 0} {
      set AllowRepeate 0
      break
    }
    
    bounds result_$ic U1 U2
    dump U1 U2
    
    if {[dval U2-U1] < 1.0e-9} {
      puts "Error: Wrong curve's range!"
    }
    
    xdistcs result_$ic s1 U1 U2 10 1e-7
    xdistcs result_$ic s2 U1 U2 10 1e-7
    
    incr ic
  }
}
  
if {[expr {$ic - 1}] == $GoodNbCurv} {
  puts "OCC569 OK: function intersection works with trimmed plane and cone surfaces"
} else {
  puts "Faulty OCC569: function intersection works wrongly with trimmed plane and cone surfaces"
}