0030760: Modeling Algorithms - Intersection fails in Occt 7.3.0
[occt.git] / tests / bugs / modalg_7 / bug29311_17
CommitLineData
1a0339b4 1puts "========"
7bd071ed 2puts "OCC29311: Implementation of the Oriented Bounding Boxes (OBB) functionality"
1a0339b4 3puts "========"
4puts ""
1a0339b4 5
6set NbIters 31
7set step [expr 360.0/($NbIters-1) ]
8
9restore [locate_data_file OCC26443-shell_2.brep] a
10
11# Check DiTo-algorithm
12incmesh a 0.01
13
14set VMax -1.0e200
15set VMin 1.0e200
16
17set MaxIteration 0
18set MinIteration 0
19
20for {set i 1} { $i <= $NbIters} { incr i } {
1f26f80b 21 bounding a -obb -shape rr$i
1a0339b4 22
23 regexp {Mass +: +([-0-9.+eE]+)} [vprops rr$i 1.0e-12 -full] full Vreal
24
25 if { $Vreal > $VMax } {
26 set VMax $Vreal
27 set MaxIteration $i
28 copy a amax
29 }
30
31 if { $Vreal < $VMin } {
32 set VMin $Vreal
33 set MinIteration $i
34 copy a amin
35 }
36
37 if { $i != $NbIters } { trotate a 283 162 317 2 7 9 $step }
38}
39
7bd071ed 40checkreal {Transformed BndBoxes} $VMax $VMin 0.0 0.35
1a0339b4 41
42puts "The box with maximal volume is achieved in $MaxIteration iteration. See \"amax\" shape."
43puts "The box with minimal volume is achieved in $MinIteration iteration. See \"amin\" shape."
44
1f26f80b 45bounding amax -obb -dump
46bounding amin -obb -dump
1a0339b4 47