0025133: TKOpenGl - Crash on closing a view containing presentations with capping
[occt.git] / tests / draft / end
CommitLineData
40093367 1if { [isdraw result] } {
2 regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full m
3
4 #check if result is valid
5 set ch [checkshape result]
6 puts $ch
7 if { $m == 0 } {
94a57f1f 8 puts "Error : The skin is not valid. The area is 0."
40093367 9 }
10
11 if { $square > 0 } {
94a57f1f 12 puts "The expected area is $square"
40093367 13 }
14 #check of change of square is < 1%
49c093ae 15 if { ($square != 0 && [expr 1.*abs($square - $m)/$square] > 0.01) || ($square == 0 && $m != 0) } {
94a57f1f 16 puts "Error : The area of the resulting shape is $m"
40093367 17 }
18 if { [string compare $ch "This shape seems to be valid"] == 0 } {
19 #check if tolerance is less 1.
20 set tol 10.
21 if { [regexp {Face +:.+Max +([-0-9.+eE]+)} [maxtolerance result] full tol] == 0 } {
22 #Avoiding maxtolerance bug on Windows
23 if { [array get Draw_Groups "Shape Healing"] == "" } {
24 pload XSDRAW
25 }
26 regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance result] full tol
27 }
28 if { $tol > 1. } {
94a57f1f 29 puts "Error: The tolerance of the resulting shape is too big ($tol)."
40093367 30 }
31 }
32
33 if { $m > 0 } {
34 clear
35 smallview
36 donly result
37 fit
88f8fc81 38 xwd $imagedir/${test_image}.png
40093367 39 }
40} else {
94a57f1f 41 puts "Error : The skin cannot be built."
40093367 42}
43
44# to end a test script
45puts "TEST COMPLETED"