mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0029858: Modeling Data - Regression in GeomAPI_ExtremaCurveCurve
Fix Newton's minimum projection algorithm onto boundaries in case of conditional optimization. Add possibility to detect several optimal points at initialization of the math_GlobOptMin.
This commit is contained in:
21
tests/lowalgos/extcc/bug29858_01
Normal file
21
tests/lowalgos/extcc/bug29858_01
Normal file
@@ -0,0 +1,21 @@
|
||||
puts "========"
|
||||
puts "OCC29858"
|
||||
puts "========"
|
||||
puts ""
|
||||
#################################################
|
||||
# Regression in GeomAPI_ExtremaCurveCurve
|
||||
#################################################
|
||||
|
||||
# Read input
|
||||
restore [locate_data_file bug29858_01_e1.brep] e1
|
||||
restore [locate_data_file bug29858_01_e2.brep] e2
|
||||
|
||||
# Extract geometry from topology
|
||||
mkcurve c1 e1
|
||||
mkcurve c2 e2
|
||||
|
||||
# Run extrema
|
||||
extrema c1 c2
|
||||
|
||||
# Check result
|
||||
checklength ext_1 -l 9.4224516867962155e-10 -eps 0.01
|
28
tests/lowalgos/extcc/bug29858_02
Normal file
28
tests/lowalgos/extcc/bug29858_02
Normal file
@@ -0,0 +1,28 @@
|
||||
puts "========"
|
||||
puts "OCC29858"
|
||||
puts "========"
|
||||
puts ""
|
||||
#################################################
|
||||
# Regression in GeomAPI_ExtremaCurveCurve
|
||||
#################################################
|
||||
|
||||
# Read input
|
||||
restore [locate_data_file bug29858_02_e1.brep] e1
|
||||
restore [locate_data_file bug29858_02_e2.brep] e2
|
||||
|
||||
# Extract geometry from topology
|
||||
mkcurve c1 e1
|
||||
mkcurve c2 e2
|
||||
|
||||
# Run extrema
|
||||
set info [extrema c1 c2]
|
||||
|
||||
# Check result
|
||||
regexp {Extrema 1 is point : +([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+)} $info full x y z
|
||||
# Point check
|
||||
set good_x 0.001
|
||||
set good_y 0.0073371170841145797
|
||||
set good_z -0.083369169789921913
|
||||
checkreal "Intersection point x:" ${x} ${good_x} 0.01 0.01
|
||||
checkreal "Intersection point y:" ${y} ${good_y} 0.01 0.01
|
||||
checkreal "Intersection point z:" ${z} ${good_z} 0.01 0.01
|
28
tests/lowalgos/extcc/bug29858_03
Normal file
28
tests/lowalgos/extcc/bug29858_03
Normal file
@@ -0,0 +1,28 @@
|
||||
puts "========"
|
||||
puts "OCC29858"
|
||||
puts "========"
|
||||
puts ""
|
||||
#################################################
|
||||
# Regression in GeomAPI_ExtremaCurveCurve
|
||||
#################################################
|
||||
|
||||
# Read input
|
||||
restore [locate_data_file bug29858_03_e1.brep] e1
|
||||
restore [locate_data_file bug29858_03_e2.brep] e2
|
||||
|
||||
# Extract geometry from topology
|
||||
mkcurve c1 e1
|
||||
mkcurve c2 e2
|
||||
|
||||
# Run extrema
|
||||
set info [extrema c1 c2]
|
||||
|
||||
# Check result
|
||||
regexp {Extrema 1 is point : +([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+)} $info full x y z
|
||||
# Point check
|
||||
set good_x 0.0
|
||||
set good_y 0.070710562195021642
|
||||
set good_z -0.65305318986891325
|
||||
checkreal "Intersection point x:" ${x} ${good_x} 0.01 0.01
|
||||
checkreal "Intersection point y:" ${y} ${good_y} 0.01 0.01
|
||||
checkreal "Intersection point z:" ${z} ${good_z} 0.01 0.01
|
27
tests/lowalgos/extcc/bug29858_04
Normal file
27
tests/lowalgos/extcc/bug29858_04
Normal file
@@ -0,0 +1,27 @@
|
||||
puts "========"
|
||||
puts "OCC29858"
|
||||
puts "========"
|
||||
puts ""
|
||||
#################################################
|
||||
# Regression in GeomAPI_ExtremaCurveCurve
|
||||
#################################################
|
||||
|
||||
# Read input
|
||||
restore [locate_data_file bug29858_04_e1.brep] e1
|
||||
restore [locate_data_file bug29858_04_e2.brep] e2
|
||||
|
||||
# Extract geometry from topology
|
||||
mkcurve c1 e1
|
||||
mkcurve c2 e2
|
||||
|
||||
# Run extrema
|
||||
set info [extrema c1 c2]
|
||||
|
||||
# Amount Check
|
||||
if { [llength $info] != 2 } {
|
||||
puts "Error: Invalid extrema number in extrema output"
|
||||
}
|
||||
|
||||
# Check result
|
||||
checklength ext_1 -l 2.2204460492503131e-16 -eps 0.01
|
||||
checklength ext_2 -l 9.693032344962995e-16 -eps 0.01
|
Reference in New Issue
Block a user