1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/bugs/modalg_6/bug25613_1
nbv 243505b81b 0027300: Boolean operation produces invalid shape in terms of "bopargcheck" command
1. Check, if value found by math_PSO algorithm cannot be precised by math_NewtonMinimum algorithm. In this case, we call math_PSO algorithm repeatedly, however, with other parameters.

2. Some margin of edge tolerance value has been provided in IntTools_Tools class.

3. Interface of math_NewtonMinimum class has been changed (method GetStatus() has been added).

Correction of some test cases according to their new behavior.
2016-04-08 11:42:42 +03:00

50 lines
1.2 KiB
Plaintext

puts "========="
puts "CR25613"
puts "========="
puts ""
###############################
## Wrong distance found by xdistef command for attached shapes
###############################
set Tol 5.0e-14
set dist_good 8.512706220911343e-006
restore [locate_data_file bug698_f.brep] f
nexplode f e
copy f_4 e
don f e
set log [xdistef e f]
regexp {Max Distance = +([-0-9.+eE]+); Parameter on curve = +([-0-9.+eE]+)} ${log} full dist param
if { [ expr ($dist - $dist_good) ] < -$Tol } {
puts "Error in xdistef command (cannot find maximal distance)"
}
if { $dist > $dist_good } {
#Check if distance found is correct
mkcurve c3d e
mk2dcurve c2d e f
mksurface ss f
cvalue c3d $param xx yy zz
vertex v1 xx yy zz
2dcvalue c2d $param uu vv
svalue ss uu vv xx yy zz
vertex v2 xx yy zz
distmini dm v1 v2
if { [ expr abs([dval dm_val] - $dist) ] > $Tol } {
if { [dval dm_val] != $dist } {
puts "Error. xdistef has failed when computing (dist_V1V2 =[dval dm_val], FoundDist=$dist)"
} else {
puts "Error. xdistef command works better than on MASTER. Please set \"dist_good\" value to $dist."
}
} else {
puts "OK: xdistef algorithm works properly"
}
}