File: bug24138

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 (52 lines) | stat: -rwxr-xr-x 1,477 bytes parent folder | download | duplicates (6)
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
puts "================"
puts "OCC24138"
puts "================"
puts ""
#######################################################################
# Exception during projection of the point on the face
#######################################################################

ellipse w 0 0 0 10 5
mkedge w w
wire w w
mkplane w w
prism s w 2 0 30
explode s f
copy s_1 f
point p 0.753071156928785 4.98580193823337 0

set proj_fp [projponf f p -t]
regexp {proj dist = ([-0-9.+eE]+) uvproj = \(([-0-9.+eE]+) ([-0-9.+eE]+)\); pproj = \(([-0-9.+eE]+) ([-0-9.+eE]+) ([-0-9.+eE]+)\)} ${proj_fp} full dist uproj vproj proj1 proj2

puts "dist=${dist}"
puts "uproj=${uproj}"
puts "vproj=${vproj}"
puts "proj1=${proj1}"
puts "proj2=${proj2}"

set tolmax_f [tolmax f]
regexp {max tol = ([-0-9.+eE]+)} ${tolmax_f} full CMP_TOL

puts "CMP_TOL=${CMP_TOL}"

set good_dist 9.16061678111512e-10
set good_uproj 1.4954178490327235
set good_vproj -2.3095450102606156e-12
set good_proj1 0.75307115689421944
set good_proj2 4.9858019373179632

if { [expr abs(${dist} - ${good_dist}) ] > ${CMP_TOL} } {
   puts "Error: invalid dist"
}
if { [expr abs(${uproj} - ${good_uproj}) ] > ${CMP_TOL} } {
   puts "Error: invalid uproj"
}
if { [expr abs(${vproj} - ${good_vproj}) ] > ${CMP_TOL} } {
   puts "Error: invalid vproj"
}
if { [expr abs(${proj1} - ${good_proj1}) ] > ${CMP_TOL} } {
   puts "Error: invalid proj1"
}
if { [expr abs(${proj2} - ${good_proj2}) ] > ${CMP_TOL} } {
   puts "Error: invalid proj2"
}