0031047: Modeling Algorithms - BRepExtrema_DistShapeShape gives wrong result
[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
1f26f80b 12bounding result -save xMin yMin zMin xMax yMax zMax -dump
b819ae67 13
14mkcurve c result
15bounds c u1 u2
16set first [dval u1]
17set last [dval u2]
18
19set x 0.
20set y 0.
21set z 0.
22set param 0.
23set isOk true
24
25set nbSamples 100
26set step [expr ($last - $first)/$nbSamples]
27for {set i 0} {$i <= $nbSamples} {incr i} {
28 if {$i < $nbSamples} {
29 set param [expr $first + $i * $step]
30 } else {
31 set param $last
32 }
33
34 cvalue c $param cx cy cz
35 set x [dval cx]
36 set y [dval cy]
37 set z [dval cz]
1a0339b4 38 if {$x < [dval xMin] || $x > [dval xMax] || $y < [dval yMin] || $y > [dval yMax] || $z < [dval zMin] || $z > [dval zMax] } {
b819ae67 39 puts "ERROR: point ($x; $y; $z) is out of bounding box"
40 set isOk false
41 }
42}
43
44if {$isOk} {
45 puts "OK: all sample points inside bounding box"
46}
47
48top; fit
49checkview -screenshot -2d -path ${imagedir}/${test_image}.png