0030829: BRepExtrema_ShapeProximity crashes with shape from STL/WRL
[occt.git] / tests / bugs / modalg_7 / bug30595_1
1 puts "==============================================================="
2 puts "0030595: Oriented Bounding Box seems not optimal for some shapes"
3 puts "==============================================================="
4 puts ""
5
6 # average volumes of OBBs on different sets
7 set OBB_Vol_Exp 615000
8 # set relative error to 1%
9 set eps 0.01
10
11 restore [locate_data_file bug30595_UC4_P_2K.brep] s1
12 # build OBB
13 dchrono s1_time start
14 bounding s1 -obb -shape bs1 -optimal
15 dchrono s1_time stop counter s1_OBB
16 # check volume
17 checkprops bs1 -v $OBB_Vol_Exp -deps $eps
18
19 restore [locate_data_file bug30595_UC4_P_13K.brep] s2
20 # build OBB
21 dchrono s2_time start
22 bounding s2 -obb -shape bs2 -optimal
23 dchrono s2_time stop counter s2_OBB
24 # check volume
25 checkprops bs2 -v $OBB_Vol_Exp -deps $eps
26
27 restore [locate_data_file bug30595_UC4_P_125K.brep] s3
28 # build OBB
29 dchrono s3_time start
30 bounding s3 -obb -shape bs3 -optimal
31 dchrono s3_time stop counter s3_OBB
32 # check volume
33 checkprops bs3 -v $OBB_Vol_Exp -deps $eps
34
35 smallview +X+Z
36 donly s3 bs3; fit
37 checkview -screenshot -2d -path ${imagedir}/${test_image}_xz.png
38
39 smallview +X+Y
40 donly s3 bs3; fit
41 checkview -screenshot -2d -path ${imagedir}/${test_image}_xy.png