adcd00d63ddfe368989532e86afeab83d3fb5b7c
[occt.git] / tests / bugs / modalg_2 / bug5805_1
1 puts "============"
2 puts "OCC5805"
3 puts "============"
4 puts ""
5 ######################################################
6 # BRepOffsetAPI_MakeThickSolid behaves unstably and produces very different results.
7 ######################################################
8
9 set BugNumber OCC5805
10
11 puts "demonstration of pipes and hollowing for GTISoft"
12 puts ""
13 puts "Scenario 2A: Hollowed elliptical cylinder - ThroughSection and MakeThickSolid (work-around: ellipse is split into 2)"
14
15
16 ellipse e 10 60 0 1 0 0 5 3
17 trim e1 e 0 pi
18 trim e2 e pi 2*pi
19 mkedge ee1 e1
20 mkedge ee2 e2
21 wire w1 ee1 ee2
22 copy w1 w2
23 ttranslate w2 -20 0 0
24
25 if { [catch { thrusections rthru2 1 1 w1 w2 } catch_result] } {
26    puts "Faulty ${BugNumber} : thrusections is wrong"
27 }
28
29 explode rthru2 f
30
31 if { [catch { offsetshape result rthru2 -0.5 rthru2_3 rthru2_4 } catch_result] } {
32    puts "Faulty ${BugNumber} : offsetshape is wrong"
33 }
34
35 if { [catch { set tolmaxres [tolmax result] } catch_result] } {
36    puts "Faulty ${BugNumber} : tolmax is wrong"
37 }
38
39 regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full maxtolerance
40 if { [catch { expr $maxtolerance } res] } {
41    puts "Faulty ${BugNumber} : maxtolerance is wrong (1)."
42 }
43 if { $maxtolerance > 1. } {
44    puts "Faulty ${BugNumber} : maxtolerance is wrong (2)."
45 }
46
47 set square 981.941
48
49 set nb_v_good 6
50 set nb_e_good 10
51 set nb_w_good 8
52 set nb_f_good 6
53 set nb_sh_good 1
54 set nb_sol_good 1
55 set nb_compsol_good 0
56 set nb_compound_good 0
57 set nb_shape_good 32
58
59 set 2dviewer 0