mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +03:00
Splitting of subgroups bugs/modalg and bugs/moddata to optimise time of testing Correction of end file in group v3d Small correction of test case
108 lines
3.2 KiB
Plaintext
Executable File
108 lines
3.2 KiB
Plaintext
Executable File
puts "============"
|
|
puts "OCC9303"
|
|
puts "============"
|
|
puts ""
|
|
######################################################
|
|
# Intersection curve surface doesn't take account of bounds of the surface
|
|
######################################################
|
|
|
|
set BugNumber OCC9303
|
|
|
|
proc GetPercent {Value GoodValue} {
|
|
set Percent 0.
|
|
if {${GoodValue} != 0.} {
|
|
set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
|
|
} elseif {${Value} != 0.} {
|
|
set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
|
|
} else {
|
|
set Percent 0.
|
|
}
|
|
return ${Percent}
|
|
}
|
|
|
|
cone c 0 0 0 30 0
|
|
trimv nc c 20 30
|
|
|
|
smallview +X+Z
|
|
donly nc
|
|
fit
|
|
|
|
line ll 0 0 20 1 0 0
|
|
|
|
if [catch {intersect res ll nc} result] {
|
|
set mistake 1
|
|
} else {
|
|
set mistake 0
|
|
}
|
|
|
|
if { $mistake == 0} {
|
|
puts "${BugNumber} OK : intersection was finished"
|
|
puts ""
|
|
set nom 0
|
|
set j 1
|
|
repeat 2 {
|
|
set che [whatis res_$j]
|
|
set err [lindex $che [expr [llength $che] - 1]]
|
|
if { $err != "point"} {
|
|
break
|
|
} else {
|
|
set nom [expr $nom + 1]
|
|
}
|
|
incr j
|
|
}
|
|
if { $nom != 2 } {
|
|
puts [format "Faulty ${BugNumber}: Intersection was made WRONGLY: %s points" $nom]
|
|
} else {
|
|
puts [format "${BugNumber} OK : Intersection command works properly: %s points" $nom]
|
|
|
|
set dump1 [dump res_1]
|
|
set x1 [lindex ${dump1} 7]
|
|
set y1 [lindex ${dump1} 8]
|
|
set z1 [lindex ${dump1} 9]
|
|
set x1 [string range ${x1} 0 end-1]
|
|
set y1 [string range ${y1} 0 end-1]
|
|
|
|
set dump2 [dump res_2]
|
|
set x2 [lindex ${dump2} 7]
|
|
set y2 [lindex ${dump2} 8]
|
|
set z2 [lindex ${dump2} 9]
|
|
set x2 [string range ${x2} 0 end-1]
|
|
set y2 [string range ${y2} 0 end-1]
|
|
|
|
set percent_max 0.1
|
|
set GoodX1 1.154700538379251e+01
|
|
set GoodY1 0.000000000000000e+00
|
|
set GoodZ1 2.000000000000000e+01
|
|
set GoodX2 -1.154700538379251e+01
|
|
set GoodY2 0.000000000000000e+00
|
|
set GoodZ2 2.000000000000000e+01
|
|
|
|
set Percent_x1 [GetPercent ${x1} ${GoodX1}]
|
|
set Percent_y1 [GetPercent ${y1} ${GoodY1}]
|
|
set Percent_z1 [GetPercent ${z1} ${GoodZ1}]
|
|
|
|
set Percent_x2 [GetPercent ${x2} ${GoodX2}]
|
|
set Percent_y2 [GetPercent ${y2} ${GoodY2}]
|
|
set Percent_z2 [GetPercent ${z2} ${GoodZ2}]
|
|
|
|
if {${Percent_x1} > ${percent_max}} {
|
|
puts "Faulty ${BugNumber}: bad value of x1 = ${x1}"
|
|
} elseif {${Percent_y1} > ${percent_max}} {
|
|
puts "Faulty ${BugNumber}: bad value of y1 = ${y1}"
|
|
} elseif {${Percent_z1} > ${percent_max}} {
|
|
puts "Faulty ${BugNumber}: bad value of z1 = ${z1}"
|
|
} elseif {${Percent_x2} > ${percent_max}} {
|
|
puts "Faulty ${BugNumber}: bad value of x2 = ${x2}"
|
|
} elseif {${Percent_y2} > ${percent_max}} {
|
|
puts "Faulty ${BugNumber}: bad value of y2 = ${y2}"
|
|
} elseif {${Percent_z2} > ${percent_max}} {
|
|
puts "Faulty ${BugNumber}: bad value of z2 = ${z2}"
|
|
} else {
|
|
puts "${BugNumber}: OK"
|
|
}
|
|
|
|
}
|
|
} else {
|
|
puts "Faulty ${BugNumber} : intersection does not finished"
|
|
}
|