6 #####################################################
7 ## Execution of the script prism_sec.tcl gives exception "NumericError".
8 #####################################################
14 set xc [dval (2*$dx+2*$sx)*$n/2]
21 set pol "polyline w $x $y $z"
22 for {set i 1} {$i <= $n} {incr i} {
24 set pol "$pol $x $y $z"
27 set pol "$pol $x $y $z"
29 set pol "$pol $x $y $z"
32 set pol "$pol $x $y $z"
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
38 prism cyl c 0 0 -$zc*2 inf
39 prism crg w 0 -$y*2 0 inf
40 bsection result crg cyl
45 set nb_info [nbshapes result]
46 regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full edgeness
48 #set fullness [ nbshapes res ]
50 #set qq [ lindex $fullness 0 ]
51 #set edgeness [ lindex $fullness 10 ]
54 if { $edgeness == 1 } {
55 puts "Shape is empty, it is Faulty result"
57 puts "Shape is not empty, OK"