mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
Bnd_OBB constructor from Bnd_Box is fixed for VOID input. DRAW command bounding command is adjusted: - Support of old syntax 'bounding shape'is restored. - Exception on VOID bounding box is avoided. - Arguments are handled in case-insensitive way. - Options -s, -perfmeter, and ability to set result as first argument are removed as redundant. - Help is moved to command definition. Separate command OCC29311 is added (in QADraw) to do the same as option -perfmeter did; tests are updated.
90 lines
3.3 KiB
Plaintext
Executable File
90 lines
3.3 KiB
Plaintext
Executable File
puts "========"
|
|
puts "BUC60857"
|
|
puts "========"
|
|
|
|
vinit
|
|
BUC60857
|
|
vfit
|
|
|
|
set Property_BLUE [sprops BUC60857_BLUE]
|
|
set area_BLUE [lindex ${Property_BLUE} 2]
|
|
|
|
set Property_RED [sprops BUC60857_RED]
|
|
set area_RED [lindex ${Property_RED} 2]
|
|
|
|
set Property_GREEN [sprops BUC60857_GREEN]
|
|
set area_GREEN [lindex ${Property_GREEN} 2]
|
|
|
|
bounding BUC60857_BLUE -save xmin_BLUE ymin_BLUE zmin_BLUE xmax_BLUE ymax_BLUE zmax_BLUE -nodraw
|
|
bounding BUC60857_RED -save xmin_RED ymin_RED zmin_RED xmax_RED ymax_RED zmax_RED -nodraw
|
|
bounding BUC60857_GREEN -save xmin_GREEN ymin_GREEN zmin_GREEN xmax_GREEN ymax_GREEN zmax_GREEN -nodraw
|
|
|
|
set delta_area_GB [expr abs(${area_GREEN} - ${area_BLUE}) / ${area_BLUE} * 100]
|
|
set delta_area_BR [expr ${area_BLUE} / ${area_RED}]
|
|
|
|
set delta_xmin_GB [expr abs([dval xmin_GREEN] - [dval xmin_BLUE]) / [dval xmin_BLUE] * 100]
|
|
set delta_ymin_GB [expr abs([dval ymin_GREEN] - [dval ymin_BLUE]) / [dval ymin_BLUE] * 100]
|
|
set delta_zmin_GB [expr abs([dval zmin_GREEN] - [dval zmin_BLUE]) / [dval zmin_BLUE] * 100]
|
|
set delta_xmax_GB [expr abs([dval xmax_GREEN] - [dval xmax_BLUE]) / [dval xmax_BLUE] * 100]
|
|
set delta_ymax_GB [expr abs([dval ymax_GREEN] - [dval ymax_BLUE]) / [dval ymax_BLUE] * 100]
|
|
set delta_zmax_GB [expr abs([dval zmax_GREEN] - [dval zmax_BLUE]) / [dval zmax_BLUE] * 100]
|
|
|
|
set delta_xmin_RB [expr abs([dval xmin_RED] - [dval xmin_BLUE]) / [dval xmin_BLUE] * 100]
|
|
set delta_ymin_RB [expr abs([dval ymin_RED] - [dval ymin_BLUE]) / [dval ymin_BLUE] * 100]
|
|
set delta_zmin_RB [expr abs([dval zmin_RED] - [dval zmin_BLUE]) / [dval zmin_BLUE] * 100]
|
|
set delta_xmax_RB [expr abs([dval xmax_RED] - [dval xmax_BLUE]) / [dval xmax_BLUE] * 100]
|
|
set delta_ymax_RB [expr abs([dval ymax_RED] - [dval ymax_BLUE]) / [dval ymax_BLUE] * 100]
|
|
set delta_zmax_RB [expr abs([dval zmax_RED] - [dval zmax_BLUE]) / [dval zmax_BLUE] * 100]
|
|
|
|
set H_BLUE [expr [dval zmax_BLUE] - [dval zmin_BLUE] ]
|
|
set H_RED [expr [dval zmax_RED] - [dval zmin_RED] ]
|
|
set delta_H_RB [expr abs(${H_RED} - ${H_BLUE}) / ${H_BLUE} * 100]
|
|
|
|
set maxdelta 0.01
|
|
|
|
if {${delta_area_GB} > ${maxdelta}} {
|
|
puts "delta_area_GB = ${delta_area_GB}"
|
|
puts "maxdelta = ${maxdelta}"
|
|
puts "BUC60857: ERROR (case 1)"
|
|
} else {
|
|
puts "BUC60857: OK (case 1)"
|
|
}
|
|
|
|
if {${delta_area_BR} > 3.0 || \
|
|
${delta_area_BR} < 2.9 } {
|
|
puts "delta_area_BR = ${delta_area_BR}"
|
|
puts "delta_area_BR = ${delta_area_BR}"
|
|
puts "BUC60857: ERROR (case 2)"
|
|
} else {
|
|
puts "BUC60857: OK (case 2)"
|
|
}
|
|
|
|
if {${delta_xmin_GB} > ${maxdelta} || \
|
|
${delta_ymin_GB} > ${maxdelta} || \
|
|
${delta_zmin_GB} > ${maxdelta} || \
|
|
${delta_xmax_GB} > ${maxdelta} || \
|
|
${delta_ymax_GB} > ${maxdelta} || \
|
|
${delta_zmax_GB} > ${maxdelta} } {
|
|
puts "delta_xmin_GB = ${delta_xmin_GB}"
|
|
puts "delta_ymin_GB = ${delta_ymin_GB}"
|
|
puts "delta_zmin_GB = ${delta_zmin_GB}"
|
|
puts "delta_xmax_GB = ${delta_xmax_GB}"
|
|
puts "delta_ymax_GB = ${delta_ymax_GB}"
|
|
puts "delta_zmax_GB = ${delta_zmax_GB}"
|
|
puts "maxdelta = ${maxdelta}"
|
|
puts "BUC60857: ERROR (case 3)"
|
|
} else {
|
|
puts "BUC60857: OK (case 3)"
|
|
}
|
|
|
|
set maxdelta_H 10
|
|
if {${delta_H_RB} > ${maxdelta_H}} {
|
|
puts "delta_H_RB = ${delta_H_RB}"
|
|
puts "maxdelta_H = ${maxdelta_H}"
|
|
puts "BUC60857: ERROR (case 4)"
|
|
} else {
|
|
puts "BUC60857: OK (case 4)"
|
|
}
|
|
|
|
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|