0026606: Test cases for BRepProj_Projection
[occt.git] / tests / prj / end
CommitLineData
66a9b817 1smallview
2fit
3xwd $imagedir/${test_image}.png
4
5if {[llength $prlist] > 0} {
6 set marker_mass 0
7 if {[isdraw marker] == 1} {
8 regexp {Mass +: +([-0-9.+eE]+)} [lprops marker] full marker_mass
9 }
10
11 set proj_mass 0
12 foreach pr $prlist {
13 if {[isdraw $pr] == 1} {
14 checkshape $pr
15 regexp {Mass +: +([-0-9.+eE]+)} [lprops $pr] full tmp
16 set proj_mass [expr $proj_mass + $tmp]
17 }
18 }
19
20 if {$marker_mass != 0 && $proj_mass != 0} {
21 set rel [expr $proj_mass/$marker_mass]
22 puts [format {Length relation: %f} $rel]
23 if {[info exists relcoef] == 0} {
24 set relcoef 1
25 }
26 if {[expr abs($rel - $relcoef)] > 0.02} {
27 puts "Error: deviation of projection length from original is too high"
28 }
29 } else {
30 puts "Error: unable to calculate length"
31 }
32} else {
33 puts "Error: no results produced"
34}
35
36puts ""
37puts "TEST COMPLETED"
38puts ""