mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
Extrema between curves has been made producing correct result for the cases of solution located near bounds. - Class math_GlobOptMin has been improved to use lower order methods of local optimization when high-order methods are failed. - Add support of conditional optimization (in bounds) in the classes math_BFGS and math_BracketMinimum. - Turn on conditional optimization in the case of usage of math_BFGS in the class math_GlobOptMin. - Correct mistake in distmini command, which caused incorrect reading of deflection parameter. - To avoid possible FPE signals, ensure initialization of fields in the class math/math_BracketMinimum. - In the algorithms math_BFGS, math_Powell and math_FRPR, take into account that the function math_MultipleVarFunction can return failure status (e.g. when computing D0 out of bounds). New test cases have been added. Tests cases are updated. // correct test case
22 lines
503 B
Plaintext
Executable File
22 lines
503 B
Plaintext
Executable File
puts "============"
|
|
puts "OCC25635"
|
|
puts "============"
|
|
puts ""
|
|
######################################################
|
|
# Wrong result of 2D-extrema between two ellipsis
|
|
######################################################
|
|
|
|
ellipse c1 0 0 2 1
|
|
ellipse c2 4 0 2 1
|
|
|
|
set info [2dextrema c1 c2]
|
|
|
|
set tol_abs 7.e-5
|
|
set tol_rel 0.01
|
|
|
|
# Check result distance.
|
|
regexp "dist 1: +(\[-0-9.+eE\]+)" ${info} full dist_1
|
|
|
|
set expected_dist_1 0.
|
|
checkreal "Distance" ${dist_1} ${expected_dist_1} ${tol_abs} ${tol_rel}
|