mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Test for 0028196: Algorithm 'Extrema_GenLocateExtPS' failed to find the extremum in a case
Draw command 'proj' has been improved: - Add possibility to pass the starting point. If it is passed than the algorithm Extrema_GenLocateExtPS is used instead of standard projection. - Make the output of the command more clear. Test case bugs/moddata_3/bug28196 has been added.
This commit is contained in:
@@ -7,7 +7,7 @@ puts ""
|
||||
|
||||
torus s 0 10
|
||||
set out [proj s 1 0 0]
|
||||
if {[llength $out] != 4} {
|
||||
if {[llength [lmatch $out ext_*]] != 4} {
|
||||
puts "Error: projection failed"
|
||||
} else {
|
||||
puts "OK : projection passed"
|
||||
|
@@ -13,6 +13,7 @@ checkshape a
|
||||
explode a f
|
||||
mksurface gs a_1
|
||||
set list [proj gs 0 10 50]
|
||||
set list [lmatch $list ext_*]
|
||||
set ll 4
|
||||
|
||||
set good_Parameter1List [list 0 0 0 0]
|
||||
|
35
tests/bugs/moddata_3/bug28196
Normal file
35
tests/bugs/moddata_3/bug28196
Normal file
@@ -0,0 +1,35 @@
|
||||
puts "============"
|
||||
puts "CR28196"
|
||||
puts "==========="
|
||||
puts ""
|
||||
###############################################################################
|
||||
# Algorithm 'Extrema_GenLocateExtPS' failed to find the extremum in a case
|
||||
###############################################################################
|
||||
|
||||
puts "TODO OCC28196 ALL: Error: projection with starting point is worse"
|
||||
|
||||
pload MODELING
|
||||
|
||||
restore [locate_data_file bug28196.brep] f
|
||||
|
||||
mksurface s f
|
||||
dset x 5.97447220497284
|
||||
dset y 0.0187851531995338
|
||||
dset z 0.433545417254429
|
||||
dset u 13140.3030987283
|
||||
dset v 28.5494495724281
|
||||
set max_error 1e-5
|
||||
|
||||
proj s x y z
|
||||
set dist_proj [lindex [length ext_1] end]
|
||||
proj s x y z u v
|
||||
set dist_proj_uv [lindex [length ext_1] end]
|
||||
|
||||
puts "Distance of standard projection $dist_proj"
|
||||
puts "Distance of projection with starting point $dist_proj_uv"
|
||||
|
||||
if {[expr $dist_proj_uv - $dist_proj] > $max_error} {
|
||||
puts "Error: projection with starting point is worse than standard projection"
|
||||
} else {
|
||||
puts "OK: well projection with starting point"
|
||||
}
|
Reference in New Issue
Block a user