File: bug25292_31

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (91 lines) | stat: -rw-r--r-- 2,406 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
puts "================"
puts "OCC25292"
puts "================"
puts ""
#######################################################################
# Face/Face intersection algorithm gives different results for different order of the arguments
#######################################################################

puts "##############################"
puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
puts "##############################"
puts ""
puts ""

# bopcurves command

restore [locate_data_file bug25292_f1.brep] f1
restore [locate_data_file bug25292_f2.brep] f2

#############################
set log [bopcurves f1 f2 -2d]
#############################

regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv

#This value must be equal to the analogical value in bug25292_31 and bug25292_32 of "bugs modalg_5" testgrid. 
set MaxTol 1.0e-8

#This value must be equal to the analogical value in bug25292_31 and bug25292_32 of "bugs modalg_5" testgrid. 
set GoodNbCurv 1

if {${Toler} > ${MaxTol}} {
  puts "Error: Tolerance is too big!"
}
if {${NbCurv} != ${GoodNbCurv}} {
  puts "Error: Curve Number is bad!!"
}

#-------------

mksurface s1 f1
mksurface s2 f2

for {set i 1} {$i <= ${NbCurv}} {incr i} {
  set log [dump c_$i]
  
  regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
  puts "Degree=${Degree}"
  puts "Poles=${Poles}"
  puts "KnotsPoles=${KnotsPoles}"
  puts ""

  set Knot 1
  set exp_string "Knots :\n\n +${Knot} :  +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
  regexp ${exp_string} ${log} full U1 Mult1

  set Knot ${KnotsPoles}
  set exp_string " +${Knot} :  +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
  regexp ${exp_string} ${log} full U2 Mult2

  puts "U1=${U1}"
  puts "U2=${U2}"
  
  if {[expr {$U2 - $U1}] < 1.0e-20} {
    puts "Error: Wrong curve's range!"
  }

  dlog reset
  dlog on
  xdistcs c_$i s1 ${U1} ${U2} 10
  set Log2 [dlog get]
  set List2 [split ${Log2} {TD= \t\n}]
  set Tolerance 1.0e-7
  set Limit_Tol 1.0e-8
  set D_good 0.
  checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}

  dlog reset
  dlog on
  xdistcs c_$i s2 ${U1} ${U2} 10
  set Log2 [dlog get]
  set List2 [split ${Log2} {TD= \t\n}]
  set Tolerance 1.0e-7
  set Limit_Tol 1.0e-8
  set D_good 0.
  checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
}

smallview
fit
set only_screen_axo 1