0027481: [Regression to OCCT 6.6.0] Modeling Algorithms - incorrect CUT on two solids
[occt.git] / tests / bugs / modalg_2 / bug5805_29
1 puts "============"
2 puts "OCC5805"
3 puts "OCC7582"
4 puts "============"
5
6 #######################################################################
7 # BRepOffsetAPI_MakeThickSolid behaves unstably and produces very different results.
8 #######################################################################
9 # Bad result of offset operation
10 #######################################################################
11
12 set BugNumber OCC5805
13
14 set z1 10
15 set z2 -10
16
17 # circle1
18 circle c1 0 0 ${z1} 5
19 mkedge ec1 c1
20 wire UpCover ec1
21
22 # circle2
23 circle c2 0 0 ${z2} 30
24 mkedge ec2 c2
25 wire BottomCover ec2
26
27 set issolid 1
28 set isruled 1
29 if [catch { thrusections s ${issolid} ${isruled} UpCover BottomCover } catch_result] {
30    puts "Faulty ${BugNumber} : thrusections is wrong"
31    
32 }
33
34 set distance -0.5
35 catch { OFFSETSHAPE $distance {} $calcul $type }
36
37
38 checkprops result -s 5829.59 
39 checkshape result
40
41 checknbshapes result -vertex 2 -edge 3 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 13
42
43 set index [lsearch [whatis s] Closed]
44 if {$index == -1} {
45   puts "Faulty ${BugNumber} : s is not Closed shape"
46   
47 }
48
49 set index [lsearch [whatis result] Closed]
50 if {$index == -1} {
51   puts "Faulty ${BugNumber} : result is not Closed shape"
52   
53 }
54
55 checkview -display result -2d -path ${imagedir}/${test_image}.png