Adding of testing cases from subgroups 937 940 and 941 of CHL group
[occt.git] / tests / bugs / modalg_1 / buc60899_2
CommitLineData
0e94a94e 1
2puts "============"
3puts "BUC60899"
4puts "============"
5puts ""
6#####################################################
7## Execution of the script prism_sec.tcl gives exception "NumericError".
8#####################################################
9
10set n 2
11set dx 4
12set sx 1
13set sz 10
14set xc [dval (2*$dx+2*$sx)*$n/2]
15set zc -30
16set r [dval $xc*0.9]
17
18set x 0
19set y -50
20set z 0
21set pol "polyline w $x $y $z"
22for {set i 1} {$i <= $n} {incr i} {
23 set x [dval $x+$dx]
24 set pol "$pol $x $y $z"
25 set x [dval $x+$sx]
26 set z [dval $z+$sz]
27 set pol "$pol $x $y $z"
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}
34
35eval $pol
36polyline c $xc-$r -$r*2 $zc $xc+$r -$r*2 $zc $xc+$r $r*2 $zc $xc-$r $r*2 $zc $xc-$r -$r*2 $zc
37
38prism cyl c 0 0 -$zc*2 inf
39prism crg w 0 -$y*2 0 inf
40bsection result crg cyl
41
42#checksection res
43#checkshape res
44
45set nb_info [nbshapes result]
46regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full edgeness
47
0e94a94e 48 #set fullness [ nbshapes res ]
49 #puts "$fullness"
50 #set qq [ lindex $fullness 0 ]
51 #set edgeness [ lindex $fullness 10 ]
52 # puts "$edgeness"
53
54if { $edgeness == 1 } {
55 puts "Shape is empty, it is Faulty result"
56} else {
57 puts "Shape is not empty, OK"
58}
59
60set length 162.299
61set 2dviewer 0