0028567: Get rid of the unused DRAW commands based on old Boolean Operations (BRepAlgo)
[occt.git] / tests / bugs / modalg_1 / buc60899_2
1
2 puts "============"
3 puts "BUC60899"
4 puts "============"
5 puts ""
6 #####################################################
7 ## Execution of the script prism_sec.tcl gives  exception "NumericError". 
8 #####################################################
9
10 set n 2
11 set dx 4
12 set sx 1
13 set sz 10
14 set xc [dval (2*$dx+2*$sx)*$n/2]
15 set zc -30
16 set r  [dval $xc*0.9]
17
18 set x 0
19 set y -50
20 set z 0
21 set pol "polyline w $x $y $z"
22 for {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
35 eval $pol
36 polyline 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
38 prism cyl c 0 0 -$zc*2 inf
39 prism crg w 0 -$y*2 0 inf
40 bsection result crg cyl
41
42 #checksection res
43 #checkshape res
44
45 set nb_info [nbshapes result]
46 regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full edgeness
47     
48 if { $edgeness == 1  } {                                         
49     puts "Shape is empty, it is Faulty result"                                                                               
50 } else {                                                                                                                        
51     puts "Shape is not empty, OK"                                                                                                   
52 }
53
54 checkprops result -l 162.299 
55 checkshape result
56 checksection result
57 checkview -display result -2d -path ${imagedir}/${test_image}.png