Files
OCCT/tests/bugs/moddata/bug332
aba 4754e16481 0023539: QASelect and QAShiftSelect commands
Replaced QAMoveTo, QASelect and QAShiftSelect draw commands with vmoveto and vselect
Moved vselect and vmoveto draw commands to ViewerTest_ViewerCommands.cxx
Replaced  QAMoveTo and QASelect in test cases. Corrected returned error case result in vselect and vmoveto.
Added commands in ViewerTest_ViewerCommands from QADraw. Edited tests.
QACommands in tests were replaced with ViewerTest commands.
QAxwd command was removed from QADraw. Edited command wzoom and commands from ViewerTest.
Help for ViewerTest commands was edited
Small corrections. Added test cases for polygonal selection.
Small correction of test cases
2013-01-18 14:22:14 +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 ll 100
set major_radius 200
OCC332 ${wall_thickness} ${dia1} ${dia2} ${ll} ${major_radius}
checkshape wallSolid_
checkshape gasSolid_
vinit
vdisplay wallSolid_
vdisplay gasSolid_
vzfit
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