e54706ed |
1 | puts "============" |
2 | puts "OCC9490" |
3 | puts "============" |
4 | puts "" |
5 | ####################################################################### |
6 | # Increasing of tolerance in loop test for IGES |
7 | ####################################################################### |
8 | |
9 | set BugNumber OCC9490 |
10 | |
11 | set IsOk 1 |
5d1833ef |
12 | set filepath [locate_data_file support_bobine.igs] |
13 | if {[catch {igesread $filepath OCC9490a *}]} { |
e54706ed |
14 | puts "Faulty ${BugNumber} : here is reading problem" |
15 | set IsOk 0 |
16 | } |
17 | |
18 | file delete ${imagedir}/OCC9490tmp.igs |
19 | |
20 | if {[catch {brepiges OCC9490a ${imagedir}/OCC9490tmp.igs}]} { |
21 | puts "Faulty ${BugNumber} : here is conversation to brep problem" |
22 | set IsOk 0 |
23 | } |
24 | catch {exec chmod 777 ${imagedir}/OCC9490tmp.igs} |
25 | |
26 | if {[catch {igesread ${imagedir}/OCC9490tmp.igs OCC9490b *}]} { |
27 | puts "Faulty ${BugNumber} : here is 2nd reading problem" |
28 | set IsOk 0 |
29 | } |
30 | |
31 | if { ${IsOk} == 1} { |
32 | set aTokList {= } |
33 | set Tol1 [lindex [split [tolerance OCC9490a] ${aTokList}] 2] |
34 | set Tol2 [lindex [split [tolerance OCC9490b] ${aTokList}] 2] |
35 | set percent_max 0.1 |
36 | set Tolerance_percent [GetPercent ${Tol1} ${Tol2}] |
37 | puts "Tolerance_percent = ${Tolerance_percent} %" |
38 | if { ${Tolerance_percent} > ${percent_max} } { |
39 | set IsOk 0 |
40 | } |
41 | |
42 | set good_square 36259 |
43 | set good_vertex 1770 |
44 | set good_edge 1237 |
45 | set good_wire 140 |
46 | set good_face 123 |
47 | set good_shell 0 |
48 | set good_solid 0 |
49 | set good_compsolid 0 |
50 | set good_compound 1 |
51 | set good_shape 3271 |
52 | |
53 | set nb_info [nbshapes OCC9490a] |
54 | regexp {Mass +: +([-0-9.+eE]+)} [sprops OCC9490a] full sq1 |
55 | regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_v1 |
56 | regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_e1 |
57 | regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full nb_w1 |
58 | regexp {FACE +: +([-0-9.+eE]+)} $nb_info full nb_f1 |
59 | regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full nb_sh1 |
60 | regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full nb_sol1 |
61 | regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full nb_compsol1 |
62 | regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full nb_compound1 |
63 | regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full nb_shape1 |
64 | if {$sq1 != $good_square |
65 | || $nb_v1 != $good_vertex |
66 | || $nb_e1 != $good_edge |
67 | || $nb_w1 != $good_wire |
68 | || $nb_f1 != $good_face |
69 | || $nb_sh1 != $good_shell |
70 | || $nb_sol1 != $good_solid |
71 | || $nb_compsol1 != $good_compsolid |
72 | || $nb_compound1 != $good_compound |
73 | || $nb_shape1 != $good_shape } { |
74 | set IsOk 0 |
75 | } |
76 | |
77 | set nb_info [nbshapes OCC9490b] |
78 | regexp {Mass +: +([-0-9.+eE]+)} [sprops OCC9490b] full sq2 |
79 | regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_v2 |
80 | regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_e2 |
81 | regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full nb_w2 |
82 | regexp {FACE +: +([-0-9.+eE]+)} $nb_info full nb_f2 |
83 | regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full nb_sh2 |
84 | regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full nb_sol2 |
85 | regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full nb_compsol2 |
86 | regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full nb_compound2 |
87 | regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full nb_shape2 |
88 | if {$sq2 != $good_square |
89 | || $nb_v2 != $good_vertex |
90 | || $nb_e2 != $good_edge |
91 | || $nb_w2 != $good_wire |
92 | || $nb_f2 != $good_face |
93 | || $nb_sh2 != $good_shell |
94 | || $nb_sol2 != $good_solid |
95 | || $nb_compsol2 != $good_compsolid |
96 | || $nb_compound2 != $good_compound |
97 | || $nb_shape2 != $good_shape } { |
98 | set IsOk 0 |
99 | } |
100 | |
101 | if { ${IsOk} == 0 } { |
102 | puts "${BugNumber}: Faulty" |
103 | } else { |
104 | puts "${BugNumber}: OK" |
105 | } |
106 | } |
107 | |
108 | renamevar OCC9490b result |
109 | set 2dviewer 0 |