1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00
apn 352ffd7358 Adding test cases for chl grid
Test case tests/bugs/modalg/dxf906 was renamed to bug889
Adding test cases to tests/bugs/moddata
Modified expressions puts [checkshape result]. Added command vzfit in end file in folder bugs. Unlocked command coordload in QABugs_3.cxx
Modified test case bugs vis buc60738
Added test cases to modalg and moddata
Added test cases to caf and fclasses
Added test cases to group heal
2012-12-21 16:39:38 +04:00

105 lines
2.8 KiB
Plaintext
Executable File

puts "================"
puts "OCC332"
puts "================"
puts ""
pload QAcommands
set wall_thickness 10
set dia1 30
set dia2 50
set length 100
set major_radius 200
OCC332 ${wall_thickness} ${dia1} ${dia2} ${length} ${major_radius}
checkshape wallSolid_
checkshape gasSolid_
vinit
vdisplay wallSolid_
vdisplay gasSolid_
QAvzfit
explode wallSolid_ w
vdisplay wallSolid__3
vdisplay wallSolid__4
vdisplay wallSolid__5
vdisplay wallSolid__6
set props_3 [lprops wallSolid__3]
set props_4 [lprops wallSolid__4]
set props_5 [lprops wallSolid__5]
set props_6 [lprops wallSolid__6]
#wire wallSolid__3
set list [split ${props_3} "\n\t"]
set listLength [llength ${list}]
if { ${listLength} < 20 } {
puts "OCC332 - Error : listLength= ${listLength}"
}
regexp {Mass +: +([-0-9.+eE]+)} $props_3 full CircleLength_3
#wire wallSolid__4
set list [split ${props_4} "\n\t"]
set listLength [llength ${list}]
if { ${listLength} < 20 } {
puts "OCC332 - Error : listLength= ${listLength}"
}
regexp {Mass +: +([-0-9.+eE]+)} $props_4 full CircleLength_4
#wire wallSolid__5
set list [split ${props_5} "\n\t"]
set listLength [llength ${list}]
if { ${listLength} < 20 } {
puts "OCC332 - Error : listLength= ${listLength}"
}
regexp {Mass +: +([-0-9.+eE]+)} $props_5 full CircleLength_5
#wire wallSolid__6
set list [split ${props_6} "\n\t"]
set listLength [llength ${list}]
if { ${listLength} < 20 } {
puts "OCC332 - Error : listLength= ${listLength}"
}
regexp {Mass +: +([-0-9.+eE]+)} $props_6 full CircleLength_6
# Calculation
set pi [expr 2. * asin(1.0)]
set TheoryCircleLength_4 [expr ${pi} * ${dia1}]
set TheoryCircleLength_3 [expr ${pi} * (${dia1} + 2 * ${wall_thickness}) ]
set TheoryCircleLength_6 [expr ${pi} * ${dia2}]
set TheoryCircleLength_5 [expr ${pi} * (${dia2} + 2 * ${wall_thickness}) ]
set delta_3 [expr abs(${CircleLength_3} - ${TheoryCircleLength_3}) / ${TheoryCircleLength_3} * 100]
set delta_4 [expr abs(${CircleLength_4} - ${TheoryCircleLength_4}) / ${TheoryCircleLength_4} * 100]
set delta_5 [expr abs(${CircleLength_5} - ${TheoryCircleLength_5}) / ${TheoryCircleLength_5} * 100]
set delta_6 [expr abs(${CircleLength_6} - ${TheoryCircleLength_6}) / ${TheoryCircleLength_6} * 100]
set maxdelta 0.1
if { ${delta_3} > ${maxdelta} } then {puts "OCC332 - Error : delta_3= ${delta_3}"}
if { ${delta_4} > ${maxdelta} } then {puts "OCC332 - Error : delta_4= ${delta_4}"}
if { ${delta_5} > ${maxdelta} } then {puts "OCC332 - Error : delta_5= ${delta_5}"}
if { ${delta_6} > ${maxdelta} } then {puts "OCC332 - Error : delta_6= ${delta_6}"}
if { ${delta_3} <= ${maxdelta} && ${delta_4} <= ${maxdelta} && ${delta_5} <= ${maxdelta} && ${delta_6} <= ${maxdelta} } then {
puts "OCC332: OK"
}
puts "CircleLength_3 = ${CircleLength_3}"
puts "CircleLength_4 = ${CircleLength_4}"
puts "CircleLength_5 = ${CircleLength_5}"
puts "CircleLength_6 = ${CircleLength_6}"
set only_screen 1