############################################################################### # setsweep options [arg1 [arg2 [...]]] : options are : # -FR : Tangent and Normal are given by Frenet trihedron # -CF : Tangente is given by Frenet, # the Normal is computed to minimize the torsion ############################################################################### # addsweep wire [Vertex] [-T] [-R] [u0 v0 u1 v1 [...[uN vN]]] : options are : # -T : the wire have to be translated to assume contact # with the spine # -R : the wire have to be rotated to assume orthogonality # with the spine's tangent ############################################################################### # buildsweep result [-M/-C/-R] [-S] [tol] : options are # -M : Discontinuities are treated by Modfication of # the sweeping mode : it is the default # -C : Discontinuities are treated like Right Corner # Treatement is Extent && Intersect # -R : Discontinuities are treated like Round Corner # Treatement is Intersect and Fill ############################################################################### if { [info exists square] } { set prop "square" set mass $square if { [info exists tol_square] } { regexp {Mass +: +([-0-9.+eE]+)} [sprops result $tol_square] full m } else { regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full m } } if { [info exists volume] } { set prop "volume" set mass $volume regexp {Mass +: +([-0-9.+eE]+)} [vprops result] full m } if { [info exists length] } { set prop "length" set mass $length regexp {Mass +: +([-0-9.+eE]+)} [lprops result] full m puts "checksection" puts [checksection result] } #if mass (length or square) is empty in test case then result should be an empty shape. if { [info exists mass] } { checkshape result if { [string compare "$mass" "empty"] != 0 } { if { $m == 0 } { puts "Error : The command is not valid. The $prop is 0." } if { $mass > 0 } { puts "The expected $prop is $mass" } #check of change of square is < 1% if { ($mass != 0 && [expr 1.*abs($mass - $m)/$mass] > 0.01) || ($mass == 0 && $m != 0) } { puts "Error : The $prop of result shape is $m" } } else { if { $m != 0 } { puts "Error : The command is not valid. The $prop is $m" } } } if { [isdraw result] } { if { [info exists 2dviewer] } { clear smallview donly result fit xwd $imagedir/${test_image}.png } if { [info exists 3dviewer] } { vinit vclear vdisplay result vsetdispmode 1 vfit vzfit vdump $imagedir/${test_image}.png } } if { [info exist only_screen] } { vdump $imagedir/${test_image}.png } if { [info exist only_screen2d] } { v2ddump $imagedir/${test_image}.png } # to end a test script puts "TEST COMPLETED"