1 puts "================"
4 puts "================"
10 set filepath [locate_data_file lh3d_px1.igs]
11 if [catch {igesbrep $filepath a *} catch_result] {
12 puts "Faulty OCC343: here is reading problem"
14 puts "Reading OCC343 OK"
21 checkmaxtol result1 -ref 66.0727572
22 checknbshapes result1 -shell 1
23 checkfreebounds result1 86
25 set FaceList [explode result1 f]
26 set FaceListLength [llength ${FaceList}]
27 if { ${FaceListLength} < 1 } {
28 puts "OCC343 - Error : FaceListLength= ${FaceListLength}"
34 for {set i 1} {${i} <= ${FaceListLength}} {incr i} {
35 set props [sprops result1_${i}]
36 set list [split ${props} "\n\t"]
37 set listLength [llength ${list}]
38 if { ${listLength} < 20 } {
39 puts "OCC343 - Error : listLength= ${listLength}"
41 set Center_Gravity_X [lindex ${list} 5]
42 set Center_Gravity_Y [lindex ${list} 6]
43 set Center_Gravity_Z [lindex ${list} 7]
45 set Center_Gravity_X [lindex [split ${Center_Gravity_X}] [expr [llength [split ${Center_Gravity_X}] ] - 1] ]
46 set Center_Gravity_Y [lindex [split ${Center_Gravity_Y}] [expr [llength [split ${Center_Gravity_Y}] ] - 1] ]
47 set Center_Gravity_Z [lindex [split ${Center_Gravity_Z}] [expr [llength [split ${Center_Gravity_Z}] ] - 1] ]
49 lappend X_List1 ${Center_Gravity_X}
50 lappend Y_List1 ${Center_Gravity_Y}
51 lappend Z_List1 ${Center_Gravity_Z}
59 for {set j 1} {${j} <= ${CycleNumber}} {incr j} {
65 if [catch {igesbrep $filepath a *} catch_result] {
66 puts "Faulty OCC343: here is reading problem"
68 puts "Reading OCC343 OK"
74 checkmaxtol result2 -ref 66.072757207851282
75 checknbshapes result2 -shell 1
76 checkfreebounds result2 86
78 set FaceList [explode result2 f]
79 set FaceListLength [llength ${FaceList}]
80 if { ${FaceListLength} < 1 } then {puts "OCC343 - Error : FaceListLength= ${FaceListLength}"}
85 for {set i 1} {${i} <= ${FaceListLength}} {incr i} {
86 set props [sprops result2_${i}]
87 set list [split ${props} "\n\t"]
88 set listLength [llength ${list}]
89 if { ${listLength} < 20 } {
90 puts "OCC343 - Error : listLength= ${listLength}"
93 set Center_Gravity_X [lindex ${list} 5]
94 set Center_Gravity_Y [lindex ${list} 6]
95 set Center_Gravity_Z [lindex ${list} 7]
97 set Center_Gravity_X [lindex [split ${Center_Gravity_X}] [expr [llength [split ${Center_Gravity_X}] ] - 1] ]
98 set Center_Gravity_Y [lindex [split ${Center_Gravity_Y}] [expr [llength [split ${Center_Gravity_Y}] ] - 1] ]
99 set Center_Gravity_Z [lindex [split ${Center_Gravity_Z}] [expr [llength [split ${Center_Gravity_Z}] ] - 1] ]
101 lappend X_List2 ${Center_Gravity_X}
102 lappend Y_List2 ${Center_Gravity_Y}
103 lappend Z_List2 ${Center_Gravity_Z}
106 set ListLength [llength ${X_List1}]
107 if { ${ListLength} != [llength ${Y_List1}] } then {puts "OCC343 - Error : ListLength= ${ListLength}"}
108 if { ${ListLength} != [llength ${Z_List1}] } then {puts "OCC343 - Error : ListLength= ${ListLength}"}
109 if { ${ListLength} != [llength ${X_List2}] } then {puts "OCC343 - Error : ListLength= ${ListLength}"}
110 if { ${ListLength} != [llength ${Y_List2}] } then {puts "OCC343 - Error : ListLength= ${ListLength}"}
111 if { ${ListLength} != [llength ${Z_List2}] } then {puts "OCC343 - Error : ListLength= ${ListLength}"}
113 for {set i 0} {${i} < ${ListLength}} {incr i} {
114 set X1 [lindex ${X_List1} ${i}]
115 set X2 [lindex ${X_List2} ${i}]
116 if { ${X1} != ${X2} } {
117 puts "OCC343 - Error : X1= ${X1} X2= ${X2}"
119 set Y1 [lindex ${Y_List1} ${i}]
120 set Y2 [lindex ${Y_List2} ${i}]
121 if { ${Y1} != ${Y2} } {
122 puts "OCC343 - Error : Y1= ${Y1} Y2= ${Y2}"
124 set Z1 [lindex ${Z_List1} ${i}]
125 set Z2 [lindex ${Z_List2} ${i}]
126 if { ${Z1} != ${Z2} } {
127 puts "OCC343 - Error : Z1= ${Z1} Z2= ${Z2}"
137 checkview -screenshot -3d -path ${imagedir}/${test_image}.png