40093367 |
1 | set cs_a [checkshape a] |
2 | puts "checkshape a" |
3 | if { [info exists nb_f] == 0 } { |
4 | set nb_f 0 |
5 | } |
6 | if { $cs_a == "This shape seems to be valid"} { |
7 | puts "Shape a seems to be valid" |
8 | set nb_a 0 |
9 | } else { |
10 | puts "Shape a is not valid" |
11 | regexp {Faulty shapes in variables faulty_([0-9]*) to faulty_([0-9]*)} $cs_a full nb_a_begin nb_a_end |
12 | puts "Number of faulties is [expr $nb_a_end - $nb_a_begin +1]" |
13 | set nb_a [expr $nb_a_end - $nb_a_begin +1] |
14 | } |
15 | |
16 | set exp [explode a f] |
17 | set L [concat compound $exp C] |
18 | eval $L |
19 | puts [whatis C] |
20 | puts [sewing result $tol C] |
21 | |
22 | if { [isdraw result] } { |
23 | set cs_r [checkshape result] |
24 | puts "checkshape result" |
25 | if { $cs_r == "This shape seems to be valid"} { |
26 | puts "Shape result seems to be valid" |
27 | set nb_r 0 |
28 | } else { |
29 | puts "Shape result is not valid" |
30 | regexp {Faulty shapes in variables faulty_([0-9]*) to faulty_([0-9]*)} $cs_r full nb_r_begin nb_r_end |
31 | set nb_r [expr $nb_r_end - $nb_r_begin +1] |
32 | } |
33 | set t [dtyp result] |
34 | puts $t |
35 | set w [lindex $t 1] |
36 | if {"$w" == "SHELL"} { |
37 | catch {freebounds $result -0.01} |
38 | set s [explode result_c e] |
39 | puts $s |
40 | set index [ llength $s ] |
41 | if { $index != 0 } { |
42 | puts "Error : Number of free edges is $index" |
43 | } |
44 | |
45 | puts "Number of faulties for initial shape is $nb_a." |
46 | puts "Number of faulties for result shape is $nb_r." |
47 | |
48 | #if nb_f is empty then it is instaility. |
49 | if { [string compare "$nb_f" ""] == 0 || $nb_f > 0 } { |
50 | set os "ALL" |
51 | if {[array get env os_type] != ""} { |
52 | set os $env(os_type) |
53 | } |
54 | puts "TODO #23150 $os: Error : Number of faulties is $nb_f" |
55 | } |
56 | if { $nb_r > $nb_a } { |
57 | puts "Error : Number of faulties is $nb_r" |
58 | } |
59 | } else { |
60 | puts "Error : OPERATION FAILED" |
61 | } |
62 | clear |
63 | smallview |
64 | donly result |
65 | checkshape result |
66 | fit |
67 | xwd $imagedir/${test_image}.gif |
68 | } else { |
69 | puts "Error : The sewing can not be build." |
70 | } |
71 | |
72 | puts "TEST COMPLETED" |