5 #################################################
6 # Implementation of the Oriented Bounding Boxes (OBB) functionality
7 #################################################
10 set step [expr 360.0/($NbIters-1) ]
12 restore [locate_data_file bug29237_no_overlap.rhs.brep] a
14 # Create AABB for a and put it into "r1" variable
15 # Draw[]> bounding -s a -shape r1
16 # The volume of one AABB is
17 # Draw[]> vprops r1 1.0e-12 -full
19 set Vexp 32736000.184203226
24 for {set i 1} { $i <= $NbIters} { incr i } {
25 bounding -s a -obb -shape rr$i
27 regexp {Mass +: +([-0-9.+eE]+)} [vprops rr$i 1.0e-12 -full] full Vreal
29 if { $Vreal > $VMax } {
35 if { $i != $NbIters } { trotate a 283 162 317 2 7 9 $step }
38 set aDeltaMax [ expr 100.0*abs($VMax/$Vexp - 1.0) ]
40 puts "Delta of computation not greater than $aDeltaMax %. Maximal delta is achieved in $MaxIteration iteration. See \"amax\" shape."
42 if { $aDeltaMax > 30 } {
43 puts "Error: The obtained OBB(s) is not precise."
47 donly amax rr${MaxIteration}
49 checkview -screenshot -2d -path ${imagedir}/${test_image}.png