0025957: nurbsconvert modifies original shape
[occt.git] / tests / bugs / modalg_6 / bug27537
CommitLineData
b819ae67 1puts "============"
2puts "OCC27537"
3puts "============"
4puts ""
5######################################################
6# Incorrect number of sample points provided by GCPnts_TangentialDeflection
7######################################################
8
9restore [locate_data_file bug27537.brep] result
10incmesh result 0.2
11
12set bndbox [bounding result]
13set xMin [lindex $bndbox 0]
14set yMin [lindex $bndbox 1]
15set zMin [lindex $bndbox 2]
16set xMax [lindex $bndbox 3]
17set yMax [lindex $bndbox 4]
18set zMax [lindex $bndbox 5]
19
20mkcurve c result
21bounds c u1 u2
22set first [dval u1]
23set last [dval u2]
24
25set x 0.
26set y 0.
27set z 0.
28set param 0.
29set isOk true
30
31set nbSamples 100
32set step [expr ($last - $first)/$nbSamples]
33for {set i 0} {$i <= $nbSamples} {incr i} {
34 if {$i < $nbSamples} {
35 set param [expr $first + $i * $step]
36 } else {
37 set param $last
38 }
39
40 cvalue c $param cx cy cz
41 set x [dval cx]
42 set y [dval cy]
43 set z [dval cz]
44 if {$x < $xMin || $x > $xMax || $y < $yMin || $y > $yMax || $z < $zMin || $z > $zMax} {
45 puts "ERROR: point ($x; $y; $z) is out of bounding box"
46 set isOk false
47 }
48}
49
50if {$isOk} {
51 puts "OK: all sample points inside bounding box"
52}
53
54top; fit
55checkview -screenshot -2d -path ${imagedir}/${test_image}.png