mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
Added subgroups volumemaker, gdml_private and gdml_public Moved scripts from public repository ti test cases Added more TODOs to unstable test cases Small corrections for unstable test cases
89 lines
2.4 KiB
Plaintext
Executable File
89 lines
2.4 KiB
Plaintext
Executable File
if { [isdraw result] } {
|
|
#check if result is valid
|
|
|
|
puts "checkshape"
|
|
set ch [checkshape result]
|
|
puts $ch
|
|
|
|
if {[info exists command] && ${command} == "mkvolume"} {
|
|
set bcheck [bopcheck result]
|
|
puts $bcheck
|
|
if {![regexp {This shape seems to be OK.} $bcheck]} {
|
|
puts "Error: bopcheck failed"
|
|
}
|
|
}
|
|
if { [info exists square] } {
|
|
set prop "area"
|
|
set mass $square
|
|
regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full m
|
|
}
|
|
if { [info exists length] } {
|
|
set prop "length"
|
|
set mass $length
|
|
regexp {Mass +: +([-0-9.+eE]+)} [lprops result] full m
|
|
|
|
puts "checksection"
|
|
puts [checksection result]
|
|
}
|
|
|
|
#if mass (length or square) is empty in test case then result should be an empty shape.
|
|
if { [info exists mass] && [string compare "$mass" "empty"] != 0 } {
|
|
if { $m == 0 } {
|
|
puts "Error : The $command is not valid. The $prop is 0."
|
|
}
|
|
if { $mass > 0 } {
|
|
puts "The expected $prop is $mass"
|
|
}
|
|
#check of change of square is < 1%
|
|
if { ($mass != 0 && [expr 1.*abs($mass - $m)/$mass] > 0.01) || ($mass == 0 && $m != 0) } {
|
|
puts "Error : The $prop of the resulting shape is $m"
|
|
}
|
|
|
|
if { [info exists nbsh_v ] } {
|
|
set arr_v [explode result v]
|
|
set nb_v [ llength $arr_v ]
|
|
if { $nb_v != $nbsh_v } {
|
|
puts "Error : The resulting shape is WRONG because it must contain $nbsh_v vertexes instead of $nb_v"
|
|
} else {
|
|
puts "The resulting shape contains $nb_v vertexes"
|
|
}
|
|
|
|
}
|
|
|
|
if { [info exists nbsh_e ] } {
|
|
set arr_e [explode result e]
|
|
set nb_e [ llength $arr_e ]
|
|
if { $nb_e != $nbsh_e } {
|
|
puts "Error : The resulting shape is WRONG because it must contain $nbsh_e edges instead of $nb_e"
|
|
} else {
|
|
puts "The resulting shape contains $nb_e edges"
|
|
}
|
|
}
|
|
} else {
|
|
if { [info exists mass] && $m != 0 } {
|
|
puts "Error : The $command is not valid. The $prop is $m"
|
|
}
|
|
}
|
|
|
|
smallview
|
|
if { [info exists m ] } {
|
|
if { $m > 0 } {
|
|
donly result
|
|
if { [info exists nbsh_v ] } {
|
|
explode result v
|
|
}
|
|
} else {
|
|
donly a b
|
|
}
|
|
} else {
|
|
donly result
|
|
}
|
|
fit
|
|
xwd $imagedir/${test_image}.png
|
|
} else {
|
|
puts "Error : The $command cannot be built."
|
|
}
|
|
|
|
# to end a test script
|
|
puts "TEST COMPLETED"
|