Correction of testing case for issue 24374
[occt.git] / tests / bugs / modalg_1 / buc60901
1
2 puts "============"
3 puts "BUC60901"
4 puts "============"
5 puts ""
6 ################################################################
7 ## We should get the edges forming a closed intersection line but we see breaks. 
8 ################################################################
9
10 set n 3
11 set dx 1
12 set sx 20
13 set sz 10
14
15 set xc [dval (2*$dx+2*$sx)*$n/2]
16 set yc 0
17 set zc [dval $sz*10]
18 set nxc 0.5
19 set nyc -0.3
20 set nzc 1
21 set r [dval $xc*0.9]
22
23 set x 0
24 set y [dval -$r*1.2]
25 set z 0
26 set pol "polyline w $x $y $z"
27 for {set i 1} {$i <= $n} {incr i} {
28     set x [dval $x+$dx]
29     set pol "$pol $x $y $z"
30     set x [dval $x+$sx]
31     set z [dval $z+$sz]
32     set pol "$pol $x $y $z"
33     set x [dval $x+$dx]
34     set pol "$pol $x $y $z"
35     set x [dval $x+$sx]
36     set z [dval $z-$sz]
37     set pol "$pol $x $y $z"
38 }
39
40 eval $pol
41 circle c $xc $yc $zc $nxc $nyc $nzc $r
42 mkedge c c
43
44 set lcyl [dval -$zc*2]
45 set lcrg [dval -$y*2]
46
47 prism cyl c 0 0 $lcyl
48 prism crg w 0 $lcrg 0
49 bsection result crg cyl
50
51 set nb_info [nbshapes result]
52 regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_vertices
53 regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_edges
54
55 if { $nb_vertices != $nb_edges } {                                         
56     puts "Section is opened: Faulty shape"
57 } else {
58     puts "Section is closed: OK"
59 }
60
61 set length 350.404
62 set 2dviewer 0