61c421bf |
1 | puts "=========" |
2 | puts " OCC951 " |
3 | puts "=========" |
4 | puts "" |
5 | ################################################## |
6 | ##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes |
7 | ################################################## |
8 | ## (new topology) |
9 | ## (bopcommon) |
10 | ## (bopsection) |
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 | bop a b |
20 | bopcommon res1 |
21 | bopsection result |
22 | |
23 | set nb_info [nbshapes result] |
24 | regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve |
25 | regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed |
26 | regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi |
27 | regexp {FACE +: +([-0-9.+eE]+)} $nb_info full fa |
28 | regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full sh |
29 | regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full so |
30 | regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full cm |
31 | regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full co |
32 | regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full shl |
33 | |
34 | if { $ve != 0 || $ed != 0 || $wi != 0 || $fa != 0 || $sh != 0 || $so != 0 || $cm != 0 || $co != 0 || $shl != 0 } { |
35 | puts " OCC951 : COMMON operation was made PROPERLY" |
36 | puts "" |
37 | } else { |
38 | puts "Faulty OCC951 : result of COMMON operation is EMPTY compound" |
39 | puts "" |
40 | } |
41 | |
42 | set length 39.8616 |
43 | set 3dviewer 0 |