mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
0025613: Wrong distance found by xdistef command for attached shapes
1. Divide B-spline curve on sub-intervals (bounded by knots values). 2. Class BRepLib_CheckCurveOnSurface_TargetFunc has been optimized for future implementation to checkshape algorithm (Adaptors are used instead of Geom_Curve(Surface)). 3. Parallelization of new algorithm. The algorithm is based on math_PSO class. Test cases for issue 25613 have been created. Changes in accordance with the last remarks
This commit is contained in:
50
tests/bugs/modalg_6/bug25613_1
Normal file
50
tests/bugs/modalg_6/bug25613_1
Normal file
@@ -0,0 +1,50 @@
|
||||
puts "========="
|
||||
puts "CR25613"
|
||||
puts "========="
|
||||
puts ""
|
||||
###############################
|
||||
## Wrong distance found by xdistef command for attached shapes
|
||||
###############################
|
||||
|
||||
set Tol 1.0e-14
|
||||
set dist_good 8.5127062130336385e-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"
|
||||
}
|
||||
}
|
50
tests/bugs/modalg_6/bug25613_2
Normal file
50
tests/bugs/modalg_6/bug25613_2
Normal file
@@ -0,0 +1,50 @@
|
||||
puts "========="
|
||||
puts "CR25613"
|
||||
puts "========="
|
||||
puts ""
|
||||
###############################
|
||||
## Wrong distance found by xdistef command for attached shapes
|
||||
###############################
|
||||
|
||||
set Tol 1.0e-14
|
||||
set dist_good 0.002371098605239398
|
||||
|
||||
restore [locate_data_file bug22790_f.brep] f
|
||||
nexplode f e
|
||||
copy f_2 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"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user