File: bug23706_14

package info (click to toggle)
opencascade 7.3.0%2Bdfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 278,376 kB
  • sloc: cpp: 1,136,010; ansic: 81,569; tcl: 14,864; cs: 5,173; java: 1,522; xml: 468; sh: 375; perl: 37; makefile: 25
file content (26 lines) | stat: -rwxr-xr-x 836 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
puts "============"
puts "OCC23706"
puts "============"
puts ""
#########################################################################
# Cannot project point on curve
#########################################################################

2dbsplinecurve b9 2 8 1 2 2 1 3 1 4 1 5 1 6 1 7 1 8 2 4 -3 1 6 8 1 10 11 1 10 11 1 10 11 1 14 14 1 5 8 1
2dbsplinecurve b10 2 8 2 2 2.5 1 3 1 3.5 1 4 1 4.5 1 5 1 5.5 2 5 20 1 8 15 1 12 18 1 12 18 1 12 18 1 16 21 1 7 12 1
set info [2dextrema b9 b10]

set status 0
for { set i 1 } { $i <= 1 } { incr i 1 } {
    regexp "dist $i: +(\[-0-9.+eE\]+)" $info full pp
    if { abs($pp - 3.6710534171261284) > 1.0e-7 } {
       puts "Error : Extrema is wrong on dist $i"
       set status 1
    }
}

if { $status != 0 } {
    puts "Error : Extrema is wrong"
} else {
    puts "OK: Extrema is valid"
}