0025624: Visualization - selection is incorrect in perspective mode in a specific...
[occt.git] / tests / sewing / end
CommitLineData
40093367 1set cs_a [checkshape a]
2puts "checkshape a"
3if { [info exists nb_f] == 0 } {
4 set nb_f 0
5}
6if { $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
16set exp [explode a f]
17set L [concat compound $exp C]
18eval $L
19puts [whatis C]
20puts [sewing result $tol C]
21
22if { [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"} {
eddb9c7c 37 freebounds $result -0.01
40093367 38 set s [explode result_c e]
39 puts $s
40 set index [ llength $s ]
eddb9c7c 41 #nbFreeEdges is set to empty only in cases of unstable work of sewing (see #24591).
42 if { [string compare "$nbFreeEdges" ""] == 0 || $index != $nbFreeEdges } {
40093367 43 puts "Error : Number of free edges is $index"
44 }
45
94a57f1f 46 puts "Number of faults for the initial shape is $nb_a."
47 puts "Number of faults for the resulting shape is $nb_r."
40093367 48
49 #if nb_f is empty then it is instaility.
50 if { [string compare "$nb_f" ""] == 0 || $nb_f > 0 } {
51 set os "ALL"
52 if {[array get env os_type] != ""} {
53 set os $env(os_type)
54 }
94a57f1f 55 puts "TODO #23150 $os: Error : Number of faults is $nb_f"
40093367 56 }
57 if { $nb_r > $nb_a } {
94a57f1f 58 puts "Error : Number of faults is $nb_r"
40093367 59 }
60 } else {
61 puts "Error : OPERATION FAILED"
62 }
63 clear
64 smallview
65 donly result
66 checkshape result
67 fit
88f8fc81 68 xwd $imagedir/${test_image}.png
40093367 69} else {
94a57f1f 70 puts "Error : The sewing cannot be built."
40093367 71}
72
73puts "TEST COMPLETED"