mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0032882: Modeling Data - Extrema curve/curve cannot find all solutions (OCCT 7.6 backport)
Extrema/Extrema_GenExtCC.gxx - estimation of Lipchitz constant is improved Extrema_GlobOptFuncCC.cxx - function value is changed LocOpe/LocOpe_WiresOnShape.cxx - small correction to fix regression lowalgos/extcc/bug32882 - new test case is added some test were updated according new behavior of extrema algo
This commit is contained in:
@@ -18,11 +18,12 @@ mkcurve c2 e2
|
||||
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
|
||||
if {[regexp "ext_1" $info]} {
|
||||
set dist [lindex [length ext_1] end]
|
||||
if { $dist > 1.0e-10 } {
|
||||
puts "Error: Extrema distance is too big"
|
||||
}
|
||||
} else {
|
||||
puts "Error: Extrema is not found"
|
||||
}
|
||||
|
||||
|
36
tests/lowalgos/extcc/bug32882
Normal file
36
tests/lowalgos/extcc/bug32882
Normal file
@@ -0,0 +1,36 @@
|
||||
puts "========"
|
||||
puts "OCC32882: Modeling Data - Extrema curve/curve cannot find all solutions"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
|
||||
# Read input
|
||||
restore [locate_data_file bug32882.brep] cc
|
||||
explode cc
|
||||
|
||||
# Extract geometry from topology
|
||||
mkcurve c1 cc_1
|
||||
mkcurve c2 cc_2
|
||||
mkcurve c3 cc_3
|
||||
|
||||
# Run extrema c1/c3
|
||||
set info [extrema c1 c3]
|
||||
|
||||
# Check number of solution
|
||||
if { [llength $info] != 3 } {
|
||||
puts "Error: Invalid extrema number in extrema c1-c3 output"
|
||||
}
|
||||
|
||||
# Check result
|
||||
checklength ext_1 -l 2.929642751e-14 -eps .01
|
||||
checklength ext_2 -l 3.480934286e-14 -eps .01
|
||||
checklength ext_3 -l 3.177643716e-14 -eps .01
|
||||
|
||||
# Run extrema c3/c2
|
||||
set info [extrema c3 c2]
|
||||
# Check number of solutions
|
||||
if { [llength $info] != 2 } {
|
||||
puts "Error: Invalid extrema number in extrema c3-c2 output"
|
||||
}
|
||||
checklength ext_1 -l 5.684341886e-14 -eps .01
|
||||
checklength ext_2 -l 2.929642751e-14 -eps .01
|
Reference in New Issue
Block a user