mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
105 lines
2.9 KiB
Plaintext
Executable File
105 lines
2.9 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}"
|
|
|
|
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
|
|
|
|
|
|