0029807: [Regression to 7.0.0] Impossible to cut cone from prism
[occt.git] / tests / bugs / modalg_4 / bug951_32
1 puts "========="
2 puts " OCC951 "
3 puts "========="
4 puts ""
5 ##################################################
6 ##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes
7 ##################################################
8 ## (old topology)
9 ## (common)
10 ## (section)
11 ######################################################
12
13 restore [locate_data_file OCC951_1.brep] b 
14 restore [locate_data_file OCC951_2.brep] a 
15
16 checkshape b
17 checkshape a
18
19 bsection result a b
20
21 set nb_info [nbshapes result]
22
23 regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
24 regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed
25 regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
26 regexp {FACE +: +([-0-9.+eE]+)} $nb_info full fa
27 regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full sh
28 regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full so
29 regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full cm
30 regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full co
31 regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full shl
32
33
34
35 if { $ve != 0 || $ed != 0 || $wi != 0 || $fa != 0 || $sh != 0 || $so != 0 || $cm != 0 || $co != 0 || $shl != 0 } {
36     puts  " OCC951 : SECTION operation was made PROPERLY"
37     puts ""
38 } else {
39     puts "Faulty OCC951 : result of SECTION operation is EMPTY compound"
40     puts ""
41 }
42 checkprops result -l 39.8616 
43 checkshape result 
44 checksection result
45 checkview -display result -3d -path ${imagedir}/${test_image}.png